-
1. Re: How to assignee this tasks?
ruds Apr 9, 2010 3:18 AM (in response to akstifr)Hello,
taskList = taskService.findPersonalTasks(userId);taking into account that userId is registered in the user type that you want and the task jPDL is assigned to a group candidate-groups="USERTYPE"check out the taskService API for more info.regards,Rudolf Michael -
2. Re: How to assignee this tasks?
rebody Apr 9, 2010 3:29 AM (in response to akstifr)Hi Anand,
I make a simple process defintion, and upload it into attach, you could download and have a look at whether it is what you want.
cheers
-
process.png 11.2 KB
-
process.jpdl.xml 732 bytes
-
-
3. Re: How to assignee this tasks?
akstifr Apr 9, 2010 5:42 AM (in response to ruds)Thank you for your reply
As you said Rudolf Michael, i can create candidate-groups but when more than one user submit the application then for each processInstance user will have only cancellation as task list but admin should have all the the processInstances for all submitted application.. how should i have to do this?
But at the same time user may have some other tasks also then how ?
as well Admin can also have some other task too then ...
But here i have display the same Task in the Admin User list as well as for User list also for he same processInstance that was started by submitting the application by normal user but with different name as:
in Admin ------ Assignee To and in the User ----- Cancellation , at same point of time.
-
4. Re: How to assignee this tasks?
akstifr Apr 9, 2010 5:41 AM (in response to rebody)Thank you for your reply and simple process defintion Huisheng Xu
but this does not suit as per my requirements here: As you are creating a fork at the starting, there might be a case where a user submits application but before it gets assigned to anybody by Admin, he can withdraw the application then both the User as well as Admin task should be get deleted.
Then how to do this ?
Here i have created rough a process defintion file which is more over what i need and this might help you to understand my problem much better.
But here i am able to assignee one task only.
-
Work_Order.jpdl.xml 1.4 KB
-
-
5. Re: How to assignee this tasks?
rebody Apr 9, 2010 6:01 AM (in response to akstifr)Hi Anand,
Do you mean that if one of forked execution being removed, the processInstance can not be removed?
If you use default configuration and do not change ends attribute of end activity to 'execution', the end activity will terminal the whole process instance.
-
6. Re: How to assignee this tasks?
akstifr Apr 9, 2010 6:15 AM (in response to rebody)Thank you once again for your reply Huisheng Xu ,
Do you mean that if one of forked execution being removed, the processInstance can not be removed?
I could not get you, as you created a fork, then there will be two processInstance and when User who applys want to cancel his application before being it get assigned to any other user by Admin, the two processInstance should get deleted and if it gets assigned the there should only one processInstance
If you use default configuration and do not change ends attribute of end activity to 'execution', the end activity will terminal the whole process instance.
I really could not get you, can you explain more on this also.
-
7. Re: How to assignee this tasks?
rebody Apr 9, 2010 7:56 AM (in response to akstifr)Hi Anand,
I think what you want to do is sending message between different branches of process instance. If ADMIN have not assign the task to a employee, the starter of process instance could have a chance to end the process instance. But if ADMIN is already assign the task to a emloyee, the starter of process instance could not cancel the process instance any more. Do you mean that?
Actually there is no way to send message from a branch of process instance to another one. If you use my process sample showing above, No matter what the ADMIN do, the starter could always terminal the whole process instance.
I think you should find a way to create a task to the starter dynamicly and listening the ADMIN's assigning behaviour, if ADMIN already assign the task to other person, you have delete the starter's task.
Execute me, If I can't make it more clearly. I am keeping practising.
-
8. Re: How to assignee this tasks?
swiderski.maciej Apr 9, 2010 8:04 AM (in response to rebody)Perhaps you could extend your sample with additional join at the end. Join should continue flow as soon as one of the actors complete the task. If admin will assign task to a employee flow will move on and cancellation will not be possible any more (in other words will not affect the flow).
/Maciej
-
9. Re: How to assignee this tasks?
akstifr Apr 9, 2010 9:30 AM (in response to rebody)Thank you once again for your reply Huisheng Xu,
I think what you want to do is sending message between different branches of process instance. If ADMIN have not assign the task to a employee, the starter of process instance could have a chance to end the process instance. But if ADMIN is already assign the task to a emloyee, the starter of process instance could not cancel the process instance any more. Do you mean that?
Yes i mean what you said above..
Then how should i can proceed further ??
-
10. Re: How to assignee this tasks?
rebody Apr 9, 2010 9:33 PM (in response to akstifr)Hi Anand,
There is truely no way to implement this feature using jBPM directly. You have to make some extension.
-
11. Re: How to assignee this tasks?
swiderski.maciej Apr 10, 2010 12:46 PM (in response to rebody)One way could be to use process/task variables as kind of messaging between branches of the process. If admin assigned a task to an employee then process or task variables can prevent of canceling the process by the starter actor.
-
12. Re: How to assignee this tasks?
akstifr Apr 12, 2010 2:26 AM (in response to rebody)Thanks you Once again for your reply Huisheng Xu ,
As you said there is no way to send message from a branch of ProcessInstance to another one then
How can the starter could always terminate the whole processInstance even after it is forked?
How can i keep track of the child processInstance which are created by fork?
-
13. Re: How to assignee this tasks?
rebody Apr 12, 2010 3:09 AM (in response to akstifr)Hi Anand,
If you have a look at the source of EndActivity, you will find out the default behaviour of EndActivity will terminate the whole processInstance. So the forked executions of process instance will be deleted cascade.
I think you could try what Maciej said, using variable to decide whether starter could cancel the process instance.
At this moment, I am studying BPEL, the different between BPEL and jPDL is jPDL hasn't a scope for activities, so we will find it is hard to do something should be done in a scope by jPDL. Maybe we could use sub-process to emulate a scope.
-
14. Re: How to assignee this tasks?
akstifr Apr 12, 2010 4:43 AM (in response to rebody)Thank you once again
Last thing i would like to ask is how to keep track of child processInstance which are created by the fork?
How can i get parent PID from the child process here and what are the active child processes of a parent ??