Skip navigation links

Oracle Fusion Middleware
Java API Reference for Oracle BPM Suite
11g Release 1 (11.1.1.9.0)
E25378-09


oracle.bpm.casemgmt
Interface ICaseInstanceService

All Known Subinterfaces:
ICaseService

public interface ICaseInstanceService

Describe interface ICaseInstanceService here.


Method Summary
 boolean abortCase(IBPMContext context, CaseIdentifier caseIdentifier, Comment comment)
          Abort a case
 boolean addCaseStakeHolder(IBPMContext context, CaseStakeHolder caseStakeHolder)
          Add a case stake holder
 boolean addCaseStakeHolderMember(IBPMContext context, CaseStakeHolderMember caseStakeHolderMember)
          Add a case stake holder member
 boolean addComment(IBPMContext context, CaseIdentifier caseIdentifier, Comment comment)
          Add a comment
 boolean attainMilestone(IBPMContext context, CaseMilestone milestone)
          Attain a case milestone
 boolean closeCase(IBPMContext context, CaseIdentifier caseIdentifier, java.lang.String outcome, Comment comment)
          Close the case
 Case getCase(IBPMContext context, CaseIdentifier caseIdentifier, java.util.List<ICaseConstants.CaseInfo> additionalCaseInfo)
          Get a case instance
 java.util.List<CaseData> getCaseData(IBPMContext context, CaseIdentifier caseIdentifier)
          Get all case data
 CaseData getCaseDataByName(IBPMContext context, CaseIdentifier caseIdentifier, java.lang.String caseDataName)
          Get a specific case data by name
 java.util.List<CaseMilestone> getCaseMileStones(IBPMContext context, CaseIdentifier caseIdentifier)
          Get all case milestones
 java.util.List<CaseStakeHolder> getCaseStakeHolders(IBPMContext context, CaseIdentifier caseIdentifier)
          Get all case stakeholders
 java.util.List<Comment> getComments(IBPMContext context, CaseObject caseObject)
          Get all case comments
 CaseList queryCase(IBPMContext context, java.util.List<ICaseConstants.CaseInfo> additionalCaseInfo, java.lang.String addtionalJPQLWhereClause, java.lang.String orderBy, int pageSize, int pageNumber)
          Query case.
 boolean removeCaseStakeHolder(IBPMContext context, CaseStakeHolder caseStakeHolder)
          Remove a case stake holder and all its members
 boolean removeCaseStakeHolderMember(IBPMContext context, CaseStakeHolderMember caseStakeHolderMember)
          Remove a case stake holder member
 boolean reopenCase(IBPMContext context, CaseIdentifier caseIdentifier, Comment comment)
          Reopen a closed case
 boolean resumeCase(IBPMContext context, CaseIdentifier caseIdentifier, Comment comment)
          Resume a case
 boolean revokeMilestone(IBPMContext context, CaseMilestone milestone)
          Revoke a case milestone
 CaseIdentifier startCase(IBPMContext context, Case caseInstance)
          Start a case
 boolean suspendCase(IBPMContext context, CaseIdentifier caseIdentifier, Comment comment)
          Suspend a case
 boolean updateCaseHeader(IBPMContext context, CaseHeader caseHeader, Comment comment)
          Update case header
 boolean uploadCaseData(IBPMContext context, CaseData caseData)
          Upload case data

 

Method Detail

startCase

CaseIdentifier startCase(IBPMContext context,
                         Case caseInstance)
                         throws CaseServiceException
Start a case
 // How to set the creator of a case
  String createdByUser = 'jstein";
  caseInstance.getCaseHeader().setCreatedBy(createdByUser);
  // NOTE: There is no need to set the createdByDisplayName. This will be populated automatically.

  CaseIdentifier caseIdentifier = caseService.startCase(ctx, caseInstance);

  Order of precedence for creator:
  1) User set in the createdBy field
  2) User in the IBPMContext passed to startCase API
  3) Authenticated user in the subject (Identity propagation)

 
 
If the case is wired to a direct binding service in the SOA composite, this API call will reroute this request to the direct binding there by creating composite instance. If the case is not wired to a direct binding service, calling this API directly will result in a an exception.
Parameters:
context - an IBPMContext value
caseInstance - a Case value
Returns:
a CaseIdentifier value
Throws:
CaseServiceException - if an error occurs

getCase

Case getCase(IBPMContext context,
             CaseIdentifier caseIdentifier,
             java.util.List<ICaseConstants.CaseInfo> additionalCaseInfo)
             throws CaseServiceException
Get a case instance
Parameters:
context - an IBPMContext value
caseIdentifier - a CaseIdentifier value
Returns:
a Case value
Throws:
CaseServiceException - if an error occurs

queryCase

CaseList queryCase(IBPMContext context,
                   java.util.List<ICaseConstants.CaseInfo> additionalCaseInfo,
                   java.lang.String addtionalJPQLWhereClause,
                   java.lang.String orderBy,
                   int pageSize,
                   int pageNumber)
                   throws CaseServiceException
Query case. An example usage is given below.
 import java.util.List;
   import oracle.bpm.casemgmt.CaseList;
   import oracle.bpm.casemgmt.ICaseService;
   import oracle.bpm.casemgmt.persistence.model.Case;
   import oracle.bpm.casemgmt.persistence.model.CaseHeader;
   import oracle.bpm.client.BPMServiceClientFactory;
   ......

        ICaseService caseService = ..;
        IBPMContext context = ..;
        String orderBy = null; //default orderBy gets set to caseNumber
        int pageNum = ..;
        int pageSize = ..;

        // To query for only closed cases
        String addtionalJPQLWhereClause = " caseHeader.state = '" + ICaseConstants.CaseState.CLOSED.name() + "' ";
        if(query != null) {
            if("Name".equals(queryType)) {
                addtionalJPQLWhereClause = " and caseHeader.object_display_name like '%" + query + "%'";
            } else if("Title".equals(queryType)) {
                addtionalJPQLWhereClause = " and caseHeader.title like '%" + query + "%'";
            } else if("Creator".equals(queryType)) {
                addtionalJPQLWhereClause = " and caseHeader.createdBy like '" + query + "'";
            } if("IdentificationKey".equals(queryType)) {
                addtionalJPQLWhereClause = " and caseHeader.identificationKey = '" + query + "'";
            }
        }

        CaseList caseList = caseService.queryCase(context, null, addtionalJPQLWhereClause, pageSize, pageNum);

        List<Case> cases = caseList.getCases();
        int totalEntries = caseList.getTotalNumberOfCases();

        for (int i = 0; i < cases.size(); i++)
        {
            Case theCase = cases.get(i);
            CaseHeader caseHeader = theCase.getCaseHeader();

            String caseId = caseHeader.getCaseId();
            Long caseNumber = caseHeader.getCaseNumber();
            String title = caseHeader.getTitle();
            String createdBy = caseHeader.getCreatedByDisplayName();
            TimeStamp createdDate = caseHeader.getCreatedDate();
        }

 
 
Parameters:
context - an IBPMContext value
additionalCaseInfo - a List<ICaseConstants.CaseInfo> value
addtionalJPQLWhereClause - a String value
orderBy - a String value
pageSize - an int value
pageNumber - an int value
Returns:
a CaseList value
Throws:
CaseServiceException - if an error occurs

uploadCaseData

boolean uploadCaseData(IBPMContext context,
                       CaseData caseData)
                       throws CaseServiceException
Upload case data
Parameters:
context - an IBPMContext value
caseData - a CaseData value
Returns:
a boolean value
Throws:
CaseServiceException - if an error occurs

getCaseDataByName

CaseData getCaseDataByName(IBPMContext context,
                           CaseIdentifier caseIdentifier,
                           java.lang.String caseDataName)
                           throws CaseServiceException
Get a specific case data by name
Parameters:
context - an IBPMContext value
caseIdentifier - a CaseIdentifier value
caseDataName - a String value
Returns:
a CaseData value
Throws:
CaseServiceException - if an error occurs

getCaseData

java.util.List<CaseData> getCaseData(IBPMContext context,
                                     CaseIdentifier caseIdentifier)
                                     throws CaseServiceException
Get all case data
Parameters:
context - an IBPMContext value
caseIdentifier - a CaseIdentifier value
Returns:
a List<CaseData> value
Throws:
CaseServiceException - if an error occurs

closeCase

boolean closeCase(IBPMContext context,
                  CaseIdentifier caseIdentifier,
                  java.lang.String outcome,
                  Comment comment)
                  throws CaseServiceException
Close the case
Parameters:
context - an IBPMContext value
caseIdentifier - a CaseIdentifier value
outcome - a String value
comment - a Comment value
Returns:
a boolean value
Throws:
CaseServiceException - if an error occurs

addComment

boolean addComment(IBPMContext context,
                   CaseIdentifier caseIdentifier,
                   Comment comment)
                   throws CaseServiceException
Add a comment
Parameters:
context - an IBPMContext value
caseIdentifier - a CaseIdentifier value
comment - a Comment value
Returns:
a boolean value
Throws:
CaseServiceException - if an error occurs

getCaseMileStones

java.util.List<CaseMilestone> getCaseMileStones(IBPMContext context,
                                                CaseIdentifier caseIdentifier)
                                                throws CaseServiceException
Get all case milestones
Parameters:
context - an IBPMContext value
caseIdentifier - a CaseIdentifier value
Returns:
a List<CaseMilestone> value
Throws:
CaseServiceException - if an error occurs

attainMilestone

boolean attainMilestone(IBPMContext context,
                        CaseMilestone milestone)
                        throws CaseServiceException
Attain a case milestone
Parameters:
context - an IBPMContext value
milestone - a CaseMilestone value
Returns:
a boolean value
Throws:
CaseServiceException - if an error occurs

revokeMilestone

boolean revokeMilestone(IBPMContext context,
                        CaseMilestone milestone)
                        throws CaseServiceException
Revoke a case milestone
Parameters:
context - an IBPMContext value
milestone - a CaseMilestone value
Returns:
a boolean value
Throws:
CaseServiceException - if an error occurs

addCaseStakeHolder

boolean addCaseStakeHolder(IBPMContext context,
                           CaseStakeHolder caseStakeHolder)
                           throws CaseServiceException
Add a case stake holder
Parameters:
context - an IBPMContext value
caseStakeHolder - a CaseStakeHolder value
Returns:
a boolean value
Throws:
CaseServiceException - if an error occurs

addCaseStakeHolderMember

boolean addCaseStakeHolderMember(IBPMContext context,
                                 CaseStakeHolderMember caseStakeHolderMember)
                                 throws CaseServiceException
Add a case stake holder member
Parameters:
context - an IBPMContext value
caseStakeHolderMember - a CaseStakeHolderMember value
Returns:
a boolean value
Throws:
CaseServiceException - if an error occurs

removeCaseStakeHolder

boolean removeCaseStakeHolder(IBPMContext context,
                              CaseStakeHolder caseStakeHolder)
                              throws CaseServiceException
Remove a case stake holder and all its members
Parameters:
context - an IBPMContext value
caseStakeHolder - a CaseStakeHolder value
Returns:
a boolean value
Throws:
CaseServiceException - if an error occurs

removeCaseStakeHolderMember

boolean removeCaseStakeHolderMember(IBPMContext context,
                                    CaseStakeHolderMember caseStakeHolderMember)
                                    throws CaseServiceException
Remove a case stake holder member
Parameters:
context - an IBPMContext value
caseStakeHolderMember - a CaseStakeHolderMember value
Returns:
a boolean value
Throws:
CaseServiceException - if an error occurs

getCaseStakeHolders

java.util.List<CaseStakeHolder> getCaseStakeHolders(IBPMContext context,
                                                    CaseIdentifier caseIdentifier)
                                                    throws CaseServiceException
Get all case stakeholders
Parameters:
context - an IBPMContext value
caseIdentifier - a CaseIdentifier value
Returns:
a List<CaseStakeHolder> value
Throws:
CaseServiceException - if an error occurs

getComments

java.util.List<Comment> getComments(IBPMContext context,
                                    CaseObject caseObject)
                                    throws CaseServiceException
Get all case comments
Parameters:
context - an IBPMContext value
caseIdentifier - a CaseIdentifier value
Returns:
a List<Comment> value
Throws:
CaseServiceException - if an error occurs

abortCase

boolean abortCase(IBPMContext context,
                  CaseIdentifier caseIdentifier,
                  Comment comment)
                  throws CaseServiceException
Abort a case
Parameters:
context - an IBPMContext value
caseIdentifier - a CaseIdentifier value
comment - a Comment value
Returns:
a boolean value
Throws:
CaseServiceException - if an error occurs

suspendCase

boolean suspendCase(IBPMContext context,
                    CaseIdentifier caseIdentifier,
                    Comment comment)
                    throws CaseServiceException
Suspend a case
Parameters:
context - an IBPMContext value
caseIdentifier - a CaseIdentifier value
comment - a Comment value
Returns:
a boolean value
Throws:
CaseServiceException - if an error occurs

resumeCase

boolean resumeCase(IBPMContext context,
                   CaseIdentifier caseIdentifier,
                   Comment comment)
                   throws CaseServiceException
Resume a case
Parameters:
context - an IBPMContext value
caseIdentifier - a CaseIdentifier value
comment - a Comment value
Returns:
a boolean value
Throws:
CaseServiceException - if an error occurs

reopenCase

boolean reopenCase(IBPMContext context,
                   CaseIdentifier caseIdentifier,
                   Comment comment)
                   throws CaseServiceException
Reopen a closed case
Parameters:
context - an IBPMContext value
caseIdentifier - a CaseIdentifier value
comment - a Comment value
Returns:
a boolean value
Throws:
CaseServiceException - if an error occurs

updateCaseHeader

boolean updateCaseHeader(IBPMContext context,
                         CaseHeader caseHeader,
                         Comment comment)
                         throws CaseServiceException
Update case header
Parameters:
context - an IBPMContext value
caseHeader - a CaseHeader value
comment - a Comment value
Returns:
a boolean value
Throws:
CaseServiceException - if an error occurs

Skip navigation links

Oracle Fusion Middleware
Java API Reference for Oracle BPM Suite
11g Release 1 (11.1.1.9.0)
E25378-09


Copyright © 2009, 2015, Oracle and/or its affiliates. All rights reserved.