Declaring and passing variables

Variables capture the business data that is passed from step to step in a process.

The variables are local to a process or service. You cannot reference a variable from another process or service. Variables contain the values or references to business data. To propagate the business data values and references, you must properly declare the variables and pass them to the linked processes, services, and message events.

The general procedure for passing variables is:
  1. Declare variables at the process level.
  2. For each linked process and service, declare variables and business objects to receive the values of the variables of the main process.
  3. Pass those variables as inputs to the linked processes and services that require them for their implementation.
  4. Pass the variables from the linked processes and services back up to the main process as outputs when you want the main process to be aware of changes made to the variables in the linked processes or services.
An alternative form of propagation is to define the variable type as a shared object when you create or edit your business object; that is, select the Shared Object check box. The values of a variable designated as a shared object are persisted to a data store. At each process, service or message event boundary, the local variables with the same shared object key are refreshed from the data store. See Shared business objects for information about shared objects.

When passing variables from a process to a linked process, their types should be compatible. For example, a string variable in a process can only be passed to a linked process if this linked process has a string variable declared as an input variable.