Search code examples
jitterbit

Jitterbit run operation condition


I'm new to Jitterbit and I'm working in Jitterbit Studio 5.6.0.1. In our deployed project we have 4 consequential operations and the first one is scheduled. What I want to do is to put a condition on the first scheduled operation that it should not run until all operations from the previous run are finished. I want to avoid running the operation twice. Any help? Thanks


Solution

  • First off, I would suggest upgrading your studio to 8.12 (current version). Aside from that, if you add a script before the operation that you want to check, you can use something along these lines:

    isInQueue=GetOperationQueue("<TAG>Operations/Your_Operation</TAG>");
    isRunning=isInQueue[0][1];
    if(isRunning==1 && isRunning!=Null(),
      "Do Something";
    );
    

    That's just a very basic idea of how you can handle this. In my situation, I have an operation that has just a script like this in it, that either direct to a script to run if not already running, or direct to a dead-end, if it needs to skip this scheduled instance.