IT Process Automation

Expand all | Collapse all

turn to Simulation mode with javascript

Jump to Best Answer
  • 1.  turn to Simulation mode with javascript

    Posted 09-09-2015 02:37 PM

    It is possible to define a process in Process Automation as simulated way through javascript?

    I have a variable called RunProcess. If this variable return  FALSE value in the Pre-Execution the process in question would become to Simulation Mode: Successful

  • 2.  Re: turn to Simulation mode with javascript
    Best Answer

    Broadcom Employee
    Posted 09-10-2015 08:57 AM

    There is not a way to set Simulation Mode programmatically.  Perhaps there is another way to accomplish what you are trying to do?  Give us some more details if you would like input and other ideas to accomplish your goal with this process design.

  • 3.  Re: turn to Simulation mode with javascript

    Posted 09-14-2015 07:40 AM

    I could already solve my problem with the operator reset.

    2015-09-14 08_34_48-CA Process Automation 4.2 SP02.jpg

    Thank you!

  • 4.  Re: turn to Simulation mode with javascript

    Posted 02-07-2017 09:18 PM

    So I had the same requirement but it was because I was trying to remove the clutter of extra operators.


    In the below sample all the x custom ports equate to "don't run the operator attached to the same colored check mark."  This was my original solution, which works.  basically, the 2 condition go into an OR operator so one of them will always complete.  But since I wanted all 3 paths to go in parallel, I needed the AND operator to pause before all were complete.

    It bugged me to have to create 6 different paths plus add the ORs to accomplish the goal.


    My 2nd solution was essentially what you did above with the reset operator.  It has the same problem.  Same number of custom ports, same number of operators, and possibly clumsier visually


    BUT... I just stumbled on this which appears to provide the same functionality, essentially as Simulate in my limited testing so far.   The setOperatorStatus function, which I can run in the Pre-Execute code of the operator in question.


    setOperatorStatus("success",1,"force success")


    The above line of code sets the status of the Operator to Success with a Result code of 1 and a Reason of "Force Success"  but does not seem to actually run the operator at all.  Hence a programatic equivalent of Simulate that can be accomplished via Javascript.


    This should allow me to convert the above mess into a much more compact and cleaner version that would look like this:



    Should work for you as well and you can make the Reason say anything you want.


    Andrew,  Is there anything wrong with my synopsis and understanding of that function as illustrated in this post?