31 Working with Adaptive Case Management

This chapter describes how to create and configure a case management definition.

This chapter includes the following sections:

31.1 Introduction to Adaptive Case Management

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

You can use adaptive case management to model a pattern of work with the following characteristics:

  • Complex interaction of people, content and policies

  • Complex decision making and judgments

  • The progress of the case depends on user decisions, actions, events, and policies

  • Changes in runtime.

    For example, adding new stakeholders enables new actions.

  • Assignments are context driven.

    For example, assignments are based on the number of cases resolved by a certain analyst and the time it took them to resolve them.

Case management enables you to handle unstructured ad-hoc processes. It relies on the content and information of the process so that the user can make informed business decisions. It focuses on unpredictable business processes which rely on worker knowledge and involve human participants.

Case management involves:

  • People, often referred to as case workers or knowledge workers

  • Data

  • Documents

  • Collaboration

  • Reporting

  • History

  • Events

  • Policies

  • Processes

A case is a collection of information, processes, tasks, rules, services. It requires the worker's 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 combination 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. Oracle BPM allows you to define case activities based on:

  • a Human Task

  • a BPMN process

  • a custom Java class

31.1.1 Differences Between Adaptive Case Management and Business Processes

The main difference between adaptive case management and business processes is that adptive case management allows you to define the case flow at runtime, while business processes require you to define the flow at design time. Case management uses documents and context information to decide the flow of the case at runtime.

Table 31-1 describes the differences between adaptive case management and business processes.

Table 31-1 Differences between adaptive case management and business processes

Adaptive Case Management Business Process

Data centric

Process centric

Adhoc, unstructured progress of a case from creation to its final state

The process instance follows a predefined workflow

Non-deterministic, the case flow is dynamically determined at runtime

The process flow logic is defined at design time

The case consists of a collection of processes and isolated tasks

The flow logic is expressed in a process model

The flow is determined by objectives, the case workers choose actions to meet a certain goal

The flow is designed to automate and improve processes to increase efficiency

Knowledge work based

Routine work based

Collaborative environment

Collaboration requirements are not a priority

Strongly relies on documents

Uses structure data


31.1.2 Adaptive Case Management Key Concepts

The key artifacts in adaptive case management are:

  • Case: a collection of structured, semi-structured, un-structured processes, information and interactions used to make a business decision.

  • Case Model: models the definition of the case. The case has multiple attributes such as name, type, various milestones. It also has associations like the behavior container and root folder. The definition of the case is the collection of these attributes and associations.

  • Case Instance: a collection of documents, data and case activities that are used to process the case and audit the progress of the case.

  • Case Folder: the folders in the Content Management System where the case information is stored.

  • Case Data: the data of the case stored in the BPM Database.

  • Case Lifecycle: the case can be in one of the following states: active, aborted, closed.

  • 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.

  • Case Activity: is the work that can be performed in the context of a case. Case activities have various properties that enable you to define their behavior. Case activities can be mandatory, conditional, or optional. Case activities can be manual or automatic. Manual case activities require a case worker to initiate them while automatic case activities are initiated by the case runtime. You can implement case activities using a BPMN process, a Human Task or a custom java class.

  • Case Event: include case life cycle changes, case milestone changes, case activity changes and other manual case events. Manual case events are events modeled in the case corresponding to various manual actions that can occur during the case processing.

31.1.3 Use Cases

The following list shows examples of use cases where you can model your business process using adaptive case management:

  • Financial Services: loan origination, credit and debit card dispute management, financial crime management (suspicious activity reporting), wealth management, brokerage, trading, new business account opening, e-bank account opening, accounts payable, accounts receivable, and B2B order management.

  • Insurance: P&C claims processing, policy management, policy servicing, underwriting, fraud prevention, customer on-boarding.

  • Health Care: payer claims processing, policy and procedure management, virtual patient records management, member service management, provider service management, group sales management, health plan insight, clinical and operational insight.

  • Energy & Utilities: process safety management, FERC e-tariff, transmittal process, SOP processing.

  • Public Sector: citizen benefits eligibility and benefit's enrollment, grant management, public safety, tax and custom filling, court solution and judicial matters.

  • Human Resources: employee on-boarding, employee off-boarding, employee performance review, employee benefits administration.

  • Legal: contract management, legal matter management, auditing and compliance.

  • Customer Service: customer correspondence, call center, constituent services.

31.1.4 Case State Model

The following diagram shows the different states a case can go through since the user creates it until they close it.

Figure 31-1 Case State Model

This diagram shows the different states of a case.

31.2 Creating a Case

You can define only one case per BPM project. You can use an already existing BPM project or create a new one.

31.2.1 How to Create a Case

To create a case you must open an existing BPM project or create a new BPM project and then create the case. For more information on how to create a BPM project, see Section 2.2, "Creating and Working with Projects".

To create a case:

  1. Select File.

  2. Select New.

  3. Select BPM Tier.

  4. Select Create Case Management.

    The Create Case Management dialog appears.

  5. Enter a name to identify the case.

  6. Optionally, enter a namespace.

  7. Click OK.

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

31.3 Configuring a Case

Oracle BPM Studio allows you to configure the case you created using the Case editor. Figure 31-2 shows the Case Management Editor.

Figure 31-2 Case Management Editor


31.3.1 How to Edit a Case

You can edit a case using the Case editor. After you create a case BPM Studio opens the case in the Case editor for you to configure it. If you want to edit an existing case you must follow the steps described in this section.

To edit a case:

  1. Select the Application Navigator.

  2. Expand the project that contains the BPMN process.

  3. Expand the BPMN Content folder.

  4. Double click the case file.

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

  5. Edit one or more of the following:

31.4 Configuring the General Properties of a Case

When the case editor opens the General tab appears. In this tab you can configure the general properties of a case, the case permissions, add milestones and define possible outcomes.

31.4.1 How to Configure the General Properties

After you create a case you can configure some basic properties such as the title, priority and category.

To configure the general properties:

  1. Edit the case.

  2. Select the General tab.

  3. Provide a title for the case.

  4. From the Priority list, select a priority.

    The value of the priority varies from 1 to 5, being 1 the highest and 5 the lowest.

    Priority indicates the importance of the case so that the case worker can prioritize their work.

  5. Enter a category.

    Categories enable you to group similar cases together.

  6. Additionally you can configure permissions, add milestones and define the outcome.

    For more information on how to do this, see:

31.4.2 How to Add Milestones

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.

There is no direct activity or work associated with the milestone.

To add a milestone:

  1. Edit the case.

  2. Select the General tab.

  3. Expand the Milestones section.

  4. Click Add.

  5. Enter the name of the milestone.

  6. Click OK.

31.4.3 How to Define the Possible Outcomes

A case can define various possible outcomes.

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.

To define the possible outcome

  1. Edit the case.

  2. Select the General tab.

  3. Expand the Outcomes section.

  4. Click Add.

  5. Enter the name of the milestone.

  6. Click OK.

31.5 Creating a Case Activity

A case activity represents a specific work that the different case workers must perform in the context of the 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.

A case is composed of various case activities. You can create these case activities based on a BPM process, or a Human Task, or you can create a custom case activity.

You can create case activities in the following ways:

31.5.1 Case Activity Attributes

The following attributes of a case activity define their behavior:

  • Automatic/Manual

    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/Non-repeatable

    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.

  • Required/Non required

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

  • Conditional Availability

    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.

31.5.2 The Task Library

The task library shows all the available manual activities of a case. The task library also shows all the global activities. The availability of the case activity is also determined by its attributes and by whether it is already invoked or not.

31.5.3 Predefined Case Activities

By default the task library contains the following case activities:

  • Simple Workflow

    You can use this activity 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.

    You must pass the payload input to the method initiateCaseActivity with the key SimpleWFActivityPayload. You must use a payload from the schema in Section 31.18.1, "Simple Workflow Payload Schema".

  • E-mail Notifications

    You can use this activity to send an e-mail notification. You must configure the workflow notification with EMAIL for e-mail notifications to work properly.

    You must pass the payload input to the method initiateCaseActivity with the key EmailActivityPayload. You must use a payload from the schema in Section 31.18.2, "E-mail Notification Payload Schema".

    Note:

    You can only send case documents as attachments in global case activity e-mail notification activities. Documents located in your file system are not supported.

31.5.4 Rating a Case Activity

All case activities can be rated from values 1 to 5. The rating can be done at the activity definition level which applies to all cases or to a particular case instance.

In case of rating the activity definition, the average of all the ratings is displayed in library.

31.5.5 Specifying the Order of Case Activities

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.

For more information on defining conditions, see Section 31.15, "Using Business Rules".

31.5.6 How to Promote a BPMN Process to Case Activity

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.

To promote a BPMN process to case activity:

  1. Select the Application Navigator.

  2. Expand the project that contains the BPMN process.

  3. Expand the BPMN Content folder.

  4. Expand the processes folder.

  5. Right-click the BPMN process you want to promote to case activity.

  6. Select Promote as Case Activity.

    The Create Case Activity dialog appears.

  7. Enter a name to identify the case activity.

  8. Enter a display name to show in the case user interface.

  9. From the Operation Name list, select a start operation.

  10. To make the case activity synchronous, select the Synchronous checkbox.

  11. Click OK.

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

    By default Oracle BPM Studio creates the input and output parameters based on the BPMN process input and output arguments. If the BPMN process contains multiple end points, then it creates an output parameter for each of the output arguments of the multiple end points.

Note:

The case activity can pass input parameters to the underlying BPMN process. You can also configure the case activity to read the output arguments of the BPMN process and store their value.

For more information, see Section 31.6, "Defining Input Parameters for Case Activities"and Section 31.7, "Defining Output Parameters for a Case Activity".

31.5.7 How to View the BPMN Process

The Advanced tab shows the service reference and the operation used to create the case activity.

To view the human task operation:

  1. Open the case.

  2. Select the Advanced tab.

    Figure 31-3 shows the Advanced tab for a BPMN process based case activity.

  3. To open the BPMN process, click the service reference.

  4. To change the operation, click the Refresh button.

Figure 31-3 Advanced Tab of a BPMN Process Based Case Activity

This figure shows the Advanced Tab of a BPMN based case activity.

31.5.8 How to Promote a Human Task to Case Activity

You can create a case activity based on a Human Task.

The Human Task must already exist.

To promote a BPMN process to case activity:

  1. Select the Application Navigator.

  2. Expand the project that contains the Human Task.

  3. Expand the SOA Content folder.

  4. Right-click the Human Task you want to promote to case activity.

  5. Select Promote as Case Activity.

    The Create Case Activity dialog appears.

  6. Enter a name to identify the case activity.

  7. Enter a display name to show in the case user interface.

  8. Click OK.

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

    By default Oracle BPM Studio creates the input and output parameters based on the Human Task payload arguments.

Note:

The case activity can pass input parameters to the underlying Human Task. You can also configure the case activity to read the output parameters of the Human Task and store their value.

For more information, see Section 31.6, "Defining Input Parameters for Case Activities"and Section 31.7, "Defining Output Parameters for a Case Activity".

31.5.9 How to View the Human Task

The Advanced tab shows the Human Task used to create the case activity.

To view the human task operation:

  1. Open the case.

  2. Select the Advanced tab.

  3. To open the Human Task, click the service reference.

31.5.10 How to 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 scheduler. To the end user there is no difference from the other types of case activities.

To create a case activity:

  1. Select File.

  2. Select New.

    The New Gallery dialog appears.

  3. Select BPM Tier.

  4. Select Custom Case Activity.

    The Create Custom Case Activity dialog appears.

  5. Enter a name to identify the case activity.

  6. Enter a display name to show in the case user interface.

  7. In the Class Name field, enter the name of the Java callback class.

    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. For more information, see Oracle Fusion Middleware Business Process Composer User's Guide for Oracle Business Process Management.

  8. Click OK.

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

Note:

You can add input and output parameters to a custom case activity. You can assign input parameters the value of case data or user input. You can choose to store the value of output parameters as case data.

31.6 Defining Input Parameters for Case Activities

Input parameters can be of the following types:

  • Case data

  • User input

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. If you do not define the case data, Oracle BPM Studio creates a new case data of the required type when you create the case activity.

You must define case activity input parameters in the same order of the BPMN process or Human Task input arguments.

If the input parameter is of the type user input, then you can save this value as case data.

Figure 31-4 shows the input arguments of a BPMN process based case activity input parameters and the arguments of the start event of a BPMN process. Note that the name of the input parameters of the case activity matches the name of the arguments in the BPMN process.

Figure 31-4 BPMN Process Based Case Activity nput Parameters

This figure shows the input parameterss of a case activity and the input arguments of a BPMN process.

31.6.1 How to Add an Input Parameter

You can define the input parameters for a case activity.

To add an input parameter:

  1. Expand the Input section.

  2. Click Add.

  3. Enter a name to identify the parameter.

  4. Optionally select the Store Data option.

31.7 Defining Output Parameters for a Case Activity

By default Oracle BPM Studio creates the output arguments based on the BPMN process or Human Task arguments.

Only editable human workflow arguments appear as output arguments in a case activity.

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. After you create the case, you can change the name of the output parameters.

Figure 31-5 shows the output arguments of a BPMN process based case activity output parameters and the arguments of the end event of a BPMN process. Note that the name of the output parameters of the case activity matches the name of the arguments in the BPMN process.

You can save the output as case data. By default the Case Activity editor populates the case data fields, if a case data of same type is not available. Otherwise the Case Activity editor creates a new case data of the type in .case file.

Figure 31-5 BPMN Process Based Case Activity Output Parameters


31.7.1 How to Add an Output Parameter

You can define the output parameters for a case activity.

To add an output parameter:

  1. Expand the Output section.

  2. Click Add.

  3. Enter a name to identify the parameter.

  4. Enter a namespace.

  5. Optionally select the Store Data option.

31.8 Configuring a Case Activity

You can configure a case activity to behave in different ways during the case workflow by configuring the case activity properties.

31.8.1 How to Edit 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.

To edit a case activity:

  1. Select the Application Navigator.

  2. Expand the project that contains the BPMN process.

  3. Expand the BPMN Content folder.

  4. Double click the case activity file.

    The case file has the .caseactivity extension.

    The Case Activity editor appears.

  5. The Case Activity editor allows you to configure the following:

31.8.2 Configuring the Basic Properties

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

  • Automatic

  • Required

  • Repeatable

  • Conditionally Available

For a detailed description of these attributes, see Section 31.5.1, "Case Activity Attributes".

You can also add input and output parameters for the case activity. See Section 31.6.1, "How to Add an Input Parameter" and Section 31.7.1, "How to Add an Output Parameter".

31.9 Creating a Global Activity

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.

Section 31.18.3, "Example of Global Case Activity Metadata Schema"shows an example of the metadata for a global activity metadata. Note that the value of the isGlobal attribute is set to true.

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.

Example 31-1 shows how to register a global case activity.

Example 31-1 Registering a Global Case Activity

InputStream  is = classLoader.getResourceAsStream(<file>);
 
public static CaseActivity unmarshall(InputStream inputStream)
                                throws JAXBException, IOException {
       try {
           // create a document
           DOMParser p = new DOMParser();
           p.retainCDATASection(true);
           p.parse(inputStream);
           Document    doc = p.getDocument();
           
           JAXBContext jaxbContext = JAXBContext.newInstance(JAXB_CONTEXT);
           
           //return unmarshal(doc);
           return (CaseActivity) jaxbContext.createUnmarshaller().unmarshal(doc);
           
       } catch (oracle.xml.parser.v2.XMLParseException e) {
           throw new JAXBException(e);
       } catch (org.xml.sax.SAXException e) {
           throw new JAXBException(e);
       }
}
 
private static final String JAXB_CONTEXT = "oracle.bpm.casemgmt.metadata.activity.model";

31.10 Configuring Data Storage

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

31.10.1 Case Document Operations

A case can contain one or more related documents. Stakeholders can upload case documents that only other stakeholders with the appropriate permissions can view or delete. Case documents are stored in the folder you specified while developing the case.To perform operations on documents, use the CaseStreamService in the Oracle Fusion Middleware Business Process Management Suite Java API Reference.

31.10.2 Specifying Permission Tags for Case Documents

You can configure who can read and update documents using permission tags. For more information about permission tags, see Section 31.13, "Defining Tag Permissions".

You can specify permission tags in the following situations:

  • When creating a new document using the method uploadDocument() from the CaseDocumentStreamService class.

  • By changing the permission on an existing document using the method setPermissionTag() from the CaseService class, passing the appropriate value in the permission tag parameter.

The support for permission tags on documents depends on the type of document store:

  • Non Oracle Content Management Systems

    This feature is not supported for content management systems that are not Oracle Web Center Content.

  • BPM Database

    If you use BPM DB as the document store, then you can set permission tags on case documents without having to configure anything.

  • Oracle Web Center Content

    When you set a permission tag for a document this value is stored in the Metadata information field for the CaseManagementPermissionTag. You must create the information field before using permission tags on a document. To create the Information field, see Section 31.10.2.1, "Creating the Information Field in Oracle Web Center Content". When you try to set a permission tag on an existing document, it fails.

31.10.2.1 Creating the Information Field in Oracle Web Center Content

You must create the information field before using permission tags on a document. If you do not define this field, when you upload a document permission tags are not set.

To create the information field in Oracle Web Center Content:

  1. Start the Configuration Manager applet from the Admin Applets Page.

  2. Click on the Add… button.

  3. Enter CaseManagementPermissionTag in the Metadata Field Name field.

  4. Click OK.

  5. Ensure that the Require Value checkbox is not selected, then click OK to keep the default values.

    A new information field CaseManagementPermissionTag appears.

  6. Click Update Database Design to save the changes.

31.10.3 How to Configure Case Data

The data represents the payload of the case, it defines the input parameters of the case. The data represents part of the information in the case.

Note:

Case data created based on a XSD or a business object is not initialized with the default values defined in the XSD or business object.

To configure the case data:

  1. Edit the case.

  2. Select the Data & Documents tab.

  3. Expand the Data section.

  4. Click Add.

    The Add Data Dialog appears.

  5. Enter a name to identify the case data.

    The name is not unique. Different case data can have the same name.

  6. Select an element or a type.

    Note:

    Case data does not support simple data types, thus they do not appear in the list.

  7. If you want make the case data editable, select the Editable checkbox.

  8. Click OK.

31.10.4 How to Configure the Document Location

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.

To configure the documents location:

  1. Edit the case.

  2. Select the Data & Documents tab.

  3. Expand the Documents section.

  4. In the Parent Folder field, specify a base folder name for the case, using one of the following options:

    • Select By Name to provide the parent folder location using static text.

    • Select By Expression to provide the parent folder location using an XPATH expression.

    Note:

    The folder you provide must already exist.

  5. In the Case Instance Folder field, specify a folder name for each case instance, using one of the following options:

    • Select By Name to provide the parent folder location using static text.

    • Select By Expression to provide the parent folder location using an XPATH expression.

    Generally you do this using an XPATH expression.

    Note:

    The folder you provide must already exist.

  6. Optionally, select Create Case Instance Folder for Oracle BPM Suite to create a case folder in Enterprise Content Management store.

31.10.5 How to Configure Enterprise Content Management

By default Oracle BPM Suite is configured to use an Oracle Database document store. You can use the default configuration while developing your project if you do not have access to an enterprise content manager. This does not require any configuration in the Oracle SOA Server.

You can use the following enterprise content managers for storing case documents:

  • Oracle UCM

  • Alfresco CMIS

To use this content managers you must manually configure them using EM after installing BPM. For more information, see Oracle Fusion Middleware Administrator's Guide for Oracle SOA Suite and Oracle Business Process Management Suite.

The following list shows the configuration for the supported enterprise content managers:

  • Oracle UCM

    The endpoint URL must have the following format idc://ucm_host:4444

    The administrator user can be weblogic

  • Alfresco CMIS

    The endpoint URL must have the following format http://alfresco_host:8080/alfresco/service/cmis

    The administrator user can be weblogic

31.11 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.

31.11.1 How to Configure Events

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

To add an event:

  1. Edit the case.

  2. Select the Events tab.

  3. Click Add.

    The Add Event dialog appears.

  4. Enter a name to identify the event.

  5. Click OK.

    The new event appears in the Events section.

31.12 Defining Stakeholder Permissions

The permission model enables you to define stakeholder permissions and tag permission.

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.

Table 31-2 shows the default permissions by case object.

Table 31-2 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


31.12.1 How to Add Stakeholders

The stakeholders are the different persons involved in the processing of the case. They are case workers that can view the case and work on it.

Figure 31-6 shows the Stakeholders tab in the Case Management Editor.

To add a stakeholder:

  1. Edit the case.

  2. Select the Stakeholders tab.

  3. Click Add.

    The Add Stakeholder dialog appears.

  4. Enter a name to identify the stakeholder.

  5. From the Member Type list, select a member type.

  6. From the Value Type list, select how to define the value field.

  7. According to the selected value type, enter a static String or an XPATH expression to define the value.

    This value specifies the actual user acting as a stakeholder. It specifies the actual user, group or role processing the case.

  8. Click OK.

    The new event appears in the Events section.

Note:

When you remove a stakeholder, the underlaying role in the organization is not removed.

Figure 31-6 Stakeholder Tab in Case Management Editor

This graphic shows the Stakeholders tab in the Case Management Editor.

31.12.2 How to Add Permissions

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 modify these default permissions.

Some examples of regularly used permissions are: internal, public, press release.

Note:

E-mail and simple workflow are global case activities thus their permission tag is global.

To add a permission:

  1. Edit the case.

  2. Select the General tab.

  3. Expand the Permissions section.

  4. Click Add.

  5. Enter a name to identify the permission.

  6. Click OK.

31.12.3 How to Manage Permissions

You can manage the permissions assigned to each stakeholder using Oracle Enterprise Manager.

To manage permissions:

  1. In Oracle Enterprise manager from Weblogic Domain, right click soainfra, then select Security and then select Application Policies.

  2. In the Application Policies page, run a search with the following search criteria:

    1. In the Application Stripe field, enter OracleBPMPRocessRolesApp.

    2. In the Principal Type field, enter Application Role.

    3. In the Name Starts With field, enter the name of the case or leave it blank.

  3. From the search result, select one of the application roles corresponding to the stakeholder whose permissions you want to edit.

  4. Click the Edit button.

    The Edit Application Grant dialog appears.

  5. From the Permissions table, select a permission and click Edit.

Note:

Oracle Enterprise Manager does not validate action strings so you must provide the exact action string.

Note:

To assign multiple actions, separate them with commas without spaces. For example: READ,UPDATE.

31.13 Defining Tag Permissions

Stakeholders can assign additional permissions to case objects during runtime. For this option to be available when you design the case in Oracle BPM Studio, you must create the permission tags. For example: You can define a case with the following permission tags: PUBLIC, RESTRICTED, HIGHLY_CONFIDENTIAL.

During deployment Oracle Business Process Manager creates the application roles that correspond to the permission tags defined in the case.

For example, in a case named EURent, if you use the EURent.RESTRICTED.UPDATE action to grant a user the role EURent.RESTRICTED.UPDATE.Role, you can assign a document the RESTRICTED permission tag. Then only users with the role EURent.RESTRICTED.READ.Role can access that document.

Note:

Tag permissions work together with stakeholder permissions. For example: to read or update a case object a stakeholder must have the READ/UPDATE permission and the case object must have the appropriate tags that allow reading or updating it.

For more information about stakeholder permissions, see Section 31.12, "Defining Stakeholder Permissions".

31.13.1 How to Manage Tag Permissions

  1. In Oracle Enterprise manager from Weblogic Domain, right click soainfra, then select Security and then select Application Policies.

  2. In the Application Policies page provide the following:

    1. In the Application Stripe field, enter OracleBPMPRocessRolesApp.

    2. In the Name Starts With field, enter the name of the case or leave it blank.

  3. In the Application Roles page, select a permission tag role then click Edit.

    The Edit Application Role dialog appears.

  4. Click Add to add user, groups, or application role members to this application role.

31.14 Localizing a Case

You can configure a case to use different languages when displaying in the user interface.

You can localize the following artifacts of a case:

  • case title

  • case category

  • milestone name

  • outcome

  • data

  • user event

  • stakeholder

  • permission

All these artifacts except for case title and case categories, enable you to define a display name. The display name is stored in the default locale resource bundle.

Note:

Multiple artifacts may have the same display name. However try to use display names that are descriptive and help the user quickly identify the displayed data.

Figure 31-7 shows the creation dialog for a milestone that enables you to configure the display name.

Figure 31-7 Display Name Configuration

This figure shows the creation dialog for a milestone.

Case Title

You can specify the case title using plain text or the translation option. When you choose the translation option you must define the following:

  • the key in the resource bundle

  • the text to translate

  • the parameters to make the title dynamic, if applicable

Figure 31-8 shows a title specified using the translation option. In this example the key in the resource bundle is CaseTitle. The text to be translated contains two parameters: Car rental for %1 %2. The parameters value is specified in the Argument table.

Figure 31-8 Case Title Localization Dialog

This figure shows the localization dialog for the case title.

Case Category

You can specify the case category using plain text or the translation option. The translation option only supports a simple translation string.

31.14.1 How to Configure Localization

You can specify and localize each of the keys defined in a case.

To add a localization key:

  1. Edit the case.

  2. Select the Translation tab.

  3. Expand the Translation section.

    The Translation editor appears.

    Figure 31-9 shows the Translation editor.

  4. Click Add.

  5. Enter a name to identify the key.

  6. Enter a value for the default language.

  7. Enter a translation for the specified languages.

Figure 31-9 Translation Editor

This figure shows the Translation editor.

31.14.2 Localizing Case Objects

The following classes are subtypes of the class CaseObject:

  • CaseData

  • CaseDocumentObject

  • CaseEvent

  • CaseHeader

  • CaseMilestone

  • CaseStakeHolder

  • Comment

  • DatabaseDocument

The class CaseObject contains the following attributes that are shared with its subtypes:

  • Id

  • CaseId

  • ObjectName

  • ObjectDisplayName

  • ObjectType

  • UpdatedBy

  • UpdatedByDisplayName

  • UpdatedDate

  • PermissionTag

From this list, ObjectDisplayName contains the localized value of ObjectName, and UpdatedByDisplayName contains the localized value of UpdatedBy

Note:

Initially UpdateBy and UpdatedByDisplayName contain the name of the user that created the CaseObject. After the user updates the case, these fields contain the name of the user that last updated the case.

31.15 Using Business Rules

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

When you create a case, Oracle BPM Studio automatically generates an associated business rule dictionary.

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:

  • Life cycle events

  • Milestone events

  • Activity events

  • Data events

  • Document events

  • Comment events

  • User events

31.15.1 Defining the Condition of a Business Rule

You can define the condition of the business rule base on the following:

  • The event that fired the business rule

    Table 31-3 describes the different events that can fire a business rule.

  • The case instance

  • Case data

    The case data configured in the case is available as facts in the business rule dictionary. You can create rules based on case data combined with case management related facts.

Table 31-3 Case Events

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


Figure 31-10 shows the facts you can use to define the condition of a business rule based on a case Management system related data.

Figure 31-10 Business rule facts

This figure shows the business rule facts.

31.15.2 Understanding the Business Rule Dictionary in a Case

The business rule dictionary created when you create the case is linked to a common base dictionary in Oracle MDS. The common base dictionary includes all the facts show in Figure 31-10. The base dictionary name is CaseManagementBaseDictionary.

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

For a detailed description of the functions used to perform these operations, see Table 31-4.

31.15.3 How to Generate a Case Business Rule Dictionary

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.

To generate a case business rule dictionary:

  1. Create a case.

    For information on how to create a case, see Section 31.2.1, "How to Create a Case".

    The case rule dictionary appears.

  2. Open the case business rule dictionary.

  3. Create business rules according to your business requirements.

    Table 31-4 shows the different functions you can use when creating the business rule conditions.

Table 31-4 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.

comments: a comment stating the reason to revoke this milestone.


31.16 Closing a Case

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.

You can close a case regardless of its current state and the state of its case activities.

Closing a case sets it state to CLOSED. The list of cases for a user that you obtain using the queryCase API it includes closed cases.

Note:

You can still achieve and revoke milestones after you close or suspend a case.

31.17 Integrating with Oracle BPM

You can integrate with Oracle BPM by invoking a case from a BPMN process or by publishing case events to Oracle EDN and creating a process that reacts to these events.

31.17.1 Invoking a Case From a BPMN Process

You can invoke a case from BPMN process.

To invoke a case from a BPMN process:

  1. Add a service task to the BPM process.

  2. Right-click the service task.

  3. Select Properties.

  4. Click the Implementation tab.

  5. In the Service Call section, click the browse button next to the Service field.

  6. Select the case.

  7. Select an operation from the Operation list.

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

  8. Using data associations, assign a value to the attributes case ID and comment. In the case of milestone operations, also assign a value to the milestone attribute.

    For more information about data associations, see Part II, "Introduction to the Data Association Editor".

    Note:

    The case ID is available as a predefined variable that is automatically assigned a value when you invoke a BPMN process from a case.

31.17.2 How to Publish Case Events

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. For more information on how to use events in Oracle BPM, see Part V, "How to Configure Your Process React to a Specific Signal".

To publish case events:

  1. Open the case in the Case Editor.

  2. Select the User Events tab.

  3. Select Publish Case Events.

Note:

The case event definition is available at oramds:/soa/shared/casemgmt/CaseEvent.edl

To view the case event schema, see Section 31.18.4, "CaseEvent.edl".

31.17.3 How to Use Correlations with Case Events

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.

To use correlations with case events:

  1. Create a BPMN process that contains a send task that triggers another process.

  2. Edit the data association of the process you created to assign the value of the predefined variable caseId to the argument of the send task.

  3. Promote the BPMN process to a case activity.

  4. Create a BPMN process that listens to the correlated events.

    You can start this process with a message start event and use a message catch to receive the correlated event.

  5. Edit the properties of the message start event and define an argument CaseId.

  6. Edit the correlation definition and configure it to use the argument CaseId. Select the initiates option.

  7. Edit the properties of the message catch event and configure the correlation definition to use the CaseId variable.

31.18 Schema Reference

This section contains the following schemas:

31.18.1 Simple Workflow Payload Schema

Example 31-2

<?xml version="1.0" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns:extension="http://xmlns.oracle.com/bpm/case/metadata/extension"
            xmlns="http://xmlns.oracle.com/bpm/case/activity/custom"
            targetNamespace="http://xmlns.oracle.com/bpm/case/activity/custom"
            xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" jaxb:version="2.0"
            elementFormDefault="qualified" blockDefault="#all">
 <xsd:annotation>
  <xsd:documentation>Simple WF Activity Schema</xsd:documentation>
  <xsd:appinfo>
   <jaxb:schemaBindings>
    <jaxb:package name="oracle.bpm.casemgmt.customactivity.simplewf.model"/>
   </jaxb:schemaBindings>
   <jaxb:globalBindings generateElementClass="true" generateIsSetMethod="true">
    <jaxb:serializable uid="123456"/>
   </jaxb:globalBindings>
  </xsd:appinfo>
 </xsd:annotation>
 <xsd:import namespace="http://xmlns.oracle.com/bpm/case/metadata/extension"
             schemaLocation="ExtensibleElements.xsd"/>
 
<xsd:element name="SimpleWorkflowPayload" type="tSimpleWorkflowPayload"/>
 
<xsd:complexType name="tSimpleWorkflowPayload">
  <xsd:complexContent>
    <xsd:extension base="extension:tExtensibleElements">
       <xsd:sequence>
         <xsd:choice minOccurs="1" maxOccurs="1">
           <xsd:element name="simpleAssignmentType" type="tSimpleAssignmentType"/>
           <xsd:element name="sequentialAssignmentType" type="tSequentialAssignmentType"/>
           <xsd:element name="parallelAssignmentType" type="tParallelAssignmentType"/>
           <xsd:element name="fyiAssignmentType" type="tFyiAssignmentType"/>
         </xsd:choice>
         <xsd:element name="title" type="xsd:string" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="dueDate" type="xsd:date" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="priority" type="xsd:integer" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="comment" type="xsd:string" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="payloadType" type="tPayloadType" minOccurs="0" maxOccurs="1"/>
       </xsd:sequence>
    </xsd:extension>
  </xsd:complexContent>
</xsd:complexType>
 
<xsd:complexType name="tSimpleAssignmentType">
   <xsd:complexContent>
    <xsd:extension base="extension:tExtensibleElements">
      <xsd:sequence>
         <xsd:element name="assigneeType" type="tAssigneeType" minOccurs="1" maxOccurs="1"/>
      </xsd:sequence>
    </xsd:extension>
 </xsd:complexContent>
</xsd:complexType>
 
<xsd:complexType name="tSequentialAssignmentType">
    <xsd:complexContent>
     <xsd:extension base="extension:tExtensibleElements">
       <xsd:sequence>
          <xsd:element name="assigneeType" type="tAssigneeType" minOccurs="1" maxOccurs="unbounded"/>
       </xsd:sequence>
     </xsd:extension>
    </xsd:complexContent>
</xsd:complexType>
 
<xsd:complexType name="tFyiAssignmentType">
    <xsd:complexContent>
     <xsd:extension base="extension:tExtensibleElements">
        <xsd:sequence>
             <xsd:element name="assigneeType" type="tAssigneeType" minOccurs="1" maxOccurs="unbounded"/>
        </xsd:sequence>
     </xsd:extension>
    </xsd:complexContent>
</xsd:complexType>
 
<xsd:complexType name="tParallelAssignmentType">
    <xsd:complexContent>
     <xsd:extension base="extension:tExtensibleElements">
        <xsd:sequence>
          <xsd:element name="assigneeType" type="tAssigneeType" minOccurs="1" maxOccurs="unbounded"/>
          <xsd:element name="defaultOutcome" type="tOutcomeTypeEnum" minOccurs="1" maxOccurs="1"/>
          <xsd:element name="completionCriteriaType" type="tCompletionCriteriaType" minOccurs="1" maxOccurs="unbounded"/>
        </xsd:sequence>
        <xsd:attribute name="waitForAllVotes" type="xsd:boolean"/>
      </xsd:extension>
    </xsd:complexContent>
</xsd:complexType>
 
<xsd:complexType name="tCompletionCriteriaType">
 <xsd:complexContent>
  <xsd:extension base="extension:tExtensibleElements">
   <xsd:sequence>
      <xsd:element name="outcome" type="tOutcomeTypeEnum" minOccurs="1" maxOccurs="1"/>
      <xsd:element name="outcomePercentage" type="xsd:integer" minOccurs="1" maxOccurs="1"/>
   </xsd:sequence>
  </xsd:extension>
 </xsd:complexContent>
</xsd:complexType>
 
<xsd:simpleType name="tOutcomeTypeEnum">
    <xsd:restriction base="xsd:string">
        <xsd:enumeration value="APPROVE"/>
        <xsd:enumeration value="REJECT"/>
    </xsd:restriction>
</xsd:simpleType>
 
<xsd:complexType name="tAssigneeType">
    <xsd:complexContent>
     <xsd:extension base="extension:tExtensibleElements">
       <xsd:sequence>
           <xsd:element name="identityName" type="xsd:string" minOccurs="1" maxOccurs="1"/>
           <xsd:element name="identityType" type="tIdentityTypeEnum" minOccurs="1" maxOccurs="1"/>
       </xsd:sequence>
     </xsd:extension>
   </xsd:complexContent>
</xsd:complexType>
 
<xsd:simpleType name="tIdentityTypeEnum">
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="USER"/>
      <xsd:enumeration value="GROUP"/>
      <xsd:enumeration value="APPROLE"/>
    </xsd:restriction>
</xsd:simpleType>
 
 
<xsd:complexType name="tPayloadType">
    <xsd:complexContent>
     <xsd:extension base="extension:tExtensibleElements">
       <xsd:sequence>
           <xsd:element name="parameter" type="tParameterType" minOccurs="1" maxOccurs="unbounded"/>
       </xsd:sequence>
     </xsd:extension>
    </xsd:complexContent>
</xsd:complexType>
 
 
<xsd:complexType name="tParameterType">
    <xsd:complexContent>
     <xsd:extension base="extension:tExtensibleElements">
       <xsd:sequence>
           <xsd:element name="name" type="xsd:string" minOccurs="1" maxOccurs="1"/>
           <xsd:element name="value" type="xsd:string" minOccurs="1" maxOccurs="1"/>
       </xsd:sequence>
     </xsd:extension>
    </xsd:complexContent>
</xsd:complexType>
 
</xsd:schema>

31.18.2 E-mail Notification Payload Schema

Example 31-3 E-mail Notification Payload Schema

<?xml version="1.0" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns:extension="http://xmlns.oracle.com/bpm/case/metadata/extension"
            xmlns="http://xmlns.oracle.com/bpm/case/activity/custom"
            targetNamespace="http://xmlns.oracle.com/bpm/case/activity/custom"
            xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" jaxb:version="2.0"
            elementFormDefault="qualified" blockDefault="#all">
 <xsd:annotation>
  <xsd:documentation>Email Activity Schema</xsd:documentation>
  <xsd:appinfo>
   <jaxb:schemaBindings>
    <jaxb:package name="oracle.bpm.casemgmt.customactivity.notification.model"/>
   </jaxb:schemaBindings>
   <jaxb:globalBindings generateElementClass="true" generateIsSetMethod="true">
    <jaxb:serializable uid="123456"/>
   </jaxb:globalBindings>
  </xsd:appinfo>
 </xsd:annotation>
 <xsd:import namespace="http://xmlns.oracle.com/bpm/case/metadata/extension"
             schemaLocation="ExtensibleElements.xsd"/>
 
 <xsd:element name="emailPayload" type="tEmailPayload"/>
  <xsd:complexType name="tEmailPayload">
   <xsd:complexContent>
    <xsd:extension base="extension:tExtensibleElements">
     <xsd:sequence>
       <xsd:element name="from" type="xsd:string" minOccurs="1" maxOccurs="1"/>
       <xsd:element name="to" type="xsd:string" minOccurs="1" maxOccurs="1"/>
       <xsd:element name="replyTo" type="xsd:string" minOccurs="0" maxOccurs="1"/>
       <xsd:element name="cc" type="xsd:string" minOccurs="0" maxOccurs="1"/>
       <xsd:element name="bcc" type="xsd:string" minOccurs="0" maxOccurs="1"/>
       <xsd:element name="subject" type="xsd:string" minOccurs="0" maxOccurs="1"/>
       <xsd:element name="message" type="xsd:string" minOccurs="0" maxOccurs="1"/>
       <xsd:element name="attachments" type="tAttachment" minOccurs="0" maxOccurs="unbounded"/>
     </xsd:sequence>
    </xsd:extension>
  </xsd:complexContent>
 </xsd:complexType>
 
 <xsd:complexType name="tAttachment">
  <xsd:complexContent>
   <xsd:extension base="extension:tExtensibleElements">
    <xsd:sequence>
       <xsd:element name="name" type="xsd:string" minOccurs="1" maxOccurs="1"/>
       <xsd:element name="mimeType" type="xsd:string" minOccurs="1" maxOccurs="1"/>
    </xsd:sequence>
   </xsd:extension>
  </xsd:complexContent>
 </xsd:complexType>
</xsd:schema>

31.18.3 Example of Global Case Activity Metadata Schema

Example 31-4 Example of Global Case Activity Metadata Schema

<caseActivity targetNamespace="http://xmlns.oracle.com/bpm/case/activity"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://xmlns.oracle.com/bpm/case/activity ../../../../../interface/src/main/resources/schemas/CaseActivity.xsd"
              xmlns="http://xmlns.oracle.com/bpm/case/activity">
 <documentation xmlns="http://xmlns.oracle.com/bpm/case/metadata/extension"/>
 <name>SimpleWorkflowActivity</name>
 <activityDefinitionId>http://xmlns.oracle.com/bpm/case/activity/SimpleWFActivityDefinition</activityDefinitionId>
 <activityType>CUSTOM</activityType>
 <repeatable>true</repeatable>
 <required>false</required>
 <manual>true</manual>
 <isGlobal>true</isGlobal>
 <isConditional>false</isConditional>
 <caseAssociations>
   <documentation xmlns="http://xmlns.oracle.com/bpm/case/metadata/extension"/>
   <allCases/>
  </caseAssociations>
 <globalActivity>
  <definition>
   <documentation xmlns="http://xmlns.oracle.com/bpm/case/metadata/extension"/>
   <className>oracle.bpm.casemgmt.customactivity.simplewf.SimpleWFActivityCallback</className>
  </definition>
 </globalActivity>
</caseActivity>

31.18.4 CaseEvent.edl

Example 31-5 CaseEvent.edl

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<definitions xmlns="http://schemas.oracle.com/events/edl" targetNamespace="http://xmlns.oracle.com/bpm/case/event">
    <schema-import location="oramds:/soa/shared/casemgmt/CaseEvent.xsd" namespace="http://xmlns.oracle.com/bpm/case/event"/>
    <event-definition name="CaseEvent">
        <content xmlns:ns0="http://xmlns.oracle.com/bpm/case/event" element="ns0:caseEvent"/>
    </event-definition>
</definitions>