|
Oracle Fusion Middleware Java API Reference for Oracle BPM Suite 11g Release 1 (11.1.1.9.0) E25378-09 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 |
---|
CaseIdentifier startCase(IBPMContext context, Case caseInstance) throws CaseServiceException
// 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.context
- an IBPMContext
valuecaseInstance
- a Case
valueCaseIdentifier
valueCaseServiceException
- if an error occursCase getCase(IBPMContext context, CaseIdentifier caseIdentifier, java.util.List<ICaseConstants.CaseInfo> additionalCaseInfo) throws CaseServiceException
context
- an IBPMContext
valuecaseIdentifier
- a CaseIdentifier
valueCase
valueCaseServiceException
- if an error occursCaseList queryCase(IBPMContext context, java.util.List<ICaseConstants.CaseInfo> additionalCaseInfo, java.lang.String addtionalJPQLWhereClause, java.lang.String orderBy, int pageSize, int pageNumber) throws CaseServiceException
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();
}
context
- an IBPMContext
valueadditionalCaseInfo
- a List<ICaseConstants.CaseInfo>
valueaddtionalJPQLWhereClause
- a String
valueorderBy
- a String
valuepageSize
- an int
valuepageNumber
- an int
valueCaseList
valueCaseServiceException
- if an error occursboolean uploadCaseData(IBPMContext context, CaseData caseData) throws CaseServiceException
context
- an IBPMContext
valuecaseData
- a CaseData
valueboolean
valueCaseServiceException
- if an error occursCaseData getCaseDataByName(IBPMContext context, CaseIdentifier caseIdentifier, java.lang.String caseDataName) throws CaseServiceException
context
- an IBPMContext
valuecaseIdentifier
- a CaseIdentifier
valuecaseDataName
- a String
valueCaseData
valueCaseServiceException
- if an error occursjava.util.List<CaseData> getCaseData(IBPMContext context, CaseIdentifier caseIdentifier) throws CaseServiceException
context
- an IBPMContext
valuecaseIdentifier
- a CaseIdentifier
valueList<CaseData>
valueCaseServiceException
- if an error occursboolean closeCase(IBPMContext context, CaseIdentifier caseIdentifier, java.lang.String outcome, Comment comment) throws CaseServiceException
context
- an IBPMContext
valuecaseIdentifier
- a CaseIdentifier
valueoutcome
- a String
valuecomment
- a Comment
valueboolean
valueCaseServiceException
- if an error occursboolean addComment(IBPMContext context, CaseIdentifier caseIdentifier, Comment comment) throws CaseServiceException
context
- an IBPMContext
valuecaseIdentifier
- a CaseIdentifier
valuecomment
- a Comment
valueboolean
valueCaseServiceException
- if an error occursjava.util.List<CaseMilestone> getCaseMileStones(IBPMContext context, CaseIdentifier caseIdentifier) throws CaseServiceException
context
- an IBPMContext
valuecaseIdentifier
- a CaseIdentifier
valueList<CaseMilestone>
valueCaseServiceException
- if an error occursboolean attainMilestone(IBPMContext context, CaseMilestone milestone) throws CaseServiceException
context
- an IBPMContext
valuemilestone
- a CaseMilestone
valueboolean
valueCaseServiceException
- if an error occursboolean revokeMilestone(IBPMContext context, CaseMilestone milestone) throws CaseServiceException
context
- an IBPMContext
valuemilestone
- a CaseMilestone
valueboolean
valueCaseServiceException
- if an error occursboolean addCaseStakeHolder(IBPMContext context, CaseStakeHolder caseStakeHolder) throws CaseServiceException
context
- an IBPMContext
valuecaseStakeHolder
- a CaseStakeHolder
valueboolean
valueCaseServiceException
- if an error occursboolean addCaseStakeHolderMember(IBPMContext context, CaseStakeHolderMember caseStakeHolderMember) throws CaseServiceException
context
- an IBPMContext
valuecaseStakeHolderMember
- a CaseStakeHolderMember
valueboolean
valueCaseServiceException
- if an error occursboolean removeCaseStakeHolder(IBPMContext context, CaseStakeHolder caseStakeHolder) throws CaseServiceException
context
- an IBPMContext
valuecaseStakeHolder
- a CaseStakeHolder
valueboolean
valueCaseServiceException
- if an error occursboolean removeCaseStakeHolderMember(IBPMContext context, CaseStakeHolderMember caseStakeHolderMember) throws CaseServiceException
context
- an IBPMContext
valuecaseStakeHolderMember
- a CaseStakeHolderMember
valueboolean
valueCaseServiceException
- if an error occursjava.util.List<CaseStakeHolder> getCaseStakeHolders(IBPMContext context, CaseIdentifier caseIdentifier) throws CaseServiceException
context
- an IBPMContext
valuecaseIdentifier
- a CaseIdentifier
valueList<CaseStakeHolder>
valueCaseServiceException
- if an error occursjava.util.List<Comment> getComments(IBPMContext context, CaseObject caseObject) throws CaseServiceException
context
- an IBPMContext
valuecaseIdentifier
- a CaseIdentifier
valueList<Comment>
valueCaseServiceException
- if an error occursboolean abortCase(IBPMContext context, CaseIdentifier caseIdentifier, Comment comment) throws CaseServiceException
context
- an IBPMContext
valuecaseIdentifier
- a CaseIdentifier
valuecomment
- a Comment
valueboolean
valueCaseServiceException
- if an error occursboolean suspendCase(IBPMContext context, CaseIdentifier caseIdentifier, Comment comment) throws CaseServiceException
context
- an IBPMContext
valuecaseIdentifier
- a CaseIdentifier
valuecomment
- a Comment
valueboolean
valueCaseServiceException
- if an error occursboolean resumeCase(IBPMContext context, CaseIdentifier caseIdentifier, Comment comment) throws CaseServiceException
context
- an IBPMContext
valuecaseIdentifier
- a CaseIdentifier
valuecomment
- a Comment
valueboolean
valueCaseServiceException
- if an error occursboolean reopenCase(IBPMContext context, CaseIdentifier caseIdentifier, Comment comment) throws CaseServiceException
context
- an IBPMContext
valuecaseIdentifier
- a CaseIdentifier
valuecomment
- a Comment
valueboolean
valueCaseServiceException
- if an error occursboolean updateCaseHeader(IBPMContext context, CaseHeader caseHeader, Comment comment) throws CaseServiceException
context
- an IBPMContext
valuecaseHeader
- a CaseHeader
valuecomment
- a Comment
valueboolean
valueCaseServiceException
- if an error occurs
|
Oracle Fusion Middleware Java API Reference for Oracle BPM Suite 11g Release 1 (11.1.1.9.0) E25378-09 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |