Instance variables are variables attached to an instance. They contain information that refers to the instance. Instance variables can be accessed from the activities as the instance flows through a process from the Begin activity to (and including) the End activity.
All activities, except Global Creation, Global and Global Automatic can access instance variables. Examples of instance variables that may be found in a shipping order management process include: invoiceNumber, customerName, customerNumber, orderStatus, orderAmt and shipStatus.
Instance variables are called in any BP-Method by the variable's name. If there is any possibility for a naming conflict, for example, you have a SQL component and the table has a field with the same name as the instance variable, then you should refer to the instance variable as this.instancevariablename within the BP-method.
Instance variables used to store a large amount of data (10 KB or more) need to be categorized as separated.
The BPM system separately stores these variables on the database to avoid performance problems. Large BPM Objects or serialized Java objects are examples of instance variables defined as separated.
Sometimes instance variables contain information about a process instances which needs to be shared across other processes or be used as a query filter from WorkSpace. In order to expose a variable in this way, it can be set as project. When a variable is defined as external , it becomes available as an project variable across the project.
For example, the instance variable CustomerName used in a process within a project also needs to be used by all other processes across the project. Therefore, define it as external and, in each process that needs to use it, declare the same variable (with the same name and type). All variables defined in this way will be references to the same external variable.
External variables are also available for display in WorkSpace, as they are saved within the Studio database.
From WorkSpace, you can search for instances by setting filtering conditions on the external variable.
See How to use a BPM Object as an instance variable for more information.
See SQL Components as Instance variables for more information.