What could be happening when the Claim button does not appear on a user task?
The task shows up in the task list for users who are members of its Candidate Group. The pane on the right where the form should be says “To see and fill in the form for this task, you need to claim this task first. You can do that by pressing the blue button in the top right of the page.” But there is no such button?
Not sure if this is related, but the task is the (single) activity in a process initiated from a Camel route. Its initiator is null. I have set its “potential starter user” to a bogus name so that it won’t show up in any users startable processes list.
Edit: the process doesn’t show up either in the processes list in the Task App (neither when selecting Running nor All).
To check that this may be due to the process not having an (authenticated user as) initiator, I implemented the mechanism documented in the Flowable Camel section in the user manual. I.e. set the
processInitiatorHeaderName property on the Flowable endpoint, and add a header by that name to the exchange.
This however gives the following exception:
org.flowable.engine.common.api.FlowableException: IdentityService is missing and must be provided to set process initiator.
So apparently the
FlowableProducer is set up without a reference to the
IdentityService. The question is: how should it get that?
SOLVED! The problem indeed was the triggering of the process without an authenticated user.
And the way to pass the identityService to the endpoint:
<bean id="identityService" factory-bean="processEngine" factory-method="getIdentityService" />
<camel:endpoint id=... uri="flowable:processKey">
<camel:property key="identityService" value="#identityService" />
<camel:property key="processInitiatorHeaderName" value="ProcessInitiator" />
I am also having this problem when I start a process instance with a timer, message, or signal. Example below:
<process id=“test” name=“Test Flow” isExecutable=“true”/ >
<userTask id=“sid-8A2D590D-B031-47CF-9B0C-34FFB7AD4DF4” name=“User Task” / >flowable:candidateUsers=“fozzie,kermit” flowable:formKey=“testForm”/ >
<modeler:user-info-email-fozzie xmlns:modeler=“http://flowable.org/modeler”></modeler:user-info-email-fozzie/ >
<modeler:user-info-firstname-kermit xmlns:modeler=“http://flowable.org/modeler”><![CDATA[Kermit]]/ ></modeler:user-info-firstname-kermit/ >
<modeler:user-info-lastname-thefrog xmlns:modeler=“http://flowable.org/modeler”><![CDATA[TheFrog]]/ ></modeler:user-info-lastname-thefrog/ >
<modeler:activiti-idm-candidate-user xmlns:modeler=“http://flowable.org/modeler”><![CDATA[true]]/ ></modeler:activiti-idm-candidate-user/ >
<modeler:initiator-can-complete xmlns:modeler=“http://flowable.org/modeler”><![CDATA[false]]/ ></modeler:initiator-can-complete/ >
<sequenceFlow id=“sid-CEF9E7F0-B2EC-4DD1-8D2D-2684667EC293” sourceRef=“sid-4BB6EFFA-ADB8-421A-A83F-802A4542D8EB” targetRef=“sid-8A2D590D-B031-47CF-9B0C-34FFB7AD4DF4”</sequenceFlow/ >
<startEvent id=“sid-4BB6EFFA-ADB8-421A-A83F-802A4542D8EB” isInterrupting=“false”/ >
0 31 9 6 * ? *</timeCycle/ >
This process is triggered without an authenticated user. Is there a way to fix this process without using Camel?
Is someone on the Flowable team able to look into the above?
The problem is that your user task has no assignment rules defined.
So there’s no flowable:assignee or flowable:candidateGroups definition.
That’s why you don’t see the claim button.
Thank you for your response. My goal was to assign the task to more than one candidate user, allowing any of the candidates to claim the task themselves. After doing this, I can see the users are all candidates on the task, but none can claim it, making that user the assignee. Is the only option to assign the task directly to one user or to a group instead of multiple users?
For the Flowable Task application assignment definitions need to be there. If you would use the Java API or REST API of the Flowable Engine directly then you just query for any task (assigned or not). But for the Flowable Task application this is more strict. You can add as many users and groups as you want to the candidateUsers or candidateGroups attributes.
It would be great if the documentation mentioned this. Perhaps in section 15.4 of the User Guide. I can fork your documentation repo and make the change if you accept changes.
I took a look at the git repo for the docs. It appears to be a big HTML file. Do you change the docs directly in this repo?
Or is this content the output from another tool?
The user guide is part of the flowable-engine. The file you are looking for is here.
And we are gladly accepting changes. Provide a PR and we can merge it into our master.