Hi,
I modified the Activiti default User Workflow to require Approval between
user creation and "activation". When I try to approve the new user in the
console, I get an error. From the core-rest.log
org.apache.syncope.core.workflow.api.WorkflowException: While submitting
form for task 17612
at
org.apache.syncope.core.workflow.activiti.ActivitiUserWorkflowAdapter.throwException(ActivitiUserWorkflowAdapter.java:154)
~[syncope-core-workflow-activiti-2.0.9-SNAPSHOT.jar:2.0.9-SNAPSHOT]
at
org.apache.syncope.core.workflow.activiti.ActivitiUserWorkflowAdapter.submitForm(ActivitiUserWorkflowAdapter.java:768)
~[syncope-core-workflow-activiti-2.0.9-SNAPSHOT.jar:2.0.9-SNAPSHOT]
...
Caused by: org.activiti.engine.ActivitiException: Unknown property used in
expression: ${task == 'delete'}
at
org.activiti.engine.impl.el.JuelExpression.getValue(JuelExpression.java:53)
~[activiti-engine-5.22.0.jar:5.22.0]
...
Caused by: org.activiti.engine.impl.javax.el.PropertyNotFoundException:
Cannot resolve identifier 'task'
I inferred from the configuration that the value of 'task' corresponds to
the *Task element id in the configuration, i.e., < but when I add a default
flow from ScriptTask Activate to End I see the same exception. (I even
tried adding, and then backed out, a ServiceTask inbetween the ScriptTask
and the gateway, and a direct flow to the end with a "${task=='activate'}"
condition--but no luck.)
Here is the workflow xml below. I feel like I'm super close to getting a
grip here. Any insight you can provide will be most helpful. Thanks!
<?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" xmlns:omgdc="
http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="
http://www.omg.org/spec/DD/20100524/DI" typeLanguage="
http://www.w3.org/2001/XMLSchema" expressionLanguage="
http://www.w3.org/1999/XPath" targetNamespace="http://activiti.org/bpmn20">
<process id="userWorkflow" name="User Workflow" isExecutable="true">
<startEvent id="theStart"/>
<sequenceFlow id="flow1" sourceRef="theStart" targetRef="create"/>
<serviceTask id="create" name="Create"
activiti:expression="#{create.execute(execution.processInstanceId)}"/>
<scriptTask id="activate" name="Activate" scriptFormat="groovy"
activiti:autoStoreVariables="false">
<script><![CDATA[execution.setVariable("propagateEnable",
Boolean.TRUE);]]></script>
</scriptTask>
<exclusiveGateway id="activeGw"/>
<serviceTask id="update" name="Update"
activiti:expression="#{update.execute(execution.processInstanceId)}"/>
<serviceTask id="suspend" name="Suspend"
activiti:expression="#{suspend.execute(execution.processInstanceId)}"/>
<sequenceFlow id="flow10" sourceRef="suspend" targetRef="suspended"/>
<userTask id="suspended" name="Suspended"/>
<sequenceFlow id="flow11" sourceRef="suspended"
targetRef="suspendedGw"/>
<exclusiveGateway id="suspendedGw"/>
<sequenceFlow id="suspended2Reactivate" sourceRef="suspendedGw"
targetRef="reactivate">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${task ==
'reactivate'}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="suspended2Delete" sourceRef="suspendedGw"
targetRef="delete">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${task ==
'delete'}]]></conditionExpression>
</sequenceFlow>
<serviceTask id="reactivate" name="Reactivate"
activiti:expression="#{reactivate.execute(execution.processInstanceId)}"/>
<serviceTask id="generateToken4PasswordReset" name="Generate Token"
activiti:expression="#{generateToken.execute(execution.processInstanceId)}"/>
<sequenceFlow id="sid-7F78CE07-A7A1-467F-BB4B-40FB234AEFF7"
sourceRef="generateToken4PasswordReset"
targetRef="notify4RequestPasswordReset"/>
<serviceTask id="notify4RequestPasswordReset" name="Notification"
activiti:expression="#{notify.execute(execution.processInstanceId)}"/>
<serviceTask id="checkToken4ConfirmPasswordReset" name="Check token,
remove and update password"
activiti:expression="#{passwordReset.execute(execution.processInstanceId)}"/>
<sequenceFlow id="sid-3E9FE01D-CC60-4A95-B356-CA0DC000FAD6"
sourceRef="checkToken4ConfirmPasswordReset"
targetRef="notify4ConfirmPasswordReset"/>
<serviceTask id="notify4ConfirmPasswordReset" name="Notification"
activiti:expression="#{notify.execute(execution.processInstanceId)}"/>
<serviceTask id="delete" name="Delete"
activiti:expression="#{delete.execute(execution.processInstanceId)}"/>
<sequenceFlow id="flow99" sourceRef="delete" targetRef="theEnd"/>
<userTask id="recertificationRequest" name="Recertification Request"
activiti:formKey="recertify">
<extensionElements>
<activiti:formProperty id="username" name="Username" type="string"
expression="${user.username}" writable="false"/>
<activiti:formProperty id="approve" name="Recertify?"
type="boolean" required="true"/>
<activiti:formProperty id="rejectReason" name="Reason for not
recertifying" type="string" variable="rejectReason"/>
</extensionElements>
</userTask>
<serviceTask id="recertify-task" name="Recertify"
activiti:expression="#{recertify.execute(execution.processInstanceId)}"/>
<exclusiveGateway id="recert-condition"/>
<sequenceFlow id="recert-flow1" sourceRef="recertificationRequest"
targetRef="recertify-task"/>
<sequenceFlow id="recert-flow2" sourceRef="recertify-task"
targetRef="recert-condition"/>
<endEvent id="theEnd"/>
<userTask id="approvalRequest" name="Approval Request"
activiti:formKey="approvalRequest">
<extensionElements>
<activiti:formProperty id="username" name="Username" type="string"
expression="${user.username}" writable="false"/>
<activiti:formProperty id="approve" name="Approve?" type="boolean"
required="true"/>
<activiti:formProperty id="rejectReason" name="Reason for not
approving" type="string" variable="rejectReason"/>
</extensionElements>
</userTask>
<exclusiveGateway id="sid-6FC9C63B-5D64-4510-8611-33CA6F6D8447"/>
<sequenceFlow id="sid-CF9ACA40-7750-47C3-A508-7250D24D4F1F"
sourceRef="notify4RequestPasswordReset" targetRef="activate"/>
<sequenceFlow id="sid-A37806A7-6B7B-48A2-BB37-DAE640231144"
sourceRef="notify4ConfirmPasswordReset" targetRef="activate"/>
<sequenceFlow id="flow12" sourceRef="reactivate" targetRef="activate"/>
<sequenceFlow id="activate-denied-flow"
sourceRef="sid-6FC9C63B-5D64-4510-8611-33CA6F6D8447" targetRef="suspended">
<conditionExpression
xsi:type="tFormalExpression"><![CDATA[!${approve}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="flow1001" sourceRef="approvalRequest"
targetRef="sid-6FC9C63B-5D64-4510-8611-33CA6F6D8447"/>
<sequenceFlow id="activate-approved-flow"
sourceRef="sid-6FC9C63B-5D64-4510-8611-33CA6F6D8447" targetRef="activate">
<conditionExpression
xsi:type="tFormalExpression"><![CDATA[${approve}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="active2Suspend" sourceRef="activeGw"
targetRef="suspend">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${task ==
'suspend'}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="active2Update" sourceRef="activeGw"
targetRef="update">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${task ==
'update'}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="active2RequestPasswordReset" sourceRef="activeGw"
targetRef="generateToken4PasswordReset">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${task ==
'requestPasswordReset'}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="active2ConfirmPasswordReset" sourceRef="activeGw"
targetRef="checkToken4ConfirmPasswordReset">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${task ==
'confirmPasswordReset'}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="recert-denied-flow" sourceRef="recert-condition"
targetRef="suspend">
<conditionExpression
xsi:type="tFormalExpression"><![CDATA[${!approve}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="recert-approved-flow" sourceRef="recert-condition"
targetRef="activate">
<conditionExpression
xsi:type="tFormalExpression"><![CDATA[${approve}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="recert-request-start-flow" sourceRef="activeGw"
targetRef="recertificationRequest">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${task ==
'request-certify'}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="flow1003" sourceRef="create"
targetRef="approvalRequest"/>
<sequenceFlow id="flow8" sourceRef="activate" targetRef="activeGw"/>
<sequenceFlow id="active2Delete" sourceRef="activeGw"
targetRef="delete">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${task ==
'delete'}]]></conditionExpression>
</sequenceFlow>
</process>
<bpmndi:BPMNDiagram id="BPMNDiagram_userWorkflow">
<bpmndi:BPMNPlane bpmnElement="userWorkflow"
id="BPMNPlane_userWorkflow">
<bpmndi:BPMNShape bpmnElement="theStart" id="BPMNShape_theStart">
<omgdc:Bounds height="30.0" width="30.0" x="540.0"
y="542.106406761897"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="create" id="BPMNShape_create">
<omgdc:Bounds height="60.0" width="100.0" x="617.1915177480706"
y="527.106406761897"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="activate" id="BPMNShape_activate">
<omgdc:Bounds height="80.0" width="100.00000000000011"
x="994.3415220074193" y="516.2927133500062"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="activeGw" id="BPMNShape_activeGw">
<omgdc:Bounds height="40.0" width="40.0" x="1400.0" y="520.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="update" id="BPMNShape_update">
<omgdc:Bounds height="60.0" width="100.0" x="1370.0" y="615.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="suspend" id="BPMNShape_suspend">
<omgdc:Bounds height="60.0" width="100.0" x="1490.0" y="370.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="suspended" id="BPMNShape_suspended">
<omgdc:Bounds height="60.0" width="100.0" x="1640.0" y="370.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="suspendedGw"
id="BPMNShape_suspendedGw">
<omgdc:Bounds height="40.0" width="40.0" x="1820.0" y="380.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="reactivate" id="BPMNShape_reactivate">
<omgdc:Bounds height="60.0" width="100.0" x="1940.0" y="290.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="generateToken4PasswordReset"
id="BPMNShape_generateToken4PasswordReset">
<omgdc:Bounds height="81.0" width="121.0" x="1515.0" y="604.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="notify4RequestPasswordReset"
id="BPMNShape_notify4RequestPasswordReset">
<omgdc:Bounds height="81.0" width="121.0" x="1515.0" y="750.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="checkToken4ConfirmPasswordReset"
id="BPMNShape_checkToken4ConfirmPasswordReset">
<omgdc:Bounds height="81.0" width="121.0" x="1725.0" y="664.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="notify4ConfirmPasswordReset"
id="BPMNShape_notify4ConfirmPasswordReset">
<omgdc:Bounds height="81.0" width="121.0" x="1725.0" y="810.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="delete" id="BPMNShape_delete">
<omgdc:Bounds height="60.0" width="100.0" x="1940.0" y="438.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="recertificationRequest"
id="BPMNShape_recertificationRequest">
<omgdc:Bounds height="80.0" width="100.0" x="1370.0" y="375.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="recertify-task"
id="BPMNShape_recertify-task">
<omgdc:Bounds height="80.0" width="100.0" x="1230.0" y="375.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="recert-condition"
id="BPMNShape_recert-condition">
<omgdc:Bounds height="40.0" width="40.0" x="1178.0" y="475.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="theEnd" id="BPMNShape_theEnd">
<omgdc:Bounds height="28.0" width="28.0" x="2080.0" y="451.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="approvalRequest"
id="BPMNShape_approvalRequest">
<omgdc:Bounds height="80.0" width="100.0" x="764.8780938518611"
y="516.2927133500062"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement="sid-6FC9C63B-5D64-4510-8611-33CA6F6D8447"
id="BPMNShape_sid-6FC9C63B-5D64-4510-8611-33CA6F6D8447">
<omgdc:Bounds height="40.0" width="40.0" x="900.0"
y="537.106406761897"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="active2Update"
id="BPMNEdge_active2Update">
<omgdi:waypoint x="1420.0" y="560.0"/>
<omgdi:waypoint x="1420.0" y="615.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="suspended2Delete"
id="BPMNEdge_suspended2Delete">
<omgdi:waypoint x="1860.0" y="400.0"/>
<omgdi:waypoint x="1990.0" y="400.0"/>
<omgdi:waypoint x="1990.0" y="438.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="active2ConfirmPasswordReset"
id="BPMNEdge_active2ConfirmPasswordReset">
<omgdi:waypoint x="1440.0" y="540.0"/>
<omgdi:waypoint x="1785.0" y="540.0"/>
<omgdi:waypoint x="1785.3768996960487" y="664.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="suspended2Reactivate"
id="BPMNEdge_suspended2Reactivate">
<omgdi:waypoint x="1860.0" y="400.0"/>
<omgdi:waypoint x="1902.0" y="400.0"/>
<omgdi:waypoint x="1902.0" y="320.0"/>
<omgdi:waypoint x="1940.0" y="320.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="active2Delete"
id="BPMNEdge_active2Delete">
<omgdi:waypoint x="1440.0" y="540.0"/>
<omgdi:waypoint x="1990.0" y="540.0"/>
<omgdi:waypoint x="1990.0" y="498.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
<omgdi:waypoint x="570.0" y="557.106406761897"/>
<omgdi:waypoint x="617.1915177480706" y="557.106406761897"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement="sid-3E9FE01D-CC60-4A95-B356-CA0DC000FAD6"
id="BPMNEdge_sid-3E9FE01D-CC60-4A95-B356-CA0DC000FAD6">
<omgdi:waypoint x="1785.5" y="745.0"/>
<omgdi:waypoint x="1785.5" y="810.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8">
<omgdi:waypoint x="1094.3415220074194" y="556.2215484379483"/>
<omgdi:waypoint x="1250.0" y="556.0"/>
<omgdi:waypoint x="1250.0" y="540.0"/>
<omgdi:waypoint x="1400.0" y="540.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="active2Suspend"
id="BPMNEdge_active2Suspend">
<omgdi:waypoint x="1440.0" y="540.0"/>
<omgdi:waypoint x="1540.0" y="540.0"/>
<omgdi:waypoint x="1540.0" y="430.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement="sid-A37806A7-6B7B-48A2-BB37-DAE640231144"
id="BPMNEdge_sid-A37806A7-6B7B-48A2-BB37-DAE640231144">
<omgdi:waypoint x="1725.0" y="850.4592043155766"/>
<omgdi:waypoint x="1044.0" y="850.0"/>
<omgdi:waypoint x="1044.295010119844" y="596.2927133500062"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="recert-approved-flow"
id="BPMNEdge_recert-approved-flow">
<omgdi:waypoint x="1178.0" y="495.0"/>
<omgdi:waypoint x="1044.0" y="495.0"/>
<omgdi:waypoint x="1044.1186426543914" y="516.2927133500062"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="recert-flow2"
id="BPMNEdge_recert-flow2">
<omgdi:waypoint x="1280.0" y="455.0"/>
<omgdi:waypoint x="1280.0" y="495.0"/>
<omgdi:waypoint x="1218.0" y="495.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="recert-flow1"
id="BPMNEdge_recert-flow1">
<omgdi:waypoint x="1370.0" y="415.0"/>
<omgdi:waypoint x="1330.0" y="415.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="recert-denied-flow"
id="BPMNEdge_recert-denied-flow">
<omgdi:waypoint x="1198.0" y="475.0"/>
<omgdi:waypoint x="1198.0" y="344.0"/>
<omgdi:waypoint x="1540.0" y="344.0"/>
<omgdi:waypoint x="1540.0" y="370.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow1001" id="BPMNEdge_flow1001">
<omgdi:waypoint x="864.8780938518611" y="556.679737064523"/>
<omgdi:waypoint x="900.1536203911188" y="556.9527863707782"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement="sid-7F78CE07-A7A1-467F-BB4B-40FB234AEFF7"
id="BPMNEdge_sid-7F78CE07-A7A1-467F-BB4B-40FB234AEFF7">
<omgdi:waypoint x="1575.5" y="685.0"/>
<omgdi:waypoint x="1575.5" y="750.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="activate-approved-flow"
id="BPMNEdge_activate-approved-flow">
<omgdi:waypoint x="939.8699705147461" y="556.9763772766431"/>
<omgdi:waypoint x="994.3415220074193" y="556.6199143520345"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="recert-request-start-flow"
id="BPMNEdge_recert-request-start-flow">
<omgdi:waypoint x="1420.0" y="520.0"/>
<omgdi:waypoint x="1420.0" y="455.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="active2RequestPasswordReset"
id="BPMNEdge_active2RequestPasswordReset">
<omgdi:waypoint x="1440.0" y="540.0"/>
<omgdi:waypoint x="1575.0" y="540.0"/>
<omgdi:waypoint x="1575.3062200956938" y="604.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow1003" id="BPMNEdge_flow1003">
<omgdi:waypoint x="717.1915177480706" y="556.8309269473609"/>
<omgdi:waypoint x="764.8780938518611" y="556.5681931645423"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow10" id="BPMNEdge_flow10">
<omgdi:waypoint x="1590.0" y="400.0"/>
<omgdi:waypoint x="1640.0" y="400.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement="sid-CF9ACA40-7750-47C3-A508-7250D24D4F1F"
id="BPMNEdge_sid-CF9ACA40-7750-47C3-A508-7250D24D4F1F">
<omgdi:waypoint x="1515.0" y="790.4430856067733"/>
<omgdi:waypoint x="1044.0" y="790.0"/>
<omgdi:waypoint x="1044.2830690576095" y="596.2927133500062"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow11" id="BPMNEdge_flow11">
<omgdi:waypoint x="1740.0" y="400.0"/>
<omgdi:waypoint x="1820.0" y="400.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow99" id="BPMNEdge_flow99">
<omgdi:waypoint x="2040.0" y="466.5576923076923"/>
<omgdi:waypoint x="2080.005821071606" y="465.40367823831906"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow12" id="BPMNEdge_flow12">
<omgdi:waypoint x="1990.0" y="290.0"/>
<omgdi:waypoint x="1990.0" y="261.0"/>
<omgdi:waypoint x="1044.0" y="261.0"/>
<omgdi:waypoint x="1044.2952598421875" y="516.2927133500062"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="activate-denied-flow"
id="BPMNEdge_activate-denied-flow">
<omgdi:waypoint x="920.0" y="537.106406761897"/>
<omgdi:waypoint x="920.0" y="213.0"/>
<omgdi:waypoint x="1690.0" y="213.0"/>
<omgdi:waypoint x="1690.0" y="370.0"/>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>
Dave Varon
Creator of YADA <https://github.com/Novartis/YADA>
https://github.com/Novartis/YADA