Argument Variables

Provides general information on Argument Variables.

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. Arguments variables can be defined as:
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:

Argument variables can be considered as External or as Internal based on what they were defined for.

External

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.

Internal

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

Note: The usage of the arg keyword is optional. However, it is necessary when you need to distinguish a local or instance variable that has the same name as an argument variable.

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.

Copy Argument

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