wso2activitiwso2-business-process

BPS 3.5.0 and Activiti


I'm new with WSO2 BPS and I was wondering if, given a process definition (created using Eclipse Activiti plugin), it is possible to restrict the instantiation of that process to a specific role or user. That's to say, if I have user_1 with role role_1 and a user_2 with role_2 I want the process definition to be instantiated only by users of role_1. If it's possible what do I have to do to?

Thanks !


Solution

  • You can be assigned a specific user or role/group as potential initiator of a process using the attributes namely <activiti:candidateStarterUsers> and <activiti:candidateStarterGroups>.

    example:

    <process id="myProcess" activiti:candidateStarterUsers="kermit, isuru" activiti:candidateStarterGroups="role1">

    On the other hand a user or group can be assigned as potential initiator of a process using <activiti:potentialStarter> tag.

    example:

    <process id="myProcess">
      <extensionElements>
        <activiti:potentialStarter>
           <resourceAssignmentExpression>
             <formalExpression>group(role1), user(kermit)</formalExpression>
            </resourceAssignmentExpression>
        </activiti:potentialStarter>
    </extensionElements>