-
1. Re: HumanTaskExample exception in example
salaboy21 May 20, 2014 4:13 AM (in response to akoskm)1 of 1 people found this helpfulHmm, that's weird. I manage to reproduce the issue here so I will take a look on it.
Basically it is failing because it is not a test, where we can detect if something gets broken.
The error is quite clear, there is no task for "sales-rep", the question is why???
-
2. Re: Re: HumanTaskExample exception in example
akoskm May 20, 2014 6:06 AM (in response to salaboy21)I'm relatively new to Human Task but as far as I understand Review task is assigned to the group: sales, this contains one person: sales-rep.
The User Approval task contains ActorId=#{userId} which is set to krisv, the Manager Approval task is assigned to the group PM. This group contains one user: john.
However I don't see that the Notification task is assigned to any group or person, so I set the GroupId to sales and I expected that the line
TaskSummary task4 = taskService.getTasksAssignedAsPotentialOwner("sales-rep", "en-UK").get(0);
will return Notification task but it didn't.
EDIT
--------------------
(forum won't allow me to create a new post)
As I posted above the Notification User task in the HumanTask.bpmn example has no ActorId or GroupId defined. I tried to set one of these through the BPMN2 Process Editor but apparently the editor isn't saved my changes.
When I manually inserted the
<potentialOwner> <resourceAssignmentExpression> <formalExpression>sales-rep</formalExpression> </resourceAssignmentExpression> </potentialOwner>
to the declaration of Notification user task the example program completed, here is the full output:
Sales-rep executing task Review(595: ) krisv executing task User Approval(596: ) john executing task Manager Approval(597: ) sales-rep executing task Notification(598: ) resultUser = Agree result = Accept ActorId = sales-rep SwimlaneActorId = sales-rep resultManager = Agree description = Need a new laptop computer userId = krisv date = Tue May 20 11:48:00 CEST 2014 comment = Agreed, existing laptop needs replacing TaskName = Request Notification NodeName = Notification Process instance completed
I can create a pull request in github with the corrected example.
-
3. Re: Re: HumanTaskExample exception in example
akoskm May 21, 2014 4:28 AM (in response to akoskm)For anyone who's interested, Mauricio said that the assignment should work because of the lane which contains the notification task. I already created a pull request which contains the above modification, you can follow the discussion here: