Class CmmnRuntimeServiceImpl
java.lang.Object
org.flowable.common.engine.impl.service.CommonServiceImpl<C>
org.flowable.common.engine.impl.service.CommonEngineServiceImpl<CmmnEngineConfiguration>
org.flowable.cmmn.engine.impl.runtime.CmmnRuntimeServiceImpl
- All Implemented Interfaces:
CmmnRuntimeService
public class CmmnRuntimeServiceImpl
extends CommonEngineServiceImpl<CmmnEngineConfiguration>
implements CmmnRuntimeService
- Author:
- Joram Barrez
-
Field Summary
Fields inherited from class org.flowable.common.engine.impl.service.CommonEngineServiceImpl
commandExecutorFields inherited from class org.flowable.common.engine.impl.service.CommonServiceImpl
configuration -
Constructor Summary
Constructors -
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> caseInstanceIds) voidbulkTerminateCaseInstances(Collection<String> caseInstanceIds) voidchangePlanItemState(ChangePlanItemStateBuilderImpl changePlanItemStateBuilder) 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) voiddeleteCaseInstanceStartEventSubscriptions(CaseInstanceStartEventSubscriptionDeletionBuilderImpl builder) 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 caseInstanceId) Retrieves theEntityLinks associated with the given case instance.Retrieves all theEntityLinks associated with the same root as the given case instance.getEntityLinkParentsForCaseInstance(String caseInstanceId) Retrieves theEntityLinks where the given case instance is referenced.getIdentityLinksForCaseInstance(String caseInstanceId) Retrieves theIdentityLinks associated with the given case instance.getIdentityLinksForPlanItemInstance(String planItemInstanceId) 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.voidmigrateCaseInstanceStartEventSubscriptionsToCaseDefinitionVersion(CaseInstanceStartEventSubscriptionModificationBuilderImpl builder) 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) startCaseInstance(CaseInstanceBuilder caseInstanceBuilder) startCaseInstanceAsync(CaseInstanceBuilder caseInstanceBuilder) 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 instanceMethods inherited from class org.flowable.common.engine.impl.service.CommonEngineServiceImpl
getCommandExecutor, setCommandExecutorMethods inherited from class org.flowable.common.engine.impl.service.CommonServiceImpl
getConfiguration
-
Constructor Details
-
CmmnRuntimeServiceImpl
-
-
Method Details
-
createCaseInstanceBuilder
- Specified by:
createCaseInstanceBuilderin interfaceCmmnRuntimeService
-
createPlanItemInstanceTransitionBuilder
public PlanItemInstanceTransitionBuilder createPlanItemInstanceTransitionBuilder(String planItemInstanceId) - Specified by:
createPlanItemInstanceTransitionBuilderin interfaceCmmnRuntimeService
-
startCaseInstance
-
startCaseInstanceAsync
-
getStartFormModel
Description copied from interface:CmmnRuntimeServiceGets a Form model instance of the start form of a specific case definition or case instance- Specified by:
getStartFormModelin interfaceCmmnRuntimeService- 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.
-
triggerPlanItemInstance
- Specified by:
triggerPlanItemInstancein interfaceCmmnRuntimeService
-
enablePlanItemInstance
- Specified by:
enablePlanItemInstancein interfaceCmmnRuntimeService
-
disablePlanItemInstance
- Specified by:
disablePlanItemInstancein interfaceCmmnRuntimeService
-
completeStagePlanItemInstance
- Specified by:
completeStagePlanItemInstancein interfaceCmmnRuntimeService
-
completeStagePlanItemInstance
- Specified by:
completeStagePlanItemInstancein interfaceCmmnRuntimeService
-
startPlanItemInstance
- Specified by:
startPlanItemInstancein interfaceCmmnRuntimeService
-
completeCaseInstance
- Specified by:
completeCaseInstancein interfaceCmmnRuntimeService
-
terminateCaseInstance
- Specified by:
terminateCaseInstancein interfaceCmmnRuntimeService
-
bulkTerminateCaseInstances
- Specified by:
bulkTerminateCaseInstancesin interfaceCmmnRuntimeService
-
terminatePlanItemInstance
- Specified by:
terminatePlanItemInstancein interfaceCmmnRuntimeService
-
deleteCaseInstance
- Specified by:
deleteCaseInstancein interfaceCmmnRuntimeService
-
bulkDeleteCaseInstances
- Specified by:
bulkDeleteCaseInstancesin interfaceCmmnRuntimeService
-
evaluateCriteria
- Specified by:
evaluateCriteriain interfaceCmmnRuntimeService
-
completeGenericEventListenerInstance
- Specified by:
completeGenericEventListenerInstancein interfaceCmmnRuntimeService
-
completeUserEventListenerInstance
- Specified by:
completeUserEventListenerInstancein interfaceCmmnRuntimeService
-
getVariables
Description copied from interface:CmmnRuntimeServiceAll variables visible from the given case instance scope.- Specified by:
getVariablesin interfaceCmmnRuntimeService- Parameters:
caseInstanceId- id of case instance, cannot be null.- Returns:
- the variables or an empty map if no such variables are found.
-
getVariables
Description copied from interface:CmmnRuntimeServiceThe variable values for all given variableNames.- Specified by:
getVariablesin interfaceCmmnRuntimeService- 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.
-
getVariableInstances
Description copied from interface:CmmnRuntimeServiceAll variables visible from the given case instance scope.- Specified by:
getVariableInstancesin interfaceCmmnRuntimeService- Parameters:
caseInstanceId- id of case instance, cannot be null.- Returns:
- the variable instances or an empty map if no such variables are found.
-
getLocalVariables
Description copied from interface:CmmnRuntimeServiceAll variable values that are defined in the plan item instance scope, without taking outer scopes into account.- Specified by:
getLocalVariablesin interfaceCmmnRuntimeService- Parameters:
planItemInstanceId- id of plan item instance, cannot be null.- Returns:
- the variables or an empty map if no such variables are found.
-
getLocalVariables
public Map<String,Object> getLocalVariables(String planItemInstanceId, Collection<String> variableNames) Description copied from interface:CmmnRuntimeServiceAll variable values for all given variableNames that are defined in the plan item instance scope, without taking outer scopes into account.- Specified by:
getLocalVariablesin interfaceCmmnRuntimeService- 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.
-
getLocalVariableInstances
Description copied from interface:CmmnRuntimeServiceAll variable values that are defined in the plan item instance scope, without taking outer scopes into account.- Specified by:
getLocalVariableInstancesin interfaceCmmnRuntimeService- Parameters:
planItemInstanceId- id of plan item instance, cannot be null.- Returns:
- the variables or an empty map if no such variables are found.
-
getVariable
Description copied from interface:CmmnRuntimeServiceThe variable value. Returns null when no variable value is found with the given name or when the value is set to null.- Specified by:
getVariablein interfaceCmmnRuntimeService- 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.
-
getVariableInstance
Description copied from interface:CmmnRuntimeServiceThe variable. Returns null when no variable value is found with the given name or when the value is set to null.- Specified by:
getVariableInstancein interfaceCmmnRuntimeService- 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.
-
getLocalVariable
Description copied from interface:CmmnRuntimeServiceThe local variable value. Returns null when no variable value is found with the given name or when the value is set to null.- Specified by:
getLocalVariablein interfaceCmmnRuntimeService- 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.
-
getLocalVariableInstance
Description copied from interface:CmmnRuntimeServiceThe local variable. Returns null when no variable value is found with the given name or when the value is set to null.- Specified by:
getLocalVariableInstancein interfaceCmmnRuntimeService- 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.
-
hasVariable
Description copied from interface:CmmnRuntimeServiceCheck 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.- Specified by:
hasVariablein interfaceCmmnRuntimeService
-
hasLocalVariable
Description copied from interface:CmmnRuntimeServiceCheck whether or not this plan item instance has local variable set with the given name.- Specified by:
hasLocalVariablein interfaceCmmnRuntimeService
-
setVariable
- Specified by:
setVariablein interfaceCmmnRuntimeService
-
setVariables
- Specified by:
setVariablesin interfaceCmmnRuntimeService
-
setLocalVariable
- Specified by:
setLocalVariablein interfaceCmmnRuntimeService
-
setLocalVariables
- Specified by:
setLocalVariablesin interfaceCmmnRuntimeService
-
removeVariable
- Specified by:
removeVariablein interfaceCmmnRuntimeService
-
removeVariables
- Specified by:
removeVariablesin interfaceCmmnRuntimeService
-
removeLocalVariable
- Specified by:
removeLocalVariablein interfaceCmmnRuntimeService
-
removeLocalVariables
- Specified by:
removeLocalVariablesin interfaceCmmnRuntimeService
-
createVariableInstanceQuery
- Specified by:
createVariableInstanceQueryin interfaceCmmnRuntimeService
-
setCaseInstanceName
Description copied from interface:CmmnRuntimeServiceSet or change the name of the case instance.- Specified by:
setCaseInstanceNamein interfaceCmmnRuntimeService- Parameters:
caseInstanceId- the id of the case to set the namecaseName- the name to be set on the case
-
createCaseInstanceQuery
- Specified by:
createCaseInstanceQueryin interfaceCmmnRuntimeService
-
createPlanItemInstanceQuery
- Specified by:
createPlanItemInstanceQueryin interfaceCmmnRuntimeService
-
createMilestoneInstanceQuery
- Specified by:
createMilestoneInstanceQueryin interfaceCmmnRuntimeService
-
createGenericEventListenerInstanceQuery
- Specified by:
createGenericEventListenerInstanceQueryin interfaceCmmnRuntimeService
-
createSignalEventListenerInstanceQuery
- Specified by:
createSignalEventListenerInstanceQueryin interfaceCmmnRuntimeService
-
createUserEventListenerInstanceQuery
- Specified by:
createUserEventListenerInstanceQueryin interfaceCmmnRuntimeService
-
createEventSubscriptionQuery
Description copied from interface:CmmnRuntimeServiceCreates a newEventSubscriptionQueryinstance, that can be used to query the event subscriptions.- Specified by:
createEventSubscriptionQueryin interfaceCmmnRuntimeService
-
getStageOverview
Description copied from interface:CmmnRuntimeServiceGives back a stage overview of the case instance which includes the stage information of the case model.- Specified by:
getStageOverviewin interfaceCmmnRuntimeService- Parameters:
caseInstanceId- id of the case instance, cannot be null.- Returns:
- list of stage info objects
-
setOwner
Description copied from interface:CmmnRuntimeServiceSet the new owner of a case instance.- Specified by:
setOwnerin interfaceCmmnRuntimeService- Parameters:
caseInstanceId- the id of the case to set its new owneruserId- the id of the user to set as the new owner
-
removeOwner
Description copied from interface:CmmnRuntimeServiceRemoves the owner of a case instance.- Specified by:
removeOwnerin interfaceCmmnRuntimeService- Parameters:
caseInstanceId- the id of the case to remove the owner from
-
setAssignee
Description copied from interface:CmmnRuntimeServiceSet the new assignee of a case instance.- Specified by:
setAssigneein interfaceCmmnRuntimeService- Parameters:
caseInstanceId- the id of the case to set its new assigneeuserId- the id of the user to set as the new assignee
-
removeAssignee
Description copied from interface:CmmnRuntimeServiceRemoves the assignee of a case instance.- Specified by:
removeAssigneein interfaceCmmnRuntimeService- Parameters:
caseInstanceId- the id of the case to remove the assignee from
-
addUserIdentityLink
Description copied from interface:CmmnRuntimeServiceInvolves a user with a case instance. The type of identity link is defined by the given identityLinkType.- Specified by:
addUserIdentityLinkin interfaceCmmnRuntimeService- 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.
-
addGroupIdentityLink
Description copied from interface:CmmnRuntimeServiceInvolves a group with a case instance. The type of identityLink is defined by the given identityLink.- Specified by:
addGroupIdentityLinkin interfaceCmmnRuntimeService- 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.
-
deleteUserIdentityLink
Description copied from interface:CmmnRuntimeServiceRemoves the association between a user and a case instance for the given identityLinkType.- Specified by:
deleteUserIdentityLinkin interfaceCmmnRuntimeService- 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.
-
deleteGroupIdentityLink
Description copied from interface:CmmnRuntimeServiceRemoves the association between a group and a case instance for the given identityLinkType.- Specified by:
deleteGroupIdentityLinkin interfaceCmmnRuntimeService- 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.
-
getIdentityLinksForCaseInstance
Description copied from interface:CmmnRuntimeServiceRetrieves theIdentityLinks associated with the given case instance. Such an identity link informs how a certain user is involved with a case instance.- Specified by:
getIdentityLinksForCaseInstancein interfaceCmmnRuntimeService
-
getIdentityLinksForPlanItemInstance
Description copied from interface:CmmnRuntimeServiceRetrieves theIdentityLinks associated with the given plan item instance. Such an identity link informs how a certain user is involved with a plan item instance.- Specified by:
getIdentityLinksForPlanItemInstancein interfaceCmmnRuntimeService
-
getEntityLinkChildrenForCaseInstance
Description copied from interface:CmmnRuntimeServiceRetrieves theEntityLinks associated with the given case instance.- Specified by:
getEntityLinkChildrenForCaseInstancein interfaceCmmnRuntimeService
-
getEntityLinkChildrenWithSameRootAsCaseInstance
Description copied from interface:CmmnRuntimeServiceRetrieves all theEntityLinks associated with the same root as the given case instance.- Specified by:
getEntityLinkChildrenWithSameRootAsCaseInstancein interfaceCmmnRuntimeService
-
getEntityLinkParentsForCaseInstance
Description copied from interface:CmmnRuntimeServiceRetrieves theEntityLinks where the given case instance is referenced.- Specified by:
getEntityLinkParentsForCaseInstancein interfaceCmmnRuntimeService
-
createChangePlanItemStateBuilder
Description copied from interface:CmmnRuntimeServiceCreate aChangePlanItemStateBuilder, that allows to set various options for changing the state of a case instance.- Specified by:
createChangePlanItemStateBuilderin interfaceCmmnRuntimeService
-
updateBusinessKey
Description copied from interface:CmmnRuntimeServiceUpdates the business key for the provided case instance- Specified by:
updateBusinessKeyin interfaceCmmnRuntimeService- Parameters:
caseInstanceId- id of the case instance to set the business key, cannot be nullbusinessKey- new businessKey value
-
updateBusinessStatus
Description copied from interface:CmmnRuntimeServiceUpdates the business status for the provided case instance- Specified by:
updateBusinessStatusin interfaceCmmnRuntimeService- Parameters:
caseInstanceId- id of the case instance to set the business status, cannot be nullbusinessStatus- new business status value
-
changePlanItemState
-
addEventListener
Description copied from interface:CmmnRuntimeServiceAdds an event-listener which will be notified of ALL events by the dispatcher.- Specified by:
addEventListenerin interfaceCmmnRuntimeService- Parameters:
listenerToAdd- the listener to add
-
addEventListener
Description copied from interface:CmmnRuntimeServiceAdds an event-listener which will only be notified when an event occurs, which type is in the given types.- Specified by:
addEventListenerin interfaceCmmnRuntimeService- Parameters:
listenerToAdd- the listener to addtypes- types of events the listener should be notified for
-
removeEventListener
Description copied from interface:CmmnRuntimeServiceRemoves 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.- Specified by:
removeEventListenerin interfaceCmmnRuntimeService- Parameters:
listenerToRemove- listener to remove
-
dispatchEvent
Description copied from interface:CmmnRuntimeServiceDispatches the given event to any listeners that are registered.- Specified by:
dispatchEventin interfaceCmmnRuntimeService- Parameters:
event- event to dispatch.
-
createCaseInstanceStartEventSubscriptionBuilder
Description copied from interface:CmmnRuntimeServiceCreates 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.- Specified by:
createCaseInstanceStartEventSubscriptionBuilderin interfaceCmmnRuntimeService- Returns:
- the subscription builder
-
createCaseInstanceStartEventSubscriptionModificationBuilder
public CaseInstanceStartEventSubscriptionModificationBuilder createCaseInstanceStartEventSubscriptionModificationBuilder()Description copied from interface:CmmnRuntimeServiceCreates 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.- Specified by:
createCaseInstanceStartEventSubscriptionModificationBuilderin interfaceCmmnRuntimeService- Returns:
- the subscription modification builder
-
createCaseInstanceStartEventSubscriptionDeletionBuilder
public CaseInstanceStartEventSubscriptionDeletionBuilder createCaseInstanceStartEventSubscriptionDeletionBuilder()Description copied from interface:CmmnRuntimeServiceCreates 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.- Specified by:
createCaseInstanceStartEventSubscriptionDeletionBuilderin interfaceCmmnRuntimeService- Returns:
- the subscription deletion builder
-
registerCaseInstanceStartEventSubscription
public EventSubscription registerCaseInstanceStartEventSubscription(CaseInstanceStartEventSubscriptionBuilderImpl builder) -
migrateCaseInstanceStartEventSubscriptionsToCaseDefinitionVersion
public void migrateCaseInstanceStartEventSubscriptionsToCaseDefinitionVersion(CaseInstanceStartEventSubscriptionModificationBuilderImpl builder) -
deleteCaseInstanceStartEventSubscriptions
public void deleteCaseInstanceStartEventSubscriptions(CaseInstanceStartEventSubscriptionDeletionBuilderImpl builder)
-