Adding a Multiple Gateway

When you add a Multiple gateway, you should take into account the following considerations.

When you add a Multiple gateway, Studio automatically adds the corresponding Join gateway, and the PBL-Method associated to the Multiple gateway.

When you edit the Join gateway Studio adds the corresponding PBL-Method, and associates it to the Join gateway.

In a Multiple-Join circuit you must create the instance copies using PBL code.

Note: The Interactive activities you add within the Multiple-Join circuit must not be Suspendable.

Roles

You should add Multiple gateways in automatic role lanes. You can add Multiple gateways in user-defined roles but this does not add any information to the process. The engine runs Multiple gateways without the user's intervention.

Variables

The PBL-Methods associated to the Multiple and the Join gateway can access the following types of variables:
  • predefined variables
  • instance variables
  • local variables
  • arguments

Transitions

You must connect the Multiple gateway to the process flow using an inbound transition. You can add only one outbound transition to the Multiple gateway.

The Join gateway in a Multiple-Join circuit allows only one inbound transition. You must connect the Join gateway to the process flow using one or more outbound transitions.

An error appears in the Problems View if the inbound or outbound transitions that connect the Multiple-Join circuit to the process flow are missing.

The flow objects within a Multiple-Join circuit can have transitions to other flow object within the Split-Join circuit. You cannot define transitions to flow objects outside the Multiple-Join circuit, with the exception of Grab activities. However the outbound transition of the Grab activity should connect it to an activity in the Multiple-Join circuit or to the End of the process.

Creating the Instance Copies

To generate instance copies you must add the following code to the PBL-Method associated to the Multiple gateway:
                    
                        i = 0
                        while i < numberOfCopies
                            do
                                // Create a copy of the process instance.
                                copy= clone(this)

                                // Get ready for next loop.
                                i = i + 1

                            end
                    
                    

Join activities can also access instance copies by using copy. as shown below:

To access the instance copies from the Join gateway you must add the following code to the associated PBL-Method:
                    
                    //Assign the instance variable the value of the variable in the copy.
                    variableName = copy.variableName