IBM BPM, V8.0.1, All platforms > Create processes in IBM Process Designer > Modeling processes > Business objects and variables

Variable scope in Process Designer

In IBM BPM, all variables declared for a business process definition (BPD) or service are local variables.

Local variables are only accessible to the currently executing process instance or service. Because variables are unique to an individual BPD or service, you can use a variable of the same name in a nested BPD or service and there are no conflicts at run time.

A variable contains a value or references an object. Multiple variables may reference the same object. When a running process instance or service reaches an exit point, the variable's value or references may be propagated to the calling process instance or service. When a running process instance or service encounters an activity, the variable values and references may be propagated to variables within that activity. A variable that is defined as a Shared Object may persist its values at these boundaries. See Declaring and passing variables for more details.

All Process Designer variables are JavaScript objects. Process Designer uses namespaces to organize these objects and their methods. The following table describes the namespaces most commonly used during process design and development:

Available namespaces
Namespace Description
tw Top-level Process Designer namespace
tw.object Access Process Designer JavaScript objects and business objects (variable types)
tw.local Access and update BPD and service-level variables
tw.system Access system features and functionality
tw.system.org Access security functionality
tw.epv Access exposed process values (EPVs)
tw.env Access environment variables

Business objects and variables


Related tasks:
Setting variables in pre and post assignments
Create exposed process values (EPVs)


Related information:
Setting environment variables