05-04-2017 10:07 AM
05-04-2017 12:31 PM
A little short on detail here.
What do you want to do with the group and is it the same LDAP server you are authenticating against?
05-05-2017 03:25 AM
i want to assign some user into group and use group as candidate group in activiti workflow .
i am successfully done with ldap and activiti configuration and also created a group in ldap. but i am not able to access group in activiti through ldap?
05-05-2017 07:58 AM
Why do you want to add the users to a group and then assign the group to the task?
Why not simply assign a list of users to the candidate users list?
I ask this because if you use a group and change the membership in one process instance, what happens if you have second (or third, or 5 thousandth) process instance doing exactly the same thing to the same group?
What Im saying is that your design will almost certainly lead to conflict under load.
Greg
05-05-2017 08:55 AM
actually i want to assign a task to a user which is not present in the candidate user list in the running workflow.
Lets assume, a task is assigned to a user "A" but i want assign this task to another user "B" which is not present in flow as well as in candidate user list.
Give me the solution, how to do it.
05-05-2017 10:48 AM
Dynamic assignment is simple as long as the user exists in the User repository.
Simply create a task Listener associated with the "assign" event (not create assign happens before create).
Inside the task listener add the following code:
task.assign(<theTaskIdIWantToUse>);
To be honest, in anything other than the most trivial processes, all task assignment is dynamic.
Greg
05-06-2017 01:38 AM
i am do a experiment make a test workflow and in userTask i am not assign or not have a candidate user .
i am start the task . and use this query to assign the task to a user exists in the user repository.
query is
{"action":"claim","assignee":"userIdA"}
and rest url is
http://localhost:8080/activiti-rest/service/runtime/tasks/taskId
its successfully assign the task userIdA.
is this a correct way assign the task to a user?
the test workflow is
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlnsmgdc="http://www.omg.org/spec/DD/20100524/DC" xmlnsmgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/processdef">
<process id="test" isExecutable="true">
<startEvent id="sid-84EF1826-E6B3-4B4A-ADEF-DFA769634AD3"></startEvent>
<userTask id="first" name="1st"></userTask>
<endEvent id="sid-FE957320-DCF3-44E0-B144-A484AB68C16E"></endEvent>
<sequenceFlow id="sid-35A5A877-5A9A-46C0-B869-F6E54B7E5004" sourceRef="sid-84EF1826-E6B3-4B4A-ADEF-DFA769634AD3" targetRef="first"></sequenceFlow>
<sequenceFlow id="sid-F40223AB-C341-4D69-92F7-A69F007A40C9" sourceRef="second" targetRef="sid-FE957320-DCF3-44E0-B144-A484AB68C16E"></sequenceFlow>
<userTask id="second" name="2nd"></userTask>
<sequenceFlow id="sid-FB2FC6D3-56CD-422E-8A0A-AAB3E44BAC95" sourceRef="first" targetRef="second"></sequenceFlow>
</process>
<bpmndi:BPMNDiagram id="BPMNDiagram_test">
<bpmndi:BPMNPlane bpmnElement="test" id="BPMNPlane_test">
<bpmndi:BPMNShape bpmnElement="sid-84EF1826-E6B3-4B4A-ADEF-DFA769634AD3" id="BPMNShape_sid-84EF1826-E6B3-4B4A-ADEF-DFA769634AD3">
<omgdc:Bounds height="30.0" width="30.0" x="93.25" y="191.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="first" id="BPMNShape_first">
<omgdc:Bounds height="80.0" width="100.0" x="226.25" y="166.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="sid-FE957320-DCF3-44E0-B144-A484AB68C16E" id="BPMNShape_sid-FE957320-DCF3-44E0-B144-A484AB68C16E">
<omgdc:Bounds height="28.0" width="28.0" x="678.25" y="192.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="second" id="BPMNShape_second">
<omgdc:Bounds height="80.0" width="100.0" x="443.25" y="166.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="sid-F40223AB-C341-4D69-92F7-A69F007A40C9" id="BPMNEdge_sid-F40223AB-C341-4D69-92F7-A69F007A40C9">
<omgdi:waypoint x="543.25" y="206.0"></omgdi:waypoint>
<omgdi:waypoint x="678.25" y="206.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sid-35A5A877-5A9A-46C0-B869-F6E54B7E5004" id="BPMNEdge_sid-35A5A877-5A9A-46C0-B869-F6E54B7E5004">
<omgdi:waypoint x="123.25" y="206.0"></omgdi:waypoint>
<omgdi:waypoint x="226.25" y="206.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sid-FB2FC6D3-56CD-422E-8A0A-AAB3E44BAC95" id="BPMNEdge_sid-FB2FC6D3-56CD-422E-8A0A-AAB3E44BAC95">
<omgdi:waypoint x="326.25" y="206.0"></omgdi:waypoint>
<omgdi:waypoint x="443.25" y="206.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>
05-09-2017 09:01 AM
05-12-2017 02:03 AM
yes its depends on my scenario.
i m successfully assign the task at run time and its work fine.
but i have another question can we reassign a task to someone else user.
lets assume a task is assign to "user A" and we want to assign this task to "user B"
i am using query to assign a task to "user A " is
query is
{"action":"claim","assignee":"userIdA"}
and rest url is
http://localhost:8080/activiti-rest/service/runtime/tasks/taskId
what is the way of assign this task to a user B.?
05-22-2017 04:34 AM
You must call the two REST APIs in order.
1. unclaim
POST runtime/tasks/%taskId%
{
"action": "claim",
"assignee": null
}
2. claim
POST runtime/tasks/%taskId%
{
"action": "claim",
"assignee": %userId%
}
Reference
15.7.5. Task actions
Explore our Alfresco products with the links below. Use labels to filter content by product module.