Thursday, August 08, 2024

Oracle Integration Gen2 PCS to Gen3 OPA Upgrade: Part 4

 In a series of articles, I will discuss some challenges you may face when upgrading Oracle Integration Gen2 (OIC 2) Process (PCS) to Gen3 (OIC 3) Oracle Process Automation (OPA) applications. In this episode I discuss the process instance and task  properties challenges. The previous article can be found here

Disclaimer: The below provides a snapshot at the time of writing. Things may have changed by the time you read it. It is also important to mention that this does not necessarily represent the view of Oracle.

For PCS to OPA migration you are also referred to the following:

 

In PCS there are a couple of commonly used properties for which you will have to make some adjustments in Oracle Process Automation (OPA) to get a similar result. For a process’s Start event the most common instance properties are:

  • instanceNumber : often used to persist as a reference to a running instance in some back-end application or database for use cases like programmatic instance abortion.
  • title : often used to fill out with some business key to support easy identification or search of instances in Workspace or programmatic search and check on duplicate or for abortion of a set of related instances.

The following example shows the PCS Workspace Processes tab with the instances having a customized task-title:


For a human task the most commonly used properties are:

  • On task creation
    • execData.title or Title property : often filled out with some task-specific title and business key combination to support easy identification or search of tasks in Workspace.
    • execData.shortSummary or Task Summary property : used to fill out with extra data (adding to what already is in the title) for advanced searches and/or with some key-value notation to populate custom columns in a custom task list.
    • execData.dueDate or Due Date property : used to notify users that a task should be done before a specific date and time.
    • expiryDate property : used to expire a task after a certain date and time has passed
    • priority : typically used to notifiy users about high priority tasks.
    • execData.identificationKey : used to fill out with a pre-determined unique id which is first persisted in some back-end application or database to support task handling using the /tasks API (for which the taskNumber cannot be used as that is only known to the process instance after the task has been completed).
  • On task completion (all often used to persist in a database for auditing reasons): 
    • execData.systemAttributes.taskNumber
    • execData.systemAttributes.updatedBy.displayName
    • execData.systemAttributes.updatedBy.id
    • execData.systemAttributes.updatedDate

See the following PCS Workspace My Tasks example with tasks having a customized title (green box) short summary (blue box), a priority (purple circle) and due date-time (red box)he task expiry is not visible in the task list:


For task creation, using execData elements often is preferred over using the task properties, as these elements can be mapped from any available process data object while the corresponding property's expression editor only has access to the task payload. But functionally it has the same result.

When upgrading/migrating an integration where the task properties like title, (short) summary, priority level, expiry, and due date are used, these are upgraded as expected. However, where you used execData elements instead, importing the PCS application into OPA results into a few validation errors.

For the process instance elements you may run into one or more of the following validation errors:

 

And for the task input mapping you may have a couple of validation errors similar to this:


And for the output mapping something like this:

 

Almost all these challenges can be remedied as described hereafter.
 

Process Instance Properties

The following table shows which OPA elements/properties that correspond with those of PCS.

PCS

Sample expression

OPA

Sample expression

Start event execData.title element

title + " for " + formArg.person.name

Start event > Instance > Title property (*)

"Update Summary for " + formArg.person.name

instanceNumber predefined variable

 

process.instanceId (**)

 

(*) Currently instance title property is only support for Form Start and not for Message Start.

(**) Note: the shorter PCS integer has now been replaced with the OPA, much longer string. When this is persisted somewhere, a modification might be necessary there as well.

 

Human Task Input Mapping

The following table shows which OPA elements/properties correspond with those of PCS.

PCS

Sample expression

OPA

Sample expression

input.taskExec.identificationKey element

"update-" + person.id

Not supported, consider using Start event > Instance > Business key

person.id

input.taskExec.title element

"Review " + person.name

Human Task Properties > End User Display > Title

Copy/paste expression

input.taskExec.shortSummary element

"Approve " + person.name + " with id " + person.id

Human Task Properties > End User Display > Summary

Copy/paste expression

input.taskExec.dueDate element

‘now’ + ‘1d'

Human Task Properties > End User Display > Due on

1d

 

Human Task Output Mapping

And the following table shows which OPA taskExec output elements correrspond with those of PCS.

PCS

OPA

output.taskExec.systemAttributes.taskNumber

output.taskExec.taskId

output.taskExec.systemAttributes.updatedBy.displayName

Not supported yet (*)

execData.systemAttributes.updatedBy.displayName

output.taskExec.approver

(*) Expected to be addressed in the August Release.

 

Result

When I now run this application, the process instances in Tracking look like this:

 

I used the instance’s person.id field as business key, which is visible in the instance list (green box).

Strange enough, the customized title is not visible in that view when the instance it is still running, nor can you search on it. However, when the instance is completed, it is visible and searchable (red box).

The instance id is not visible in the Tracking list view, but it is in the instance’s details (green box), and you can also search on it. Funny enough, the instance title is also visible in the details even when it is still running (blue box):

 

 The task list now looks like this:


You can see the priority indication (red box), the customized task title (green box), the instance-specific (and not task-specific) business key (purple box) and the due date (orange box). The expiry is only visible in the task detail's More Information tab:

 

The summary not visible anywhere but you can search on it (at least when using the API).

 

Next articles on the subject:

Previous articles on the subject:

No comments: