Class AbstractProcessInstanceIdentityLinkCmd

    • Constructor Detail

      • AbstractProcessInstanceIdentityLinkCmd

        public AbstractProcessInstanceIdentityLinkCmd()
    • Method Detail

      • 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 loaded
        processInstanceId - 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 links
        processInstanceId - the id of the process instance to remove the identity links for
        identityType - 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 creation
        processInstanceId - the id of the process instance to create an identity link for
        userId - the user id if this is a user based identity link, otherwise null
        groupId - the group id if this is a group based identity link, otherwise null
        identityType - the type of identity link (e.g. owner or assignee, etc)