BPM PS6: A first brush on the new Case Management functionality ps6 10

BPM PS6: A first brush on the new Case Management functionality

Case management is a way of modeling very flexible and data intensive business processes.

Case management enables you to handle unstructured, ad-hoc processes and their contents and information so that you can make optimal business decision. It focuses on unpredictable business processes which rely on worker knowledge and involve human participants. Case management relies on content and information that help the participants make a decision .

A case can be a collection of information, processes, tasks, rules, services. It requires the worker knowledge, their involvement and active collaboration.

Case management enables you to only define the different activities a user can perform to achieve a goal without defining the workflow process. However it supports dynamic workflows, structured processes and a combinations of both.

A case definition contains various case activities that represent the different work that the user can perform in the context of a case.
ps6_1

                              Case State Model

Creating a Case
ps6_2
ps6_3
ps6_4

Configuring a Case
BPM Studio creates the new case specified and displays it in the Case Editor so that you can configure it.

The case file has the .case extension. There is only one case file per BPM project.

General tab
In this tab you can configure the general properties of a case, the milestones and possible outcomes.
ps6_5

A case can define various milestones. Milestones represent the completion of a deliverable or a set of related deliverables. They are checkpoints that indicate the progress of a case. Stakeholders can use them to obtain a high level idea of the status of the case.

Outcomes are user defined values that are assigned to the case when it is completed. For example in a medical treatment case, the outcomes when it completes can be: treated, no follow up, misdiagnosed, chronic and untreatable.

Creating a Case Activity
A case activity represents a specific work in the context of a case.

Case activities are tasks that you can call from a case. Case activities can be a human task, a BPMN process or a custom case activity.

You can create case activities in the following ways:

  • Promote a BPMN process as case activity
  • Promote a Human Task as case activity
  • Create a custom case activity

The following attributes of a case activity define their behavior:

Automatic case activities are invoked automatically by the system. Manual case activities are available in the task library. Users can invoke manual activities from the library.

Repeatable case activities can be invoked more than once in a case. Non repeatable case activities can be invoked only once. Already invoked manual case activities do not appear in the library.

You must invoke Required activities at-least once before the case is closed.

Non-conditional manual activities are available in library by default until you invoke them. After invocation, repeatable activities are still shown in the library. Conditional manual activities are available in the library if they are activated through business rule. Non conditional automatic activities are invoked after Oracle Business Process Manager starts a case. Conditional automatic activities are invoked if they are activated by rules.

By default the task library contains the following case activities:

  • Simple Workflow to create simple human tasks. You can configure the task title, priority, due date, comment, assignment type and assignees. The supported assignment types are: simple, sequential, parallel, FYI.
  • E-mail Notifications to send email

All case activities can be rated (at the activity definition level) from values 1 to 5.

If you want a case activity to run after another case activity, then you must define a condition in the second activity that indicates it runs after the first activity completes.

You can create a case activity based on a BPMN process. This exposes the BPMN process as a case activity. A case activity is one single item that the case worker can perform.

When you create a case activity Oracle BPM Studio generates output arguments for all the arguments in the multiple end points of the BPMN process. However if you want to cover the input arguments of a process that contains multiple start points, then you must create a case activity for each of the start points.

The BPMN process must already exist. You can use synchronous and asynchronous BPMN processes. The case activity only supports message start and end points.

Promote a BPMN process to case activity
ps6_6
ps6_7
BPM Studio creates the case activity and opens it in the Case Activity editor so that you can configure it.ps6_8

Promote a Human Task to Case Activity
ps6_9
ps6_10

BPM Studio creates the case activity and opens it in the Case Activity editor so that you can configure it.
ps6_11

Create a Custom Case Activity
You can create a custom case activity based on a Java class.

Custom case activities enable users to create their own case activities, for example a schedulers. To the end user there is no difference from the other types of case activities.
ps6_12
ps6_13
The Java class must implement the oracle.bpm.casemgmt.caseactivity.ICaseActivityCallback interface.

The callback class must be part of the composite, or must add it to the workflow customization classpath.

BPM Studio creates the case activity and opens it in the Case Activity editor so that you can configure it.

Input parameters can be of the ‘Case data’ or ‘User input’ type. By default input parameters have the value of case data. You can change this to use user input if the input comes from the user.

You must also define the case data in the .case file. You must define case activity input/output parameters in the same order as of the BPMN process or Human Task. The name of the case data or the input/output data elements must match the name of the BPM process or Human Task argument elements. If the input parameter is of the type user input, then you can save this value as case data. You can save the value of output parameters as case data.To do this, the name of the case activity output parameter must match the root element name of the BPMN process or Human Task argument.
ps6_14

Configuring a Case Activity
You can edit a case activity using the Case Activity editor. After you create a case activity BPM Studio opens the case in the Case Activity editor for you to configure it.

You can configure the following basic properties for the case activity you created:

  • Automatic
  • Required
  • Repeatable
  • Conditionally Available

Global activities are custom case activities that are global and not part of any composite. They apply to all cases regardless of their type. They are identified by global flag true. You cannot design global activities using Oracle BPM Studio. You must add the callback Java class for a global activity to the workflow customization classpath.

After creating the global case activity you must register it using the registerCaseActivity class from the Oracle Fusion Middleware Business Process Management Suite Java API Reference. To do this you must unmarshall the case activity document and pass the CaseActivity as a parameter.

You can choose to store the case documents in an enterprise content manager. To do this you must configure the case with the enterprise content manager data.

Case documents are stored in the folder you specified while developing the case.To perform operations on documents, use the CaseStreamService.

Configure the case data
ps6_15

The document location is the folder in the enterprise content management system where all the documents related to the case instance are stored. This folder may contain other subfolders. The case document folder name is created by concatenating the parent folder name and the case instance folder name you provide.

Configure Enterprise Content Management

By default Oracle BPM Suite is configured to use an Oracle Database document store. You can use the following enterprise content managers for storing case documents:

  • Oracle UCM
  • Alfresco CMIS

Configuring Events

You can define custom events that represent manual actions that can happen while processing the case.

Case workers raise events to indicate that something occurred. The occurrence of an event may trigger the activation of a case activity or mark a milestone as completed. For example, if you are waiting for a fax in a case, when it arrived the case worker can raise an event indicating its arrival.

A case can define various events that represent the manual actions that can occur during the processing of the case.
ps6_16

Defining Stakeholder Permissions
ps6_17

You can define multiple stakeholders for each case you define. Only stakeholders can perform actions on case objects that are part of a case.

The administrator decides which actions each stakeholder can perform. By default, during deployment Oracle BPM grants stakeholders all the available permissions. After deployment the administrator can remove non-relevant permissions.

Future redeployments may add new stakeholder application roles and new permission tag roles, but the existing ones are not affected. Undeploying a case does not affect any grants or application roles.

Default Permissions by Case Object

Number Resource (Case Object) Allowed Actions
1 CASE READ, UPDATE
2 COMMENT READ, UPDATE
3 DOCUMENT READ, UPDATE
4 DATA READ, UPDATE
5 EVENT INVOKE
6 ACTIVITY INVOKE
7 MILESTONE READ, UPDATE
8 STAKEHOLDER READ, UPDATE
9 HEADER READ, UPDATE

Permissions enable you to define which users can update the case. Only users with read/write OPSS permission can see or update case objects tagged with permissions.

You can attach permissions to case objects such as documents and data.

You can define your own set of permissions. The UI shows the default permissions PUBLIC and RESTRICTED. You can modifiy these default permissions.
ps6_18

Using Business Rules
You can use business rules to decide which case activities to activate for automatic or manual initiation. You can also use rules to mark a milestone as achieved or revoked.

Oracle BPM fires business rules on every case event. Case events are logical events that occur while running the case. The following list enumerates the available case events:

Case Events that can fire a business rule

Name Description Attributes
CaseLifeCycleEvent Life cycle event state, lifecycleEvent
CaseMilestoneEvent Milestone event milestone, type
CaseActivityEvent Activity event activityName, type
CaseDataEvent Data event dataName
CaseDocumentEvent Document event document, documentName, type
CaseCommentEvent Comment event Comment
UserDefinedEvent User event eventName, event

The business rule dictionary created when you create the case is linked to a common base dictionary in Oracle MDS. The business rule dictionary of a case supports the following operations:

  • Automatically invoke conditional automatic activities from a business rule
  • Publish conditional manual activities to the task library from a business rule
  • Withdraw an activity from a business rule
  • Achieve and revoke milestones from a business rule

When you create a case, Oracle BPM automatically generates an associated business rule dictionary. This case business rule dictionary enables you to define business rules with rule conditions based on the case.

Table 31-3 Rule Functions

Rule Function Description Parameters
activateActivity(String activityName) Invokes conditional automatic case activities and conditional manual case activities. activityName: the name of the activity to invoke.
withdrawActivity(String activityName) Withdraws a case activity. activityName: the name of the activity to withdraw.
reachMilestone(String milestoneName, String comments) Marks a milestone as achieved. milestoneName: the name of the milestone to mark as achieved.

comments: a comment stating the reason to mark this milestone as achieved.revokeMilestone(String milestoneName, String comments)Revokes a milestone.milestoneName: the name of the milestone to revoke.

Any stakeholder can close a case. Closing a case is a logical operation that marks its status as closed. You can close a case by invoking the closeCase method in the CaseInstanceService class. You can provide an optional outcome parameter and a comment when you close a case.

Invoke a case from a BPMN process:
Add a service task that invokes the case and an operation
ps6_19

Available operations are: abortCase, closeCase, reopenCase, suspendCase, resumeCase, attainMilestone, revokeMilestone.

It depends on the operation which input and output variables must be set.
ps6_20
The case management engine publishes events to Oracle EDN. These events capture system and user events in the case. System events include case lifecycle, case activity lifecycle, milestone, document, and comment related events. You can design your process to listen to these events and react to them.

If you want to use correlations with a particular event, then you can trigger a BPMN process from a BPMN based case activity. You must pass the caseId to the message that initiates the process and use it as a correlation key.

At first sight the Case Management functionality seems the be very promising and I see a lot of possible opportunities in the project I’m currently working on.