I have a UserTask and in the Modeler I set the Assignee field as ${currentUser()}:
<bpmn:userTask id="Activity_10nkkmp" name="Do something" camunda:asyncAfter="true" camunda:assignee="**${currentUser()}**">
<bpmn:extensionElements>
<camunda:formData>
<camunda:formField id="paramA" label="Value of param A" type="long" defaultValue="8" />
</camunda:formData>
</bpmn:extensionElements>
<bpmn:incoming>Flow_1auako9</bpmn:incoming>
<bpmn:outgoing>Flow_0ckgrn4</bpmn:outgoing>
</bpmn:userTask>
But when I log in as Demo, the task is locked, I have to Claim it.
I thought it would be automatically assigned to the logged-in user.
What do I miss?
Thx
Hi @kontrag
It seems there is additional characters in assignee field that you have shared.
it should be : camunda:assignee="${currentUser()}"
it works for me
The ** I put to make it bold.
In my XML it’s
camunda:assignee=“${currentUser()}”
Note that I open Tasklist v7.15.0
Can you share the bpmn model file?
<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_0z3gys2" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.11.1" modeler:executionPlatform="Camunda Platform" modeler:executionPlatformVersion="7.15.0">
<bpmn:collaboration id="Collaboration_1ensf37">
<bpmn:participant id="Test_Process_" name="Test Process" processRef="Test_Process" />
</bpmn:collaboration>
<bpmn:process id="Test_Process" name="Test Process" isExecutable="true">
<bpmn:endEvent id="Event_0l1ojdp" name="Process completed">
<bpmn:incoming>Flow_0ckgrn4</bpmn:incoming>
</bpmn:endEvent>
<bpmn:userTask id="Activity_10nkkmp" name="Do something" camunda:asyncAfter="true" camunda:assignee="${currentUser()}">
<bpmn:extensionElements>
<camunda:formData>
<camunda:formField id="paramA" label="Value of param A" type="long" defaultValue="8" />
</camunda:formData>
<camunda:executionListener delegateExpression="${DBDelegate}" event="end" />
</bpmn:extensionElements>
<bpmn:incoming>Flow_1auako9</bpmn:incoming>
<bpmn:outgoing>Flow_0ckgrn4</bpmn:outgoing>
</bpmn:userTask>
<bpmn:startEvent id="Event_0ub22fi" name="Process started" camunda:asyncAfter="true">
<bpmn:outgoing>Flow_1auako9</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:sequenceFlow id="Flow_1auako9" sourceRef="Event_0ub22fi" targetRef="Activity_10nkkmp" />
<bpmn:sequenceFlow id="Flow_0ckgrn4" sourceRef="Activity_10nkkmp" targetRef="Event_0l1ojdp" />
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Collaboration_1ensf37">
<bpmndi:BPMNShape id="Participant_1hk34z4_di" bpmnElement="Test_Process_" isHorizontal="true">
<dc:Bounds x="160" y="80" width="340" height="210" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_0ckgrn4_di" bpmnElement="Flow_0ckgrn4">
<di:waypoint x="400" y="190" />
<di:waypoint x="432" y="190" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1auako9_di" bpmnElement="Flow_1auako9">
<di:waypoint x="258" y="190" />
<di:waypoint x="300" y="190" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="Event_0l1ojdp_di" bpmnElement="Event_0l1ojdp">
<dc:Bounds x="432" y="172" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="426" y="208" width="51" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_19zt9ci_di" bpmnElement="Activity_10nkkmp">
<dc:Bounds x="300" y="150" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_0ub22fi_di" bpmnElement="Event_0ub22fi">
<dc:Bounds x="222" y="172" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="219" y="208" width="41" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>
I unchecked “Asynchronous after” from start event and the task is assigned to the current user.
2 Likes