Package org.flowable.cmmn.api
Interface CmmnRuntimeService
- All Known Implementing Classes:
CmmnRuntimeServiceImpl
public interface CmmnRuntimeService
- Author:
- Joram Barrez
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddEventListener(FlowableEventListener listenerToAdd) Adds an event-listener which will be notified of ALL events by the dispatcher.voidaddEventListener(FlowableEventListener listenerToAdd, FlowableEngineEventType... types) Adds an event-listener which will only be notified when an event occurs, which type is in the given types.voidaddGroupIdentityLink(String caseInstanceId, String groupId, String identityLinkType) Involves a group with a case instance.voidaddUserIdentityLink(String caseInstanceId, String userId, String identityLinkType) Involves a user with a case instance.voidbulkDeleteCaseInstances(Collection<String> caseInstanceId) voidbulkTerminateCaseInstances(Collection<String> caseInstanceId) voidcompleteCaseInstance(String caseInstanceId) voidcompleteGenericEventListenerInstance(String genericEventListenerInstanceId) voidcompleteStagePlanItemInstance(String planItemInstanceId) voidcompleteStagePlanItemInstance(String planItemInstanceId, boolean force) voidcompleteUserEventListenerInstance(String userEventListenerInstanceId) Creates a new event subscription builder to register a subscription to start a new case instance based on an event with a particular set of correlation parameter values.Creates a new event subscription deletion builder to delete one or more previously registered case start event subscriptions based on a particular case definition and with an optional combination of correlation parameter values.Creates a new event subscription modification builder to modify one or more previously registered case start event subscriptions based on a particular case definition and with an optional combination of correlation parameter values.Create aChangePlanItemStateBuilder, that allows to set various options for changing the state of a case instance.Creates a newEventSubscriptionQueryinstance, that can be used to query the event subscriptions.createPlanItemInstanceTransitionBuilder(String planItemInstanceId) voiddeleteCaseInstance(String caseInstanceId) voiddeleteGroupIdentityLink(String caseInstanceId, String groupId, String identityLinkType) Removes the association between a group and a case instance for the given identityLinkType.voiddeleteUserIdentityLink(String caseInstanceId, String userId, String identityLinkType) Removes the association between a user and a case instance for the given identityLinkType.voiddisablePlanItemInstance(String planItemInstanceId) voiddispatchEvent(FlowableEvent event) Dispatches the given event to any listeners that are registered.voidenablePlanItemInstance(String planItemInstanceId) voidevaluateCriteria(String caseInstanceId) getEntityLinkChildrenForCaseInstance(String instanceId) Retrieves theEntityLinks associated with the given case instance.Retrieves all theEntityLinks associated with the same root as the given case instance.getEntityLinkParentsForCaseInstance(String instanceId) Retrieves theEntityLinks where the given case instance is referenced.getIdentityLinksForCaseInstance(String instanceId) Retrieves theIdentityLinks associated with the given case instance.getIdentityLinksForPlanItemInstance(String instanceId) Retrieves theIdentityLinks associated with the given plan item instance.getLocalVariable(String planItemInstanceId, String variableName) The local variable value.getLocalVariableInstance(String planItemInstanceId, String variableName) The local variable.getLocalVariableInstances(String planItemInstanceId) All variable values that are defined in the plan item instance scope, without taking outer scopes into account.getLocalVariables(String planItemInstanceId) All variable values that are defined in the plan item instance scope, without taking outer scopes into account.getLocalVariables(String planItemInstanceId, Collection<String> variableNames) All variable values for all given variableNames that are defined in the plan item instance scope, without taking outer scopes into account.getStageOverview(String caseInstanceId) Gives back a stage overview of the case instance which includes the stage information of the case model.getStartFormModel(String caseDefinitionId, String caseInstanceId) Gets a Form model instance of the start form of a specific case definition or case instancegetVariable(String caseInstanceId, String variableName) The variable value.getVariableInstance(String caseInstanceId, String variableName) The variable.getVariableInstances(String caseInstanceId) All variables visible from the given case instance scope.getVariables(String caseInstanceId) All variables visible from the given case instance scope.getVariables(String caseInstanceId, Collection<String> variableNames) The variable values for all given variableNames.booleanhasLocalVariable(String planItemInstanceId, String variableName) Check whether or not this plan item instance has local variable set with the given name.booleanhasVariable(String caseInstanceId, String variableName) Check whether or not this case instance has variable set with the given name, Searching for the variable is done in all scopes that are visible to the given case instance.voidremoveAssignee(String caseInstanceId) Removes the assignee of a case instance.voidremoveEventListener(FlowableEventListener listenerToRemove) Removes the given listener from this dispatcher.voidremoveLocalVariable(String planItemInstanceId, String variableName) voidremoveLocalVariables(String planItemInstanceId, Collection<String> variableNames) voidremoveOwner(String caseInstanceId) Removes the owner of a case instance.voidremoveVariable(String caseInstanceId, String variableName) voidremoveVariables(String caseInstanceId, Collection<String> variableNames) voidsetAssignee(String caseInstanceId, String userId) Set the new assignee of a case instance.voidsetCaseInstanceName(String caseInstanceId, String caseName) Set or change the name of the case instance.voidsetLocalVariable(String planItemInstanceId, String variableName, Object variableValue) voidsetLocalVariables(String planItemInstanceId, Map<String, Object> variables) voidSet the new owner of a case instance.voidsetVariable(String caseInstanceId, String variableName, Object variableValue) voidsetVariables(String caseInstanceId, Map<String, Object> variables) voidstartPlanItemInstance(String planItemInstanceId) voidterminateCaseInstance(String caseInstanceId) voidterminatePlanItemInstance(String planItemInstanceId) voidtriggerPlanItemInstance(String planItemInstanceId) voidupdateBusinessKey(String caseInstanceId, String businessKey) Updates the business key for the provided case instancevoidupdateBusinessStatus(String caseInstanceId, String businessStatus) Updates the business status for the provided case instance
-
Method Details
-
createCaseInstanceBuilder
CaseInstanceBuilder createCaseInstanceBuilder() -
createPlanItemInstanceTransitionBuilder
PlanItemInstanceTransitionBuilder createPlanItemInstanceTransitionBuilder(String planItemInstanceId) -
triggerPlanItemInstance
-
enablePlanItemInstance
-
startPlanItemInstance
-
disablePlanItemInstance
-
completeStagePlanItemInstance
-
completeStagePlanItemInstance
-
completeCaseInstance
-
terminateCaseInstance
-
bulkTerminateCaseInstances
-
terminatePlanItemInstance
-
deleteCaseInstance
-
bulkDeleteCaseInstances
-
evaluateCriteria
-
completeGenericEventListenerInstance
-
completeUserEventListenerInstance
-
getVariables
All variables visible from the given case instance scope.- Parameters:
caseInstanceId- id of case instance, cannot be null.- Returns:
- the variables or an empty map if no such variables are found.
- Throws:
FlowableObjectNotFoundException- when no case instance is found for the given caseInstanceId.
-
getVariables
The variable values for all given variableNames.- Parameters:
caseInstanceId- id of execution, cannot be null.variableNames- the collection of variable names that should be retrieved.- Returns:
- the variables or an empty map if no such variables are found.
- Throws:
FlowableObjectNotFoundException- when no case instance is found for the given caseInstanceId.
-
getVariableInstances
All variables visible from the given case instance scope.- Parameters:
caseInstanceId- id of case instance, cannot be null.- Returns:
- the variable instances or an empty map if no such variables are found.
- Throws:
FlowableObjectNotFoundException- when no case instance is found for the given caseInstanceId.
-
getLocalVariables
All variable values that are defined in the plan item instance scope, without taking outer scopes into account.- Parameters:
planItemInstanceId- id of plan item instance, cannot be null.- Returns:
- the variables or an empty map if no such variables are found.
- Throws:
FlowableObjectNotFoundException- when no plan item instance is found for the given planItemInstanceId.
-
getLocalVariables
All variable values for all given variableNames that are defined in the plan item instance scope, without taking outer scopes into account.- Parameters:
planItemInstanceId- id of plan item instance, cannot be null.variableNames- the collection of variable names that should be retrieved.- Returns:
- the variables or an empty map if no such variables are found.
- Throws:
FlowableObjectNotFoundException- when no plan item instance is found for the given planItemInstanceId.
-
getLocalVariableInstances
All variable values that are defined in the plan item instance scope, without taking outer scopes into account.- Parameters:
planItemInstanceId- id of plan item instance, cannot be null.- Returns:
- the variables or an empty map if no such variables are found.
- Throws:
FlowableObjectNotFoundException- when no plan item instance is found for the given planItemInstanceId.
-
getVariable
The variable value. Returns null when no variable value is found with the given name or when the value is set to null.- Parameters:
caseInstanceId- id of case instance, cannot be null.variableName- name of variable, cannot be null.- Returns:
- the variable value or null if the variable is undefined or the value of the variable is null.
- Throws:
FlowableObjectNotFoundException- when no case instance is found for the given caseInstanceId.
-
getVariableInstance
The variable. Returns null when no variable value is found with the given name or when the value is set to null.- Parameters:
caseInstanceId- id of case instance, cannot be null.variableName- name of variable, cannot be null.- Returns:
- the variable or null if the variable is undefined.
- Throws:
FlowableObjectNotFoundException- when no case instance is found for the given caseInstanceId.
-
getLocalVariable
The local variable value. Returns null when no variable value is found with the given name or when the value is set to null.- Parameters:
planItemInstanceId- id of plan item instance, cannot be null.variableName- name of variable, cannot be null.- Returns:
- the variable value or null if the variable is undefined or the value of the variable is null.
- Throws:
FlowableObjectNotFoundException- when no plan item instance is found for the given planItemInstanceId.
-
getLocalVariableInstance
The local variable. Returns null when no variable value is found with the given name or when the value is set to null.- Parameters:
planItemInstanceId- id of plan item instance, cannot be null.variableName- name of variable, cannot be null.- Returns:
- the variable or null if the variable is undefined.
- Throws:
FlowableObjectNotFoundException- when no plan item instance is found for the given planItemInstanceId.
-
hasVariable
Check whether or not this case instance has variable set with the given name, Searching for the variable is done in all scopes that are visible to the given case instance. -
hasLocalVariable
Check whether or not this plan item instance has local variable set with the given name. -
setVariables
-
setVariable
-
setLocalVariables
-
setLocalVariable
-
removeVariable
-
removeVariables
-
removeLocalVariable
-
removeLocalVariables
-
createVariableInstanceQuery
VariableInstanceQuery createVariableInstanceQuery() -
setCaseInstanceName
Set or change the name of the case instance.- Parameters:
caseInstanceId- the id of the case to set the namecaseName- the name to be set on the case
-
createCaseInstanceQuery
CaseInstanceQuery createCaseInstanceQuery() -
createPlanItemInstanceQuery
PlanItemInstanceQuery createPlanItemInstanceQuery() -
createMilestoneInstanceQuery
MilestoneInstanceQuery createMilestoneInstanceQuery() -
createGenericEventListenerInstanceQuery
GenericEventListenerInstanceQuery createGenericEventListenerInstanceQuery() -
createSignalEventListenerInstanceQuery
SignalEventListenerInstanceQuery createSignalEventListenerInstanceQuery() -
createUserEventListenerInstanceQuery
UserEventListenerInstanceQuery createUserEventListenerInstanceQuery() -
createEventSubscriptionQuery
EventSubscriptionQuery createEventSubscriptionQuery()Creates a newEventSubscriptionQueryinstance, that can be used to query the event subscriptions. -
getStageOverview
Gives back a stage overview of the case instance which includes the stage information of the case model.- Parameters:
caseInstanceId- id of the case instance, cannot be null.- Returns:
- list of stage info objects
- Throws:
FlowableObjectNotFoundException- when the case instance doesn't exist.
-
setOwner
Set the new owner of a case instance.- Parameters:
caseInstanceId- the id of the case to set its new owneruserId- the id of the user to set as the new owner
-
removeOwner
Removes the owner of a case instance.- Parameters:
caseInstanceId- the id of the case to remove the owner from
-
setAssignee
Set the new assignee of a case instance.- Parameters:
caseInstanceId- the id of the case to set its new assigneeuserId- the id of the user to set as the new assignee
-
removeAssignee
Removes the assignee of a case instance.- Parameters:
caseInstanceId- the id of the case to remove the assignee from
-
addUserIdentityLink
Involves a user with a case instance. The type of identity link is defined by the given identityLinkType.- Parameters:
caseInstanceId- id of the case instance, cannot be null.userId- id of the user involve, cannot be null.identityLinkType- type of identityLink, cannot be null.- Throws:
FlowableObjectNotFoundException- when the case instance doesn't exist.
-
addGroupIdentityLink
Involves a group with a case instance. The type of identityLink is defined by the given identityLink.- Parameters:
caseInstanceId- id of the case instance, cannot be null.groupId- id of the group to involve, cannot be null.identityLinkType- type of identity, cannot be null.- Throws:
FlowableObjectNotFoundException- when the case instance or group doesn't exist.
-
deleteUserIdentityLink
Removes the association between a user and a case instance for the given identityLinkType.- Parameters:
caseInstanceId- id of the case instance, cannot be null.userId- id of the user involve, cannot be null.identityLinkType- type of identityLink, cannot be null.- Throws:
FlowableObjectNotFoundException- when the task or user doesn't exist.
-
deleteGroupIdentityLink
Removes the association between a group and a case instance for the given identityLinkType.- Parameters:
caseInstanceId- id of the case instance, cannot be null.groupId- id of the group to involve, cannot be null.identityLinkType- type of identity, cannot be null.- Throws:
FlowableObjectNotFoundException- when the task or group doesn't exist.
-
getIdentityLinksForCaseInstance
Retrieves theIdentityLinks associated with the given case instance. Such an identity link informs how a certain user is involved with a case instance. -
getIdentityLinksForPlanItemInstance
Retrieves theIdentityLinks associated with the given plan item instance. Such an identity link informs how a certain user is involved with a plan item instance. -
getEntityLinkChildrenForCaseInstance
Retrieves theEntityLinks associated with the given case instance. -
getEntityLinkChildrenWithSameRootAsCaseInstance
Retrieves all theEntityLinks associated with the same root as the given case instance. -
getEntityLinkParentsForCaseInstance
Retrieves theEntityLinks where the given case instance is referenced. -
getStartFormModel
Gets a Form model instance of the start form of a specific case definition or case instance- Parameters:
caseDefinitionId- id of case definition for which the start form should be retrieved.caseInstanceId- id of case instance for which the start form should be retrieved.
-
createChangePlanItemStateBuilder
ChangePlanItemStateBuilder createChangePlanItemStateBuilder()Create aChangePlanItemStateBuilder, that allows to set various options for changing the state of a case instance. -
updateBusinessKey
Updates the business key for the provided case instance- Parameters:
caseInstanceId- id of the case instance to set the business key, cannot be nullbusinessKey- new businessKey value
-
updateBusinessStatus
Updates the business status for the provided case instance- Parameters:
caseInstanceId- id of the case instance to set the business status, cannot be nullbusinessStatus- new business status value
-
addEventListener
Adds an event-listener which will be notified of ALL events by the dispatcher.- Parameters:
listenerToAdd- the listener to add
-
addEventListener
Adds an event-listener which will only be notified when an event occurs, which type is in the given types.- Parameters:
listenerToAdd- the listener to addtypes- types of events the listener should be notified for
-
removeEventListener
Removes the given listener from this dispatcher. The listener will no longer be notified, regardless of the type(s) it was registered for in the first place.- Parameters:
listenerToRemove- listener to remove
-
dispatchEvent
Dispatches the given event to any listeners that are registered.- Parameters:
event- event to dispatch.- Throws:
FlowableException- if an exception occurs when dispatching the event or when theFlowableEventDispatcheris disabled.FlowableIllegalArgumentException- when the given event is not suitable for dispatching.
-
createCaseInstanceStartEventSubscriptionBuilder
CaseInstanceStartEventSubscriptionBuilder createCaseInstanceStartEventSubscriptionBuilder()Creates a new event subscription builder to register a subscription to start a new case instance based on an event with a particular set of correlation parameter values. In order for this to work, the case definition needs to have an event-registry based start event with a dynamic, manual subscription based behavior and the registered correlation parameter values within the builder need to be based on actual correlation parameter definitions within the event model the start event is based on. Register one or more correlation parameter value with in the builder before invoking theCaseInstanceStartEventSubscriptionBuilder.subscribe()method to create and register the subscription.- Returns:
- the subscription builder
-
createCaseInstanceStartEventSubscriptionModificationBuilder
CaseInstanceStartEventSubscriptionModificationBuilder createCaseInstanceStartEventSubscriptionModificationBuilder()Creates a new event subscription modification builder to modify one or more previously registered case start event subscriptions based on a particular case definition and with an optional combination of correlation parameter values.- Returns:
- the subscription modification builder
-
createCaseInstanceStartEventSubscriptionDeletionBuilder
CaseInstanceStartEventSubscriptionDeletionBuilder createCaseInstanceStartEventSubscriptionDeletionBuilder()Creates a new event subscription deletion builder to delete one or more previously registered case start event subscriptions based on a particular case definition and with an optional combination of correlation parameter values.- Returns:
- the subscription deletion builder
-