Package org.flowable.engine.impl.cmd
Class AbstractProcessInstanceIdentityLinkCmd
java.lang.Object
org.flowable.engine.impl.cmd.AbstractProcessInstanceIdentityLinkCmd
- Direct Known Subclasses:
RemoveProcessInstanceAssigneeCmd
,RemoveProcessInstanceOwnerCmd
,SetProcessInstanceAssigneeCmd
,SetProcessInstanceOwnerCmd
An abstract command supporting functionality around identity link management for process instances.
- Author:
- Micha Kiener
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
createIdentityLinkType
(CommandContext commandContext, String processInstanceId, String userId, String groupId, String identityType) Creates a new identity link entry for the given process instance, which can either be a user or group based one, but not both the same time.protected ExecutionEntity
getProcessInstanceEntity
(CommandContext commandContext, String processInstanceId) Returns the process instance entity for the given id, if it exists, otherwise an exception will be thrown.protected void
removeIdentityLinkType
(CommandContext commandContext, String processInstanceId, String identityType) This will remove ALL identity links with the given type, no mather whether they are user or group based.
-
Constructor Details
-
AbstractProcessInstanceIdentityLinkCmd
public AbstractProcessInstanceIdentityLinkCmd()
-
-
Method Details
-
getProcessInstanceEntity
protected ExecutionEntity getProcessInstanceEntity(CommandContext commandContext, String processInstanceId) Returns the process instance entity for the given id, if it exists, otherwise an exception will be thrown.- Parameters:
commandContext
- the command context within which the process instance is loadedprocessInstanceId
- the id of the process instance to be loaded- Returns:
- the process instance entity, if found, never null
- Throws:
FlowableIllegalArgumentException
- if the provided process instance id is not valid
-
removeIdentityLinkType
protected void removeIdentityLinkType(CommandContext commandContext, String processInstanceId, String identityType) This will remove ALL identity links with the given type, no mather whether they are user or group based.- Parameters:
commandContext
- the command context within which to remove the identity linksprocessInstanceId
- the id of the process instance to remove the identity links foridentityType
- the identity link type (e.g. assignee or owner, etc) to be removed
-
createIdentityLinkType
protected void createIdentityLinkType(CommandContext commandContext, String processInstanceId, String userId, String groupId, String identityType) Creates a new identity link entry for the given process instance, which can either be a user or group based one, but not both the same time. If both the user and group ids are null, no new identity link is created.- Parameters:
commandContext
- the command context within which to perform the identity link creationprocessInstanceId
- the id of the process instance to create an identity link foruserId
- the user id if this is a user based identity link, otherwise nullgroupId
- the group id if this is a group based identity link, otherwise nullidentityType
- the type of identity link (e.g. owner or assignee, etc)
-