Provides general information on Argument Variables.
Argument variables can be considered as External or as Internal based on what they were defined for.
The first type of arguments 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-Methods that receives arguments and can be invoked from another BP-Method assigned to an activity task). In either case, argument variables appear as follows in the Method Editor:
arg.myArgument
The following sets an argument variable equal to an instance variable as follows:
arg.myArgument = myInstance
The following sets an instance variable equal to an argument variable as follows:
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 called orderNo as well. In order to distinguish the usage of each variable you will need to qualify it with the corresponding keyword:
To refer to the instance variable you must type:
''this.orderNo''
To refer to the argument variable you must type:
''arg.orderNo''
Local variables have no qualification.
There is a predefined argument called copy that is only available when writing a Join activity BP-Method. copy 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.
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