Class WorkObjectServiceImpl
java.lang.Object
org.flowable.common.engine.impl.service.CommonServiceImpl<C>
org.flowable.common.engine.impl.service.CommonEngineServiceImpl<WorkObjectEngineConfiguration>
com.flowable.workobject.engine.impl.WorkObjectServiceImpl
- All Implemented Interfaces:
WorkObjectService
public class WorkObjectServiceImpl extends org.flowable.common.engine.impl.service.CommonEngineServiceImpl<WorkObjectEngineConfiguration> implements WorkObjectService
- Author:
- Tijs Rademakers
-
Field Summary
-
Constructor Summary
Constructors Constructor Description WorkObjectServiceImpl(WorkObjectEngineConfiguration engineConfig) -
Method Summary
Modifier and Type Method Description voidaddGroupIdentityLink(java.lang.String workObjectId, java.lang.String groupId, java.lang.String identityLinkType)Involves a group with a work object.voidaddParticipantGroup(java.lang.String workObjectId, java.lang.String groupId)Convenience shorthand forWorkObjectService.addGroupIdentityLink(String, String, String); with typeIdentityLinkType.PARTICIPANTvoidaddParticipantUser(java.lang.String workObjectId, java.lang.String userId)Convenience shorthand forWorkObjectService.addUserIdentityLink(String, String, String); with typeIdentityLinkType.CANDIDATEvoidaddUserIdentityLink(java.lang.String workObjectId, java.lang.String userId, java.lang.String identityLinkType)Involves a user with a work object.WorkObjectcreateWorkObject(java.lang.String definitionKey, java.lang.String parentId, java.lang.String parentType, java.lang.String tenantId)Creates newWorkObjectaccording to provided definitionKey.WorkObjectQuerycreateWorkObjectQuery()Creates a newWorkObjectQueryinstance, that can be used to query the runtime work objects.WorkObjectUpdatercreateWorkObjectUpdater(WorkObject workObject)voiddeleteGroupIdentityLink(java.lang.String workObjectId, java.lang.String groupId, java.lang.String identityLinkType)Removes the association between a group and a work object for the given identityLinkType.voiddeleteParticipantGroup(java.lang.String workObjectId, java.lang.String groupId)Convenience shorthand forWorkObjectService.deleteGroupIdentityLink(String, String, String); with typeIdentityLinkType.PARTICIPANTvoiddeleteParticipantUser(java.lang.String workObjectId, java.lang.String userId)Convenience shorthand forWorkObjectService.deleteUserIdentityLink(String, String, String); with typeIdentityLinkType.PARTICIPANTvoiddeleteUserIdentityLink(java.lang.String workObjectId, java.lang.String userId, java.lang.String identityLinkType)Removes the association between a user and a work object for the given identityLinkType.voiddeleteWorkObject(java.lang.String workObjectId)Deletes work objectjava.lang.StringgetFirstWorkObjectId(java.lang.String underlyingObjectId, java.lang.String underlyingObjectType)Fetch the firstWorkObjectid from the underlying object type.java.util.List<org.flowable.identitylink.api.IdentityLink>getIdentityLinksForWorkObject(java.lang.String instanceId)Retrieves theIdentityLinks associated with the given work object.java.lang.StringgetParentId(java.lang.String workObjectId)Gets parent identifier for the given workObjectIdvoidremoveVariable(java.lang.String workObjectId, java.lang.String name)Removes variable from a given workObjectvoidupdateVariable(java.lang.String workObjectId, java.lang.String name, java.lang.Object value)Updates/creates a variable for a given workObjectWorkObjectupdateWorkObject(WorkObject workObject)Based on theWorkObject.getId()update workObject attributes.Methods inherited from class org.flowable.common.engine.impl.service.CommonEngineServiceImpl
getCommandExecutor, setCommandExecutor
-
Constructor Details
-
Method Details
-
updateVariable
public void updateVariable(java.lang.String workObjectId, java.lang.String name, java.lang.Object value)Description copied from interface:WorkObjectServiceUpdates/creates a variable for a given workObject- Specified by:
updateVariablein interfaceWorkObjectService- Parameters:
workObjectId- workObject identifiername- variable namevalue- new variable value
-
removeVariable
public void removeVariable(java.lang.String workObjectId, java.lang.String name)Description copied from interface:WorkObjectServiceRemoves variable from a given workObject- Specified by:
removeVariablein interfaceWorkObjectService- Parameters:
workObjectId- workObject identifiername- of the variable to remove
-
createWorkObjectQuery
Description copied from interface:WorkObjectServiceCreates a newWorkObjectQueryinstance, that can be used to query the runtime work objects.- Specified by:
createWorkObjectQueryin interfaceWorkObjectService
-
createWorkObject
public WorkObject createWorkObject(java.lang.String definitionKey, java.lang.String parentId, java.lang.String parentType, java.lang.String tenantId)Description copied from interface:WorkObjectServiceCreates newWorkObjectaccording to provided definitionKey. DefinitionKey identifies the latest version of theWorkObjectDefinition- Specified by:
createWorkObjectin interfaceWorkObjectService- Parameters:
definitionKey- definition according which new workObject will be createdparentId- workObject is created as a child of the parentparentType- parent reference type identifiertenantId- tenantId which is used to determine definition- Returns:
- workObject created according to definition
-
updateWorkObject
Description copied from interface:WorkObjectServiceBased on theWorkObject.getId()update workObject attributes. To update workObject variable useWorkObjectService.updateVariable(String, String, Object)- Specified by:
updateWorkObjectin interfaceWorkObjectService- Parameters:
workObject- work object to update- Returns:
- updated work object
-
deleteWorkObject
public void deleteWorkObject(java.lang.String workObjectId)Description copied from interface:WorkObjectServiceDeletes work object- Specified by:
deleteWorkObjectin interfaceWorkObjectService- Parameters:
workObjectId- work object identifier
-
getFirstWorkObjectId
public java.lang.String getFirstWorkObjectId(java.lang.String underlyingObjectId, java.lang.String underlyingObjectType)Description copied from interface:WorkObjectServiceFetch the firstWorkObjectid from the underlying object type.- Specified by:
getFirstWorkObjectIdin interfaceWorkObjectService- Parameters:
underlyingObjectId- underlying object identifierunderlyingObjectType- underlying object relation ship descriptor- Returns:
- the first
WorkObjectid which is the parent of the specified underlying object
-
createWorkObjectUpdater
- Specified by:
createWorkObjectUpdaterin interfaceWorkObjectService
-
addUserIdentityLink
public void addUserIdentityLink(java.lang.String workObjectId, java.lang.String userId, java.lang.String identityLinkType)Description copied from interface:WorkObjectServiceInvolves a user with a work object. The type of identity link is defined by the given identityLinkType.- Specified by:
addUserIdentityLinkin interfaceWorkObjectService- Parameters:
workObjectId- id of the work object, cannot be null.userId- id of the user involve, cannot be null.identityLinkType- type of identityLink, cannot be null (@seeIdentityLinkType).
-
addGroupIdentityLink
public void addGroupIdentityLink(java.lang.String workObjectId, java.lang.String groupId, java.lang.String identityLinkType)Description copied from interface:WorkObjectServiceInvolves a group with a work object. The type of identityLink is defined by the given identityLink.- Specified by:
addGroupIdentityLinkin interfaceWorkObjectService- Parameters:
workObjectId- id of the work object, cannot be null.groupId- id of the group to involve, cannot be null.identityLinkType- type of identity, cannot be null (@seeIdentityLinkType).
-
addParticipantUser
public void addParticipantUser(java.lang.String workObjectId, java.lang.String userId)Description copied from interface:WorkObjectServiceConvenience shorthand forWorkObjectService.addUserIdentityLink(String, String, String); with typeIdentityLinkType.CANDIDATE- Specified by:
addParticipantUserin interfaceWorkObjectService- Parameters:
workObjectId- id of the work object, cannot be null.userId- id of the user to use as candidate, cannot be null.
-
addParticipantGroup
public void addParticipantGroup(java.lang.String workObjectId, java.lang.String groupId)Description copied from interface:WorkObjectServiceConvenience shorthand forWorkObjectService.addGroupIdentityLink(String, String, String); with typeIdentityLinkType.PARTICIPANT- Specified by:
addParticipantGroupin interfaceWorkObjectService- Parameters:
workObjectId- id of the work object, cannot be null.groupId- id of the group to use as candidate, cannot be null.
-
deleteParticipantUser
public void deleteParticipantUser(java.lang.String workObjectId, java.lang.String userId)Description copied from interface:WorkObjectServiceConvenience shorthand forWorkObjectService.deleteUserIdentityLink(String, String, String); with typeIdentityLinkType.PARTICIPANT- Specified by:
deleteParticipantUserin interfaceWorkObjectService- Parameters:
workObjectId- id of the work object, cannot be null.userId- id of the user to use as candidate, cannot be null.
-
deleteParticipantGroup
public void deleteParticipantGroup(java.lang.String workObjectId, java.lang.String groupId)Description copied from interface:WorkObjectServiceConvenience shorthand forWorkObjectService.deleteGroupIdentityLink(String, String, String); with typeIdentityLinkType.PARTICIPANT- Specified by:
deleteParticipantGroupin interfaceWorkObjectService- Parameters:
workObjectId- id of the work object, cannot be null.groupId- id of the group to use as candidate, cannot be null.
-
deleteUserIdentityLink
public void deleteUserIdentityLink(java.lang.String workObjectId, java.lang.String userId, java.lang.String identityLinkType)Description copied from interface:WorkObjectServiceRemoves the association between a user and a work object for the given identityLinkType.- Specified by:
deleteUserIdentityLinkin interfaceWorkObjectService- Parameters:
workObjectId- id of the work object, cannot be null.userId- id of the user involve, cannot be null.identityLinkType- type of identityLink, cannot be null (@seeIdentityLinkType).
-
deleteGroupIdentityLink
public void deleteGroupIdentityLink(java.lang.String workObjectId, java.lang.String groupId, java.lang.String identityLinkType)Description copied from interface:WorkObjectServiceRemoves the association between a group and a work object for the given identityLinkType.- Specified by:
deleteGroupIdentityLinkin interfaceWorkObjectService- Parameters:
workObjectId- id of the work object, cannot be null.groupId- id of the group to involve, cannot be null.identityLinkType- type of identity, cannot be null (@seeIdentityLinkType).
-
getIdentityLinksForWorkObject
public java.util.List<org.flowable.identitylink.api.IdentityLink> getIdentityLinksForWorkObject(java.lang.String instanceId)Description copied from interface:WorkObjectServiceRetrieves theIdentityLinks associated with the given work object. Such anIdentityLinkinforms how a certain user is involved with a work object.- Specified by:
getIdentityLinksForWorkObjectin interfaceWorkObjectService
-
getParentId
public java.lang.String getParentId(java.lang.String workObjectId)Description copied from interface:WorkObjectServiceGets parent identifier for the given workObjectId- Specified by:
getParentIdin interfaceWorkObjectService- Parameters:
workObjectId- child object identifier- Returns:
- parent workObject identifier or null in the case when workObject is root already
-