Class ProcessUtil

java.lang.Object
com.ssgllc.fish.service.util.published.ProcessUtil

@Component public class ProcessUtil extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    grantRoleAccess(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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ProcessUtil

      public ProcessUtil()
  • Method Details

    • grantRoleAccess

      public void grantRoleAccess(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. 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.