A Modifying Running Process Instances in Oracle Business Process Management Workspace

This appendix describes how process owners and Process Workspace administrators can alter the flow of running process instances in Process Workspace. It also describes how they can migrate instances in Process Workspace.

This section contains these topics:

A.1 Altering the Flow of Running Process Instances in Process Workspace

You can move the token of a running process instance from a current activity to another, but only within the following structural constraints:

  • You can move an instance only to an activity defined at the same process level.

  • You cannot move an instance to a boundary event.

  • You cannot move an instance into a boundary event flow unless the boundary event is interrupting and is defined at the same level.You cannot move an instance inside or outside an Event Subprocess.

  • You cannot move an instance outside a gateway branch. You can, however, move it to the merging gateway to merge that path.

A.1.1 How to Alter the Flow of Running Process Instances in Process Workspace

To alter the flow of a running process instance:

  1. From the Process Tracking tab page, select a process instance. The details of that instance appear.

  2. From the Actions list, select Alter Flow and Suspend.

    If you select a single process instance, then the Alter Flow dialog box appears as shown in the example in Figure A-1.

    Figure A-1 Altering the Flow of a Process Instance

    Description of this graphic follows.
    Description of "Figure A-1 Altering the Flow of a Process Instance"

    By default, the Alter Flow dialog box shows only the Process and Project data attributes. When you select one of the open activities, it shows the data objects within the context of that open activity. For example, if the open activity is a subprocess, then the Alter Flow dialog box displays any subprocess level data objects.

  3. In the Alter Flow dialog box, you can do any or all of the following:

    • View the list of current activities in a running process instance in the Open Activities table.You can select the new activity where you want to move the token. Note that the New Activity list includes only those locations to which a token can be moved validly.

    • Include the correlation keys in the list of data objects as shown in Figure A-1. The correlation keys will be visible only if the process is using correlation. To do this, select Show correlation key. If you select a correlation key, then the details section shows the correlation property that comprises the key. To reset the correlation key, select Reset correlation key.

      For information about correlation keys, see Chapter 24, "Communicating Business Processes Using Correlations".

    • Include process instance attributes in the list of data objects as shown in Figure A-1. To do this, select Show instance attributes. To display the details of a particular instance attribute, select the attribute. Note that only those instance attributes that can be modified appear as editable. Others are read-only.

    • Add any comments in the Comments field.

  4. Click one of the following:

    • Resume to move the token to another activity and return the process to a running state.

    • Save to suspend the process instance. You can return to it later to alter its flow and resume it.

    • Cancel to return the process instance to its last saved state. The process continues in the running state.

Note:

  • If you have opened the Alter Flow dialog box and the session times out before you have taken any action, then the process instance is suspended.

  • If an activity has more than one running tokens associated with it, you cannot alter the flow to select and move just one of the tokens to another valid target activity. If you alter the flow for that open activity, then all the tokens move.

A.2 Migrating Process Instances in Process Workspace

If a new implementation of the same composite revision is deployed, and the previously deployed composite has some components with the newer BPM process definition, then the affected components go into suspended state. To resume a suspended component, either migrate or suspend process instances that are in the pending migration state.

Oracle BPM provides a way to retain the existing running instances for a process when it is redeployed. To do this, while redeploying the process in Fusion Middleware Control Console, select Keep running instances. If the redeployment succeeds, then the instance goes into pending migration state and the process component is suspended.

This section details how to migrate a pending migration instance and how to resume a suspended component. It contains these topics:

A.2.1 How to Migrate Process Instance in Process Workspace

You can migrate a process instance in either of two ways:

  • Migrate as is: Migrate the instance without moving the token or updating the payload

  • Make changes and migrate: Move the token to the new activity you specify, and update the payload as you specify, then migrate the instance.

To migrate process instances:

  1. Select one or more process instances. From the Actions list, select Migrate. The Migrate dialog box appears.

    The elements in this dialog box change depending on your selection. If you select Migrate as is, only the Comments field is available. If you select a single instance and then select Make changes and migrate, then the Migrate dialog box appears as shown in Figure A-2.

    Figure A-2 Migrating a Process Instance

    Description of this graphic follows.
    Description of "Figure A-2 Migrating a Process Instance"

    If you select Make changes and migrate, you can do any or all of the following:

    • In the Open Activities table, you can view the activities where the token is currently running. You can select the new activity where you want to move the token. Note that the New Activity list includes only those locations to which a token can be moved validly

      Note:

      • For a pending migration instance to resume, all removed activity tokens need to be moved to new activities.

      • If you select more than one activity from the Open Activities table, then the Data Objects tab does not appear, and you are not able to modify the payloads.

    • Include the correlation keys in the list of data objects. To do this, select Show correlation keys, then, in the Data Objects tab, select Show as tree, expand the data object. If you select a correlation key, then the details section shows the correlation property that comprises the key. To reset the correlation key, select Reset.

      For information about correlation keys, see Chapter 24, "Communicating Business Processes Using Correlations".

    • Include process instance attributes in the list of data objects. To do this, select Show instance attributes, then, in the Data Objects tab, select Show as tree, then expand the data object, then expand Instance Attrtibutes. To display the details of a particular instance attribute, select the attribute. Note that only those instance attributes that can be modified appear as editable. Others are read-only.

    • Add any comments in the Comments field.

  2. Click one of the following:

    • Save to keep the process in the pending migration state.

    • Migrate to migrate the process and put it in the running state.

    • Cancel to return the process instance to its last saved state.

If, for some reason, the migration fails, the Migration Confirmation dialog box tells you why, as shown in Figure A-3.

Figure A-3 Migration Confirmation: Failure Message

Description of this graphic follows.
Description of "Figure A-3 Migration Confirmation: Failure Message"

A.2.2 How to Resume a Suspended Component

If a new implementation of the same composite revision is deployed, and the previously deployed composite has some components with the newer BPM process definition, then the affected components go into suspended state. To resume a suspended component, either migrate or suspend process instances that are in the pending migration state.

Unless you resume the component—either explicitly or automatically when all pending migration instance are resumed—the new task instances are not created as a result of the token having been moved.

All suspended components are listed in the Pending Components panel, as shown in the example in Figure A-4.

Figure A-4 Pending Components Panel in the Process Tracking Tab Page

Description of this graphic follows.
Description of "Figure A-4 Pending Components Panel in the Process Tracking Tab Page "

To resume a suspended component:

  1. From the Pending Components panel, select the component you want to resume. The Resume Component dialog box appears as shown in the example in Figure A-5. It tells you how many instances are pending migration for that component.

    Figure A-5 Resume Component Dialog Box

    Description of this graphic follows
    Description of "Figure A-5 Resume Component Dialog Box"

  2. In the Resume Component dialog box, choose whether you want the pending migration process instances to be:

    • Migrated as is

    • Suspended

    If there are instances that cannot be migrated-as-is, and you want to resume the component, then select Leave non-migrated instances as suspended. If you do not select this option, and there are instances that cannot be migrated as-is, then the component can not be resumed.

  3. Click Resume. The component is resumed and it no longer appears in the Pending Components panel. A Resume Component Confirmation dialog box tells you the result and how many instances are suspended. A new process instance can now be initiated and its requests will be processed.

    Note:

    You can initiate a process instance even if a component is suspended. In this case, however, the requests are queued and are not processed until the component is resumed.

A.3 What You May Need to Know About Redeploying a Process

If you are redeploying a process, and, during design time, the Keep running instance option is selected, then redeployment fails in the following scenarios:

  • Exclusive or inclusive gateway pair is removed

  • Inclusive-complex gateway pair is changed to inclusive-inclusive gateway pair

  • Subprocess is removed or its loop characteristic is changed

  • User task is moved to another branch in gateway pair or outside the gateway pair

  • Activity level is changed., for example, the activity is moved inside a subprocess or gateway structure

  • Subprocess or event subprocess or a call activity is added

  • Event subprocess is changed from interrupting to non-interrupting

  • Boundary event is changed from interrupting to no- interrupting

  • Boundary event is added

  • User task implementation is changed to use another human task

If you do not want redeployment to fail in these scenarios, then you must set the force.deploy flag manually by editing the composite.xml file in Oracle JDeveloper. To set force.deploy at the component level, enter the following:

<component name="T4">
 <property name="oracle.bpm.bpmn.force.deploy">true</property>
<implementation.bpmn src="processes/T4.bpmn"/>
</component>

To set the force.deploy at the composite level, you can use the same .xml element as a child of the composite element as shown in the example in Figure A-6.

Figure A-6 Setting the force.deploy Property in Oracle JDeveloper

Description of this graphic follows.
Description of "Figure A-6 Setting the force.deploy Property in Oracle JDeveloper"