-
1. Re: how do we assign the rejected tasks to initiator in Approval flow.
swiderski.maciej May 10, 2013 1:16 AM (in response to javalearner)1 of 1 people found this helpfulwhy not model the case completely - first you will have a task for initiator to perform some work, once completed this moves to approval step and if rejected you loop back to the first task for corrections. That way you have clear model that represents the entire flow.
HTH
-
2. Re: how do we assign the rejected tasks to initiator in Approval flow.
javalearner May 22, 2013 8:31 AM (in response to swiderski.maciej)Hi Maciej Swiderski,
I am sorry for the late reply.
Thanks a lot for your reply, Maciej.
As you suggested, I can have task for Initiator but my question is who is going to start the process?
Please let me know if i am missing any thing.
Please find the attached bpmnn file which i have designed for approval process.
I have few more thoughts
I would like to have User task in the rejection flow and pass the persons Id, who started the process, as actor id to the User Task.
Suggest me is it a right approach?
Can i signal the approval flow after rejection?
Correct if i am wrong.
Thanks,
Rajesh.
-
3. Re: how do we assign the rejected tasks to initiator in Approval flow.
ashpcs May 23, 2013 7:28 AM (in response to javalearner)You have two options to explore
1) as suggested Maciej add a human task representing first form just after the start event and assign it to innitiator. When the initiator start the process either do a) first task can go to initiators inbox or b) claim first task for intiator and show the first form to initiator. For next Approve/Reject task at a node to this first human task in case of rejection.
2) If you have form before starting the process and form data is fed into the process then you will have to create human task programatically and assign it to initiator on rejection by approve/Reject task.
First approach is better as you are able to model first human task in the process.
-
4. Re: how do we assign the rejected tasks to initiator in Approval flow.
roxy1987 May 23, 2013 1:41 PM (in response to javalearner)1 of 1 people found this helpfulRajesh,
You will need to include a human task for the initiator. Because if you dont do it, and if you try and assign the rejected task to the initiator, your first level approval will be out of the definition.
First task assigned to a variable using expression and set as #{initiator}.
Second task for the approver. To decide whether the task is rejected or is approved, use a decision node with two transactions coming out. One going back to the initiator task(rejected case) and other to the next level approver(in case the task is approved).
-
5. Re: how do we assign the rejected tasks to initiator in Approval flow.
javalearner May 25, 2013 8:10 AM (in response to ashpcs)Thanks Ashish.
As you suggested,i would like to go with first approach.i.e, having a human task just after after the start node.
I will pass Actor id dynamically as suggested by the Shobhit.
And then i would like to claim,start and complete the task after starting the process . I have given sample to do the same below. please validate it is it a right apparoach?
Map<string,Object> inputParam = new HashMap<String,Object>();
inputParam.put("initiator","<UserID>");
kession.startproces("<process id>",inputParam);
//start the task
///complete task
Please suggest me on the above approach.
Thanks,
Rajesh.
-
6. Re: how do we assign the rejected tasks to initiator in Approval flow.
roxy1987 May 27, 2013 11:17 AM (in response to javalearner)you could start the process that way. But you also would need to create a process variable for your decision node and you will need to set its value at the time of completion of the approval task.
You will need to check its value in the decision node and use the appropriate transition.