Class ActionRuntimeServiceImpl
- java.lang.Object
-
- org.flowable.common.engine.impl.service.CommonServiceImpl<C>
-
- org.flowable.common.engine.impl.service.CommonEngineServiceImpl<ActionEngineConfiguration>
-
- com.flowable.action.engine.impl.runtime.ActionRuntimeServiceImpl
-
- All Implemented Interfaces:
ActionRuntimeService
public class ActionRuntimeServiceImpl extends CommonEngineServiceImpl<ActionEngineConfiguration> implements ActionRuntimeService
- Author:
- Tijs Rademakers
-
-
Field Summary
-
Fields inherited from class org.flowable.common.engine.impl.service.CommonEngineServiceImpl
commandExecutor
-
Fields inherited from class org.flowable.common.engine.impl.service.CommonServiceImpl
configuration
-
-
Constructor Summary
Constructors Constructor Description ActionRuntimeServiceImpl(ActionEngineConfiguration engineConfiguration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ActionTypeLink
addActionInstanceTypeLink(String actionInstanceId, String type, String linkValue)
Adds a newActionTypeLink
for the given action instance id.void
addGroupIdentityLink(String actionInstanceId, String groupId, String identityLinkType)
Involves a group with an action instance.void
addUserIdentityLink(String actionInstanceId, String userId, String identityLinkType)
Involves a user with an action instance.ActionInstanceBuilder
createActionInstanceBuilder()
Starts creating a new action instanceActionInstanceQuery
createActionInstanceQuery()
Query action instancesActionLinkQuery
createActionLinkQuery()
Query action linksExecuteActionInstanceBuilder
createExecuteActionInstanceBuilder()
Executes a new action instancevoid
deleteActionInstance(String actionInstanceId)
delete an action instance by idvoid
deleteActionInstanceTypeLink(String actionInstanceTypeLinkId)
Deletes anActionTypeLink
for the given action instance link id.void
deleteGroupIdentityLink(String actionInstanceId, String groupId, String identityLinkType)
Removes the association between a group and an action instance for the given identityLinkType.void
deleteUserIdentityLink(String actionInstanceId, String userId, String identityLinkType)
Removes the association between a user and an action instance for the given identityLinkType.ActionInstanceExecutionResult
executeActionInstance(ExecuteActionInstanceBuilderImpl executeActionInstanceBuilder)
List<ActionInstance>
findActionInstancesForScopeIdAndSubScopeId(String scopeType, String scopeId, String subScopeId, boolean includeDeletedFromCache)
ScopedObjectActionData
findScopedObjectActionData(ScopedObjectActionQuery scopedActionQuery)
Finds allActionDefinition
andActionInstance
instances that match the scope information passed in theScopedObjectActionQuery
parameters and returns these as aScopedObjectActionData
instance.List<IdentityLink>
getActionInstanceIdentityLinks(String actionInstanceId)
List<ActionTypeLink>
getActionInstanceTypeLinks(String actionInstanceId)
ReturnsActionTypeLink
s for the given action instance id.FormInfo
getFormInfo(String actionInstanceId)
Map<String,Object>
getVariables(String actionInstanceId)
void
migrateActionTypeLinks()
migrate action type linksActionInstance
startActionInstance(ActionInstanceBuilderImpl actionInstanceBuilder)
-
Methods inherited from class org.flowable.common.engine.impl.service.CommonEngineServiceImpl
getCommandExecutor, setCommandExecutor
-
Methods inherited from class org.flowable.common.engine.impl.service.CommonServiceImpl
getConfiguration
-
-
-
-
Constructor Detail
-
ActionRuntimeServiceImpl
public ActionRuntimeServiceImpl(ActionEngineConfiguration engineConfiguration)
-
-
Method Detail
-
createActionInstanceBuilder
public ActionInstanceBuilder createActionInstanceBuilder()
Description copied from interface:ActionRuntimeService
Starts creating a new action instance- Specified by:
createActionInstanceBuilder
in interfaceActionRuntimeService
-
createExecuteActionInstanceBuilder
public ExecuteActionInstanceBuilder createExecuteActionInstanceBuilder()
Description copied from interface:ActionRuntimeService
Executes a new action instance- Specified by:
createExecuteActionInstanceBuilder
in interfaceActionRuntimeService
-
deleteActionInstance
public void deleteActionInstance(String actionInstanceId)
Description copied from interface:ActionRuntimeService
delete an action instance by id- Specified by:
deleteActionInstance
in interfaceActionRuntimeService
-
startActionInstance
public ActionInstance startActionInstance(ActionInstanceBuilderImpl actionInstanceBuilder)
-
executeActionInstance
public ActionInstanceExecutionResult executeActionInstance(ExecuteActionInstanceBuilderImpl executeActionInstanceBuilder)
-
findScopedObjectActionData
public ScopedObjectActionData findScopedObjectActionData(ScopedObjectActionQuery scopedActionQuery)
Description copied from interface:ActionRuntimeService
Finds allActionDefinition
andActionInstance
instances that match the scope information passed in theScopedObjectActionQuery
parameters and returns these as aScopedObjectActionData
instance. A 'scope' is a combination of a type (e.g. conversation) and identifiers (e.g the conversationId). Typically an action is created for a certain scope (e.g. a certain conversation), so the return result will contain allActionInstance
results for that particular query. Some action definitions are applicable for the scope (e.g. the action to join a conversation), but don't have an action instance, as they can be repeated many times and there is no such thing as 'one action' to execute. This is why the result also contains theseActionDefinition
s that match the given scope. All definitions and instances found this way are put through the list of filters that are registered on the action engine configuration. Other engines (engage, cmmn, process, etc.) should inject scope-specific filters into the engine.- Specified by:
findScopedObjectActionData
in interfaceActionRuntimeService
-
getActionInstanceIdentityLinks
public List<IdentityLink> getActionInstanceIdentityLinks(String actionInstanceId)
- Specified by:
getActionInstanceIdentityLinks
in interfaceActionRuntimeService
-
addUserIdentityLink
public void addUserIdentityLink(String actionInstanceId, String userId, String identityLinkType)
Description copied from interface:ActionRuntimeService
Involves a user with an action instance. The type of identity link is defined by the given identityLinkType.- Specified by:
addUserIdentityLink
in interfaceActionRuntimeService
- Parameters:
actionInstanceId
- id of the action instance, cannot be nulluserId
- id of the involved user, cannot be nullidentityLinkType
- type of identityLink, cannot be null
-
addGroupIdentityLink
public void addGroupIdentityLink(String actionInstanceId, String groupId, String identityLinkType)
Description copied from interface:ActionRuntimeService
Involves a group with an action instance. The type of identity link is defined by the given identityLinkType.- Specified by:
addGroupIdentityLink
in interfaceActionRuntimeService
- Parameters:
actionInstanceId
- id of the action instance, cannot be nullgroupId
- id of the involved group, cannot be nullidentityLinkType
- type of identityLink, cannot be null
-
deleteUserIdentityLink
public void deleteUserIdentityLink(String actionInstanceId, String userId, String identityLinkType)
Description copied from interface:ActionRuntimeService
Removes the association between a user and an action instance for the given identityLinkType.- Specified by:
deleteUserIdentityLink
in interfaceActionRuntimeService
- Parameters:
actionInstanceId
- id of the action instance, cannot be nulluserId
- id of the involved user, cannot be nullidentityLinkType
- type of the identityLink, cannot be null
-
deleteGroupIdentityLink
public void deleteGroupIdentityLink(String actionInstanceId, String groupId, String identityLinkType)
Description copied from interface:ActionRuntimeService
Removes the association between a group and an action instance for the given identityLinkType.- Specified by:
deleteGroupIdentityLink
in interfaceActionRuntimeService
- Parameters:
actionInstanceId
- id of the action instance, cannot be nullgroupId
- id of the involved group, cannot be nullidentityLinkType
- type of the identityLink, cannot be null
-
getFormInfo
public FormInfo getFormInfo(String actionInstanceId)
- Specified by:
getFormInfo
in interfaceActionRuntimeService
-
getVariables
public Map<String,Object> getVariables(String actionInstanceId)
- Specified by:
getVariables
in interfaceActionRuntimeService
-
findActionInstancesForScopeIdAndSubScopeId
public List<ActionInstance> findActionInstancesForScopeIdAndSubScopeId(String scopeType, String scopeId, String subScopeId, boolean includeDeletedFromCache)
- Specified by:
findActionInstancesForScopeIdAndSubScopeId
in interfaceActionRuntimeService
includeDeletedFromCache
- Only set this to true for very specific use cases where the action instance could be deleted prior and it's still needed.
-
getActionInstanceTypeLinks
public List<ActionTypeLink> getActionInstanceTypeLinks(String actionInstanceId)
Description copied from interface:ActionRuntimeService
ReturnsActionTypeLink
s for the given action instance id.- Specified by:
getActionInstanceTypeLinks
in interfaceActionRuntimeService
-
addActionInstanceTypeLink
public ActionTypeLink addActionInstanceTypeLink(String actionInstanceId, String type, String linkValue)
Description copied from interface:ActionRuntimeService
Adds a newActionTypeLink
for the given action instance id.- Specified by:
addActionInstanceTypeLink
in interfaceActionRuntimeService
-
deleteActionInstanceTypeLink
public void deleteActionInstanceTypeLink(String actionInstanceTypeLinkId)
Description copied from interface:ActionRuntimeService
Deletes anActionTypeLink
for the given action instance link id.- Specified by:
deleteActionInstanceTypeLink
in interfaceActionRuntimeService
-
createActionInstanceQuery
public ActionInstanceQuery createActionInstanceQuery()
Description copied from interface:ActionRuntimeService
Query action instances- Specified by:
createActionInstanceQuery
in interfaceActionRuntimeService
-
createActionLinkQuery
public ActionLinkQuery createActionLinkQuery()
Description copied from interface:ActionRuntimeService
Query action links- Specified by:
createActionLinkQuery
in interfaceActionRuntimeService
-
migrateActionTypeLinks
public void migrateActionTypeLinks()
Description copied from interface:ActionRuntimeService
migrate action type links- Specified by:
migrateActionTypeLinks
in interfaceActionRuntimeService
-
-