38 Managing Oracle BPMN Service Components and Engines
Managing BPMN Process Service Component Policies
You can attach and detach policies to and from BPMN process service components in currently deployed SOA composite applications. Policies apply security to the delivery of messages. Oracle Fusion Middleware uses a policy-based model to manage web services.
Note:
Before attaching policies, see Administering Web Services for definitions of available policies and details about which ones to use in your environment.
To manage BPMN process service component policies:
-
Access this page through one of the following options:
From the SOA Infrastructure Menu... From the SOA Folder in the Navigator... Select Service Engines > BPMN.
-
Select soa-infra.
-
Right-click and select Service Engines > BPMN.
-
-
Go to the Composites column of the View table and select a specific SOA composite application to access its Dashboard page.
-
Click Policies.
The Policies page enables you to attach and detach policies to and from BPMN process service components. The policies table displays the attached policy name, the policy reference status (enabled or disabled) that you can toggle, the category (Management, Reliable Messaging, MTOM Attachment, Security, or WS Addressing), the violations, and the authentication, authorization, confidentiality, and integrity failures since the SOA Infrastructure was last restarted.
-
Click Attach/Detach.
If multiple components are available, you are prompted to select the service or component for which to perform the attachment or detachment.
-
Select the service or component to which to attach or detach a policy.
This invokes a dialog for attaching or detaching policies.
Policies currently attached appear in the Attached Policies section. Additional policies available for attachment appear in the Available Policies section.
-
Select to attach policies appropriate to your environment.
-
Click Attach.
-
When you are finished attaching policies, click Validate.
-
If an error message appears, make the necessary corrections until you no longer have any validation errors.
-
Click OK.
The attached policy is displayed in the policies table.
For more information, see the following documentation:
-
Managing SOA Composite Application Policies for the dialogs that display during policy attachment.
-
Administering Web Services for definitions of available policies and details about which ones to use for your environment.
Performing BPMN Process Service Engine Message Recovery
You can perform a manual recovery of undelivered invoke or callback messages due to a transaction rollback in the process instance. Recovery of invoke messages applies to asynchronous BPMN processes only. Synchronous BPMN processes return an error to the calling client and are not recoverable from this page.
Recoverable activities are activities that failed and can be recovered. For example, if you are using the file adapter to initiate an asynchronous BPMN process and your system crashes while the instance is processing, you can manually perform recovery when the server restarts to ensure that all message records are recovered.
Note:
If you encounter the error message ORA-01000: maximum open cursors exceeded
, then do the following:
-
Shut down the Oracle database.
-
Increase the value of
OPEN_CURSORS
to 1500. -
Restart the Oracle database.
To perform BPMN process service engine message recovery:
-
Access this page through one of the following options:
From the SOA Infrastructure Menu... From the SOA Folder in the Navigator... -
Select Service Engines > BPMN.
-
Right-click soa-infra.
-
Select Service Engines > BPMN.
-
-
Click Recovery.
The Recovery page displays the following details:
-
A utility for searching for a specific message failure by specifying criteria and clicking Search. Click the Help icon for details.
-
Message failure in the service engine, including the conversation ID, whether you can recover from the message failure, the service component and composite application in which the failure occurred, and the time at which the fault occurred.
-
-
Select a fault in the table.
-
Select one of the following options:
Action Description Recover
Retries the message in which the fault occurred.
If an asynchronous BPMN process encounters a transaction rollback scenario because of any underlying exception error, it rolls back to the last dehydration activity. If this is a new instance, and a receive activity was the first dehydration activity, the BPMN process service engine creates a recoverable invoke. When you click Recover to recover the invoke, the service engine creates a new instance. This instance may run to completion with no exception error. However, you continue to see the older instance identified as faulted.
Mark Cancelled
Marks the message so it is never delivered.
Once a message is submitted for recovery, the BPMN process service engine may take time to complete the action. This typically takes less than several seconds. During this time, the message remains visible in the Recovery page. Duplicate attempts to recover the same message in that period are ignored. Refresh the page every few seconds to receive the latest recovery status.
Migrating Instances Between Different Composite Application Revisions
Instance migration between revisions is based on flow instances instead of composite instances. For a set of flow instances and a composite type, all instances of the composite in each flow are migrated. A flow migration first obtains the component instances for the flow instance and composite type from each of the composite's associated service engines. The service engine is then requested to migrate each of those component instances, one at a time.
Note:
This feature is only applicable to Oracle BPMN projects that do not include asynchronous BPEL processes.
The reasons for migrating flow instances include the following:
-
Design or implementation errors are discovered in the initial revision of the process or potentially invalid data provided by external services has placed the process in a bad state.
-
Processes are taking too long to complete. For example, you may have flow instances that run for months or years. Because of this:
-
Changes may need to be applied while the flow instances are in-flight.
-
Changes are unknown beforehand so they cannot always be modeled as rules or short-lived subprocesses.
-
Regulation or policy changes (applying new or modified enforcement of policies) require additional steps to be added to all processes.
-
The following restrictions apply to flow instance migration:
-
Both composite revisions must be deployed.
-
Only running flow instances can be migrated. You cannot migrate completed, suspended, or faulted flow instances, except for Oracle Mediator, which can be in a faulted state and still successfully migrated.
-
Only compatible flow instances can be successfully migrated. Compatibility depends upon the compatibility of the associated service component in the composite. Nontrivial changes cannot be migrated.
-
There is a transaction boundary per flow instance. You typically operate on batches of flow instances related to a specific composite. Each flow instance is bound to a single transaction. Migration of one or more flow instances can fail without failing the entire batch.
Two migration methods are supported:
-
Automatic migration: For trivial changes between revisions. Each flow instance is bound to a single transaction. You can migrate a batch of flow instances.
-
Manual migration using a migration plan (Oracle BPM only): This is for nontrivial changes between revisions. The migration plan describes how to perform the migration.
Migration Compatibility
Composite migration compatibility depends on the service components defined inside the application. If changes to any service component are not compatible, then the entire flow instance is not eligible for migration. The SOA composite application flow instance is only migrated if the associated service component flow instances can be migrated.
The following service components are eligible for migration:
-
Nondurable BPEL processes
-
Oracle Mediator
-
Human workflow
-
Business rules
-
Oracle BPMN
The participating service engines are coordinated to migrate their respective flow instances. Flow instance tracking data is migrated to the new revision.
The flow instance must have at least one active component instance of the following states:
-
Running
-
Recovery required
-
Suspended
Table 38-1 describes how the following service component flow instances are migrated to a new flow instance. If not compatible, the overall flow instance migration is reported as incompatible, and you cannot migrate it.
Table 38-1 Service Component Flow Instance Migration Details
Service Component | Supported Migration Types | Migration Restrictions |
---|---|---|
BPEL process |
Automatic migration of BPEL process flow instances to a new revision |
|
Oracle Mediator |
Automatic migration of Oracle Mediator flow instances to a new revision |
Request-only, request-response, and sequential routing rules are the only supported message patterns. This means that only one-way and synchronous Oracle Mediator components are eligible for migration. Instances must be in one of the following states: completed successfully, faulted, or terminated by user. |
Human workflow |
Automatic migration of human workflow flow instances to a new revision |
None (all running and completed instances are migrated). |
Business rules |
Automatic migration of business rules to a new revision (there is no concept of rules flow instances) |
None. |
Oracle BPM |
Both manual (through use of a migration plan) and automatic migration of Oracle BPM flow instances to a new revision |
You cannot migrate flow instances between incompatible models. Examples of incompatible flow instances include:
Adding or removing activities means you must manually migrate them with a migration plan. |
Note:
Flow instance migration fails for an instance that includes an Oracle Mediator service component with parallel routing rules and an Oracle BPMN service component.
Migrating Instances with the ant Script
You must create an ant script to perform a migration. The script must import the $Middleware_Home
/soa/bin
/ant-flow-instance-migration.xml
script.
You can get help to create your ant script with the following command:
ant -f $Middleware_Home/soa/bin/ant-flow-instance-migration.xml help
The following elements are supported:
-
locatorConfig
: defines locator configuration -
locatorSession
: represents locator session -
flowInstanceFilterDef
: filter that selects the flow instances to migrate. This element supports the following attributes:-
id
(required) -
compositeDN
(required) -
flowId
-
pageStart
-
pageSize
-
tenantId
-
maxCreationDate
-
minCreationDate
-
maxModifyDate
-
minModifyDate
-
like
-
ecid
-
conversationId
-
compositeName
-
domainName
-
label
-
revision
-
title
-
-
generateFlowMigrationReport
: synchronously generates flow migration report -
migrateFlowInstances
: synchronously migrates flow instances
The code sample below shows an example of the ant-flow-instance-migration.xml
script.
<?xml version="1.0" encoding="iso-8859-1"?> <project name="migration-test1" basedir="." default="test"> <property name="env" environment="env" value="env"/> <property name="mw.ora.home" value="${env.MW_ORA_HOME}"/> <import file="${mw.ora.home}/bin/ant-flow-instance-migration.xml"/> <property name="reports.dir" value="${baseDir}/reports"/> <locatorConfig id="c1" host="localhost" port="7001" user="weblogic" password="weblogic1"/> <target name="test"> <flowInstanceFilterDef id="f3" compositeDN="default/SubProcess!1.0"/> <locatorSession configId="c1"> <generateFlowMigrationReport filterId="f3" revision="2.0" outputFile="${reports.dir}/ migrationReport.html"/> <migrateFlowInstances filterId="f3" revision="2.0" migrationPlan="${basedir}/ TaskRemovedInSubprocess-plan.xml" outputFile="${reports.dir}/ migrationResult.html"/> </locatorSession> </target> </project>
Example of Migrating a Revision Instance for Oracle BPM
This section provides an example of migrating a revision instance of the ReviewProcess composite that includes Oracle BPM. Because a human workflow approval task is removed in this example, a migration plan is required.
Figure 38-1 shows the instance flow for revision 1.0 of the composite. There are two human tasks in this revision of the composite, including VeryExpensiveUserReview, which is a time-consuming, user approval task.
Figure 38-1 Oracle BPM Instance Flow for Revision 1.0

Description of "Figure 38-1 Oracle BPM Instance Flow for Revision 1.0"
Figure 38-2 shows revision 1.0 of the composite in the SOA Composite Editor.
Figure 38-2 Composite Application for Revision 1.0

Description of "Figure 38-2 Composite Application for Revision 1.0"
Figure 38-3 shows the improved instance flow for revision 2.0 of the composite application.
The time-consuming VeryExpensiveUserReview human approval task has been removed. Instead, an automatic review with a service task is used. The service task delegates the review approval to an external web service.
Figure 38-3 Oracle BPM Instance Flow for Revision 2.0

Description of "Figure 38-3 Oracle BPM Instance Flow for Revision 2.0"
Figure 38-4 shows revision 2.0 of the composite application in the SOA Composite Editor.
Figure 38-4 Composite Application for Revision 2.0

Description of "Figure 38-4 Composite Application for Revision 2.0"
The following tasks occur during migration:
-
A new 2.0 revision is deployed, with an improved definition of ReviewProcess.
-
The new 2.0 revision runs side-by-side with the old 1.0 revision.
-
In-flight instances are migrated from one revision to another, as required.