RCarranza
RCarranza

Reputation: 822

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 !

Upvotes: 0

Views: 162

Answers (2)

Isuru Wijesinghe
Isuru Wijesinghe

Reputation: 86

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>

Upvotes: 3

Greg Harley
Greg Harley

Reputation: 3240

I would use the CandidateStarterGroup property on the Process definition for this. Refer to chapter 8.8 in the Users guide :

http://www.activiti.org/userguide/#security

Hope this helps.

Upvotes: 1

Related Questions