Default Values Introduction to Data Objects

Handling Information in Your Process Design 8-7

8.5 Working with Activity Instance Attributes

Some process elements support activity instance attributes. You can use these activity instance attributes to control the flow of a process. Generally the Process Engine assigns the values of activity instance attributes, however some of them require you to assign them a value. Table 8–2 Activity Instance Attributes Name Type Description Availability state String Specifies the state of the instance. Possible values are: ■ none ■ ready ■ active ■ canceled ■ aborted ■ completing ■ completed In complex gateways loopCounter Int Specifies the number of times the engine ran this activity. The Process Engine updates this variable each time it runs a new loop. In activities with loop marker. loopCounter Int Specifies the sequence number that identifies each of the activations of this activity. The BPMN Engine assigns this number to each activation when it runs the activity. In activities with multi-instance marker. numberOfInstances Int .Specifies the number of activations created for a multi-instance activity. You can only access this value from the main instance. In activities with multi-instance marker. numberOfActiveInstances Int Specifies the number of active inner instances for a multi-instance activity. You can only access this value from the main instance. For sequential multi-instance activities this value is either 1 or 0. For parallel multi-instance activities this value is smaller or equal to the value specified by the predefined data object numberOfInstances. In activities with multi-instance marker. numberOfCompletedInstances Int Specifies the number of completed inner instances for a a multi-instance activity. You can only access this value from the main instance. In activities with multi-instance marker. numberOfTerminatedInstances Int Specifies the number of terminated inner instances for a a multi-instance activity. You can only access this value from the main instance. In activities with multi-instance marker. activationCount Int Specifies the number of tokens in the incoming sequence flow of the gateway. In complex gateways. 8-8 Modeling and Implementation Guide for Oracle Business Process Management

8.6 Introduction to Subprocess Data Objects

You can define data objects for a certain subprocess. These data objects are available only when the subprocess is running. When the instance leaves the subprocess the value of subprocess data objects is lost. Using subprocess data objects is a good practice because: ■ It reduces the number of unnecessary data objects in the main process, making it simpler and easier to read. ■ By reducing the number of process data objects, it reduces the amount of memory each process instance occupies. ■ It makes the subprocess easier to understand. From within a subprocess you can access process data objects and subprocess data objects. If the name of a subprocess data object matches the name of a process data object, then when you access the data object you obtain the value of the subprocess data object.

8.7 Working with Subprocess Data Objects

You can add new project data objects to subprocesses. If necessary you can edit or delete them.

8.7.1 Adding a Data Object to a Subprocess

You can add data object to a subprocess. You can only access this data objects from within the subprocess. To add a data object to a subprocess: 1. In the BPM Project Navigator, select the process that contains the subprocess where you want to add a data object.

2. In the Structure window, expand the Activities node.

3. Expand the node that corresponds to the subprocess.

4. Right-click the Data Objects node located under the subprocess node.

5. Select New.

6. Provide a name to identify the new data object.

7. Select a type or click the Browse More Types button to select a type that is not

included in the list.

8. Optionally, check Auto Initialize to initialize the data object with a default value.

9. Click OK.

8.7.2 Editing a Data Object in a Subprocess

You can modify the name and type of an existing subprocess data object. To edit a data object in a subprocess: 1. In the BPM Project Navigator, select the process that contains the subprocess with the data object you want to edit. 2. In the Structure window, expand the Activities node.