Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 1 Getting Started : Tutorial 6 - Using Loops in Simulation

Tutorial 6 - Using Loops in Simulation
When simulating a Process you should avoid infinite loops by providing a Simulation Control strategy. If you create a loop without a Simulation Control, TIBCO Business Studio reports this as an error in the Problems view. This tutorial shows how to use a loop in Process simulation.
1.
Open the Submit Expenses Process from the Basic Samples Project. Look at the following portion of the Process:
Simulating this Process would create an infinite loop because there is nothing to notify TIBCO Business Studio to end the loop. Subsequent steps show how to specify a way to break out of the loop for simulation purposes.
2.
Click the Submit Revised Receipts Activity. In the Properties view, click the Simulation Control tab.
3.
Click the Simulation control link to add a simulation control strategy.
4.
Max Loop Count - after the specified number of times through it.
Max Elapse Time - after the specified amount of simulation time has elapsed.
Normal Distribution - based on a normal distribution of times through the loop.
In this example, select Normal Distribution with a mean of 2 and standard deviation of 0.5.
5.
For Decision Activity select Is Paperwork Correct?. This informs TIBCO Business Studio which Activity will be used to decide whether to end the loop.
6.
For To Activity, select Enqueue Payment. This informs TIBCO Business Studio which Activity to proceed with once the loop is finished.
7.
8.
9.
100 cases reach the Is Paperwork Correct? Gateway. Because the weighting of the Gateway is 50:50, 50 cases proceed to the Enqueue Payment Activity. The remaining 50 cases are travel through the two Activities in the loop again resulting in 76 cases passing through this Activity.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved