Tuesday, December 10, 2013

Create a custom Case Activity in Oracle BPM Case Management

In one of my previous posts I highlighted the new case management functionalites in Oracle BPM Suite. Case management enables you to define the different activities - a user can perform to achieve a goal - without defining the workflow process. For more details about ACM I recommend to download our "Adaptive Case Management in Practice" poster and to read the following articles:


A case is always associated with activities which are performed as part of a particular case. Among milestones, data, events, stakeholders and documents the activities are a key element in Oracle BPM 11g Case Management. In the current release you can create case activities based on a BPM process, or a Human Task, or you can create a custom case activity based on a Java class. In this post I will explain the steps to create a custom case activity.

Create a Custom Case Activity


1. Create a new "BPM Application"
2. Create a new "BPM Project"
3. Create a "Composite with Case Management" component

The above steps will result in a composite with the case and its exposed service and case rules. Now you can open the case definition and define your milestones, stakeholders, permissions, data, user events and so on. See the step-by-step "Hello World" example for more details. The Custom Activity Java class must implement the oracle.bpm.casemgmt.caseactivity.ICaseActivityCallback interface. The callback class must be part of the composite (as explained below), or must add it to the workflow customization classpath.

4. Import the oracle.bpm.casemgmt.interface.jar from
<MW_HOME>/Oracle_SOA1/soa/modules/oracle.bpm.runtime_11.1.1/


5. Import the bpm-services.jar from
<MW_HOME>/Oracle_SOA1/soa/modules/oracle.soa.workflow_11.1.1/

6. Select File => New => Java Class and create the CustomCaseActivity Java class.


7. Organize imports and add your custom logic in the "initiate" operation.

package com.cattlecrew.acm.caseactivities;

import java.util.Map;

import oracle.bpm.casemgmt.CaseIdentifier;
import oracle.bpm.casemgmt.caseactivity.ICaseActivityCallback;
import oracle.bpel.services.bpm.common.IBPMContext;

public class CustomCaseActivity implements ICaseActivityCallback {
    public CustomCaseActivity() {
        super();
    }

    public String initiate(IBPMContext iBPMContext,
                           CaseIdentifier caseIdentifier, String string,
                           Map<String, Object> map) {
       
        // Add activity logic here
       
        return "Called class CustomCaseActivity for activity => " + string;
    }
}

8. Create the case activity based on the Java class. See chapter 31 of the Oracle Fusion Middleware Modeling and Implementation Guide for Oracle Business Process Management for more details about config options and guidelines.



9. Define your Business Rules.

10. Deploy and test the Case composite. 

12 comments:

  1. A case is always associated with activities which are performed as part of a particular case. Among milestones, case management software

    ReplyDelete
  2. Any good recommendations for a human services software? I'm considering the one by FamCare...

    ReplyDelete
  3. this is very nice article and very good information for Oracle Learners. our Cubtraining also provide all Oracle Courses

    ReplyDelete
  4. Nice post.Thank you so much for sharing. We are providing Best Oracle SOA Online Training. for more Visit ORACLE SOA Online Training

    ReplyDelete
  5. Thank you so much for sharing this Valuable information..Oracle SOA Online Training can reduce your costs and middleware complexity better than any other solution. Finally, it can help you to achieve the best total value of opportunity.

    ReplyDelete

  6. Vey very nice blog!!
    Hi there,I enjoy reading through your article post, I wanted to write a little comment to support you and wish you a good continuationAll the best for all your blogging efforts.

    Oracle Apps online Training

    MS Dynamics AX online Training

    ReplyDelete
  7. Thanks for the use full topic. Very useful information.
    We IT hub Online Training are good in giving the oracle soa Training


    ReplyDelete
  8. I need to complete this requirement in my Oracle BPM training by following your post I got confident in doing this thank you.The Lucidtechsystems providing IBM bpm training In Hyderabad.

    ReplyDelete
  9. It is very good and useful .Learned a lot of new things from your post!

    Good creation ,thanks for good info Oracle SOA Online Training

    ReplyDelete
  10. Hi Am new to BPM.. How to create a new case using the Java API ? Can you please point me the interface class and its method to create the new case using BPM JAVA API..

    Regards,
    Sajith

    ReplyDelete

  11. Thanks for sharing this great information I am impressed by the information that you have on this blog. Same as your blog i found another one Oracle SOA Interview Questions and Answers
    . Actually, I was looking for the same information on internet for
    Oracle SOA Training and came across your blog. I am impressed by the information that you have on this blog. It shows how well you understand this subject, you can learn more about Oracle SOA Tutorial also.

    ReplyDelete