Use Global Creation as a means of initiating an instance in a process.
Create a Global Creation activity and assign it to a user-defined role (for example, Customer). Global Creation activity can appear in the process in any number of roles, but the created instance is always submitted to the Begin activity to complete its creation.
Within the Global Creation properties, in the General tab, the Argument set name defines the argument variables required by the Begin activity.
In the example below, custName and custNumber are defined as argument variables in the Begin activity within the Argument Mapping used by the Global Creation activity. Here, the Global Creation activity prompts the end user to enter a customer name and number, which will be sent to the Begin activity once "OK" has been selected. After the end user clicks the OK button, an instance begins creation. The instance completes creation in the Begin activity. If the Argument Mapping is set for both arguments, the received information is kept in instance variables.
//Prompts the end user to enter the customer name and // number. // The defined arguments names have to be referenced // with "arg." // input "Customer Name: " arg.custName, "Customer Number: " arg.custNumber using title = "Enter Customer Information"
The Begin activity argument mapping will transform the received arguments into instances variables.
Within a Global creation, you can create multiple instances by using the create ProcessInstance statement.
i = 1 input "Quantity of instances: " op while i < op do create ProcessInstance i = i + 1 end