Argument variables act as an interface. You can transform instance variables with argument variables so that they may be passed to or from external components or between processes. See Argument Mapping for further information on passing information between processes and their calling/called or notifying/notified activities.
For each activity, the valid options depend on how arguments can be treated in each case. Therefore, arguments can be in each activity as follows:
| Activity | Type |
|---|---|
|
In/Out |
|
Out for the create BP-method In for the wait BP-method. |
|
Out |
|
In |
|
Not Available |
Argument variables can be considered as external or as internal based on what they were defined for.
External argument variables are those defined in the activities (Begin, End and Notification Wait) that can deal with external components of the process. These external components could be an HTML form, a Java program, another process, Web Services, and so on. External Argument variables are the interface to a process. They are responsible for passing variables from a process to an external component and receiving variables from external components into the process. Arguments can be grouped in argument sets.
Two BPM processes that need to communicate with each other use external argument variables to pass the variables between the processes. One process, the parent process, passes variables through a Subflow activity to another process (a subprocess or child process). The child process's Begin activity receives these argument variables and maps them to instance variables. When the child process has finished processing the instance, it passes the instance variables to the End activity, which then maps the instance variables back to argument variables to pass back to the Subflow activity in the parent process.
The second type of argument variable is internal to a process. It is available for BP-Methods used within the process (for example, a BP-Method that receives arguments and can be invoked from another BP-Method assigned to an activity task).
Fully qualified argument variable names are written: arg.myArgument
arg.myArgument = myInstance
myInstance = arg.myArgument
For example, suppose that there is a method that contains a local variable called orderNo. The method also receives an argument called orderNo, and the process has an instance variable with the same name as well. In order to identify the proper variable, you will need to qualify it.
this.orderNo
arg.orderNo
Unqualified variables are assumed to be local, so they do not require qualification.
There is a predefined argument called copy which is only available when writing a Join activity BP-Method. The copy argument represents the instance-copy that arrived at the Join activity.
In the corresponding Split of the Split-Join circuit, if copies are created, they can be processed in the Join activity upon arrival. The way to reference copies is by using the copy argument keyword.
In other words, copy is used to access the values of the variables of the copies of an instance in the Join activity.
// Set the original instance variable with // the copy instance variable. orderTotal = copy.orderTotal
See Split-Join activity for further information.