Package oracle.bpm.casemgmt
Interface ICaseActivityService
- All Known Subinterfaces:
ICaseService
public interface ICaseActivityService
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Maximum rating for case activitystatic final int
Minimum rating for case activity -
Method Summary
Modifier and TypeMethodDescriptionboolean
addWorkItem
(IBPMContext context, CaseIdentifier caseIdentifier, String caseActivityDefinitionId) Make any unavailable activity available in library.getActivatableCaseActivities
(IBPMContext context, CaseIdentifier caseIdentifier) Deprecated.getCaseActivities
(IBPMContext context, CaseIdentifier caseIdentifier, ICaseConstants.ActivityFilterType filter, String orderBy, ICaseConstants.ActivitySortOrder sortOrder, List<ICaseConstants.ActivityOptionalInfo> optionalInfo, String additionalJPQLWhereClause) Get the list of available, unavailable, running, completed or faulted activitiesboolean
initiateCaseActivity
(IBPMContext context, CaseIdentifier caseIdentifier, String caseActivityDefinitionId, Map<String, Object> payload, Comment comment) Initiate a case activity.void
markActivityRelevance
(IBPMContext context, CaseIdentifier caseIdentifier, String caseActivityDefinitionId, ICaseConstants.ActivityRelevance relevance) Mark relevance of a case activity for a particular instance of a casevoid
rateActivityDefinition
(IBPMContext context, String caseActivityDefinitionId, int rating) Deprecated.void
rateActivityInstance
(IBPMContext context, CaseIdentifier caseIdentifier, String caseActivityDefinitionId, int rating) Deprecated.void
registerCaseActivity
(IBPMContext context, CaseActivity caseActivity) Register a case activityvoid
unregisterCaseActivity
(IBPMContext context, String caseActivityDefinitionId) Unregister a case activity
-
Field Details
-
MAX_RATING
static final int MAX_RATINGMaximum rating for case activity- See Also:
-
MIN_RATING
static final int MIN_RATINGMinimum rating for case activity- See Also:
-
-
Method Details
-
getActivatableCaseActivities
@Deprecated List<CaseActivityDefinition> getActivatableCaseActivities(IBPMContext context, CaseIdentifier caseIdentifier) throws CaseServiceException Deprecated.Get the list of activatable case activitiesIBPMContext context = ..; CaseIdentifier caseIdentifier = ..; ICaseService caseService = ..; List<CaseActivityDefinition> activities = caseService.getActivatableCaseActivities(context, caseIdentifier); for (CaseActivityDefinition activity:activities) { String definitionId = activity.getDefinitionId(); String displayName = activity.getDisplayName(); String required = activity.getIsRequired(); String isRepeatable = activity.getIsRepeatable(); int rating = activity.getInstanceRating(); }
- Parameters:
context
- anIBPMContext
valuecaseIdentifier
- aCaseIdentifier
value- Returns:
- a
List
value - Throws:
CaseServiceException
- if an error occurs
-
getCaseActivities
List<CaseActivityDefinition> getCaseActivities(IBPMContext context, CaseIdentifier caseIdentifier, ICaseConstants.ActivityFilterType filter, String orderBy, ICaseConstants.ActivitySortOrder sortOrder, List<ICaseConstants.ActivityOptionalInfo> optionalInfo, String additionalJPQLWhereClause) throws CaseServiceException Get the list of available, unavailable, running, completed or faulted activitiesimport java.util.List; import oracle.bpm.casemgmt.caseactivity.model.CaseActivityDefinition; import oracle.bpm.casemgmt.persistence.model.ICaseConstants; import oracle.bpm.casemgmt.persistence.model.ICaseConstants.ActivitySortOrder; import oracle.bpm.casemgmt.persistence.model.ICaseConstants.ActivitySortColumn; import oracle.bpm.casemgmt.persistence.model.ICaseConstants.ActivityFilterType; import oracle.bpm.casemgmt.persistence.model.ICaseConstants.ActivityOptionalInfo; ICaseService caseService = ..; IBPMContext context = ..; CaseIdentifier caseIdentifier = ..; // AVAILABLE activities sorted by instance rating in descending order List<CaseActivityDefinition> activities = caseService.getCaseActivities(context, caseIdentifier, ActivityFilterType.AVAILABLE, ActivitySortColumn.INSTANCE_RATING.toString(), ActivitySortOrder.DESCENDING, null, null); //UNAVAILABLE activities sorted using JPQL order by for activity name in descending order. String orderBy = "activityDefinition.name DESC"; List<ActivityOptionalInfo> optionalInfo = new ArrayList<ActivityOptionalInfo>(); //get process or task documentation. optionalInfo.add(ActivityOptionalInfo.DOCUMENTATION); //get human task assignees. Only for human task based activities and this works only for filter RUNNING, COMPLETED, FAULTED optionalInfo.add(ActivityOptionalInfo.ASSIGNEES); List<CaseActivityDefinition> activities = caseService.getCaseActivities(context, caseIdentifier, ActivityFilterType.UNAVAILABLE, orderBy, null, optionalInfo, null); //To get RUNNING activities ordered by started_date orderBy = "caseEvent.started_date"; List<CaseActivityDefinition> activities = caseService.getCaseActivities(context, caseIdentifier, ActivityFilterType.RUNNING, orderBy, null, optionalInfo, null); //To get COMPLETED required activities String additionalJPQLWhereClause = "activityDefinition.isRequired = 'Y'"; List<CaseActivityDefinition> activities = caseService.getCaseActivities(context, caseIdentifier, ActivityFilterType.COMPLETED, null, null, null, additionalJPQLWhereClause); * for (CaseActivityDefinition activity:activities) { String definitionId = activity.getDefinitionId(); String displayName = activity.getDisplayName(); String required = activity.getIsRequired(); String isRepeatable = activity.getIsRepeatable(); int rating = activity.getInstanceRating(); List<DocumentationType> documentations = activity.getDocumentations(); List<DocumentationType> usecaseDocumentations = activity.getUseCaseDocumentations(); String state = activity.getState(); TaskInfo taskInfo = activity.getTaskInfo(); // For running, completed, faulted human task activities. }
- Parameters:
context
- anIBPMContext
valuecaseIdentifier
- aCaseIdentifier
valuefilter
- aICaseConstants.ActivityFilterType
valueorderBy
- JPQL order by or aICaseConstants.ActivitySortColumn
valuesortOrder
- aICaseConstants.ActivitySortOrder
valueoptionalInfo
- aList<ICaseConstants.ActivityOptionalInfo>
valueadditionalJPQLWhereClause
- aString
value- Returns:
- a
List
value - Throws:
CaseServiceException
- if an error occurs
-
initiateCaseActivity
boolean initiateCaseActivity(IBPMContext context, CaseIdentifier caseIdentifier, String caseActivityDefinitionId, Map<String, Object> payload, Comment comment) throws CaseServiceExceptionInitiate a case activity.- Parameters:
context
- anIBPMContext
valuecaseIdentifier
- aCaseIdentifier
valuecaseActivityDefinitionId
- aString
value. This is the same as CaseActivityDefinition.getDefinitionIdpayload
- aMap<String, Object>
value. This information is optional. For case activities that map case data to data initiating case activity, this is not needed. When there are case activities which require use to provide data for initiation, this data is required. For initiating activities that are implemented using BPMN or Human Task, the type of Object is expected to be an XML Nodecomment
- aComment
value- Returns:
- a
boolean
value - Throws:
CaseServiceException
- if an error occurs
-
registerCaseActivity
void registerCaseActivity(IBPMContext context, CaseActivity caseActivity) throws CaseServiceException Register a case activity- Parameters:
context
- anIBPMContext
valuecaseActivity
- aCaseActivity
value- Throws:
CaseServiceException
- if an error occurs
-
unregisterCaseActivity
void unregisterCaseActivity(IBPMContext context, String caseActivityDefinitionId) throws CaseServiceException Unregister a case activity- Parameters:
context
- anIBPMContext
valuecaseActivityDefinitionId
- aString
value- Throws:
CaseServiceException
- if an error occurs
-
rateActivityDefinition
@Deprecated void rateActivityDefinition(IBPMContext context, String caseActivityDefinitionId, int rating) throws CaseServiceException Deprecated.Rate a case activity. This rating will apply to this case activity across all instances- Parameters:
context
- anIBPMContext
valuecaseActivityDefinitionId
- aString
value. This is the same as CaseActivityDefinition.getDefinitionIdrating
- anint
value. Expected to be between 1 and 5. -1 indicates no rating available.- Throws:
CaseServiceException
- if an error occurs
-
rateActivityInstance
@Deprecated void rateActivityInstance(IBPMContext context, CaseIdentifier caseIdentifier, String caseActivityDefinitionId, int rating) throws CaseServiceException Deprecated.Rate a case activity for a particular instance of a case- Parameters:
context
- anIBPMContext
valuecaseIdentifier
- aCaseIdentifier
valuecaseActivityDefinitionId
- aString
valuerating
- anint
value. Expected to be between 1 and 5. -1 indicates no rating available.- Throws:
CaseServiceException
- if an error occurs
-
addWorkItem
boolean addWorkItem(IBPMContext context, CaseIdentifier caseIdentifier, String caseActivityDefinitionId) throws CaseServiceException Make any unavailable activity available in library. Unavailable activities are conditional and manual activities that are not activated through rules.- Parameters:
context
- anIBPMContext
valuecaseIdentifier
- aCaseIdentifier
valuecaseActivityDefinitionId
- aString
value. This is the same as CaseActivityDefinition.getDefinitionId- Returns:
- a
boolean
value - Throws:
CaseServiceException
- if an error occurs
-
markActivityRelevance
void markActivityRelevance(IBPMContext context, CaseIdentifier caseIdentifier, String caseActivityDefinitionId, ICaseConstants.ActivityRelevance relevance) throws CaseServiceException Mark relevance of a case activity for a particular instance of a case- Parameters:
context
- anIBPMContext
valuecaseIdentifier
- aCaseIdentifier
valuecaseActivityDefinitionId
- aString
valuerelevance
- anICaseConstants.ActivityRelevance
value. To represent no relevance associated to the activity , use NONE.- Throws:
CaseServiceException
- if an error occurs
-