Class ProcessUtil
java.lang.Object
com.ssgllc.fish.service.util.published.ProcessUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidgrantRoleAccess(String processInstanceId, String roleName, String identityLinkType) Adds a role identity link of the specified type to the given process instance.
Processes that contain no user tasks never have identity links created automatically, which makes them invisible to org users.
-
Constructor Details
-
ProcessUtil
public ProcessUtil()
-
-
Method Details
-
grantRoleAccess
Adds a role identity link of the specified type to the given process instance.
Processes that contain no user tasks never have identity links created automatically, which makes them invisible to org users. Call this in a script task early in such a process to open visibility to the appropriate role.- Parameters:
processInstanceId- The ID of the process instance to grant access to.roleName- The name of the role (e.g.'ORDER_MANAGER').identityLinkType- The type of identity link to create.'candidate'is the most common choice unless you have a specific reason otherwise. Other allowed values —'assignee','owner','starter','participant'— are valid but carry distinct Flowable semantics; only use them when you are certain of the intended behaviour.
Groovy example:
processUtil.grantRoleAccess(execution.processInstanceId, 'ORDER_MANAGER', 'candidate')
Effect:
The process instance becomes visible to users with the given role via the specified identity link type, equivalent to the link Flowable would have created automatically had a user task been assigned to that role.
-