-
1. Re: support template for task assignment
kukeltje Jul 21, 2009 11:47 AM (in response to tejjbpm)What I would do is 'fix' it in the task-assign handler in jBPM where you e.g. try to find a template with that name -assign and use that if it does exist. If it does not, use the normal template. This way you get per task templates without changes to the jPDL or database. If you 'fix' it this way and include a testcase, I might try to get it incorporated in jBPM.
-
2. Re: support template for task assignment
tejjbpm Jul 21, 2009 12:11 PM (in response to tejjbpm)hmm..good idea..if only I have time..my project is already making me run mad (!!)
But definitely will try to do and let you know if i find some time..
meanwhile..is there any workaround for this ? -
3. Re: support template for task assignment
swatis Jul 23, 2009 12:31 AM (in response to tejjbpm)Purpose of having "notify" attribute in task-node is to send "task-assign" template mail to the assignee.
Now, you can achieve the same thing i.e. you can send notification mail to the assignee but dont use "notify" attribute instead use "mail" action which will send your custom template mail to assignee...
hope its clear :) -
4. Re: support template for task assignment
tejjbpm Jul 23, 2009 4:18 AM (in response to tejjbpm)Thanks for your reply..
Yes I found that i can use the task-assign template or custom template but there is a big difference in using them
If I use task-assign I am able to use the expression {taskInstance.id} and it picks up the task id correctly. .but if i use my custom template {taskInstance.id} is not working..it returns blank..
i need the email to have this id so they can click on the link and directly go to the process task..
Any suggestion? -
5. Re: support template for task assignment
swatis Jul 23, 2009 4:45 AM (in response to tejjbpm)<task-node name="task2-have-fun"> <task name="hello"> <assignment expression="user(swati)"> </assignment> <event type="task-assign"> <action ref-name="send mail"/></event> </task> <transition to="end1"></transition> </task-node> <mail name="send mail" template="my-custom-template" />
Now here instead of using action ref-name you can use mail action also. this works. :) -
6. Re: support template for task assignment
swatis Jul 23, 2009 4:47 AM (in response to tejjbpm)I forgot to mention one point is if you use expressions like "#{taskInstance.name}" it gives you the task name. So your main concern is solved. :)
-
7. Re: support template for task assignment
tejjbpm Jul 23, 2009 4:50 AM (in response to tejjbpm)thanks for your reply..
I need the #{taskInstance.id} but it works in "task-assign" template but not in custom template...
So it is still a problem :( -
8. Re: support template for task assignment
swatis Jul 23, 2009 5:42 AM (in response to tejjbpm)I said you can use taskInstance.id, taskInstance.name expressions in custom mail template and you will get the values as well. Use event "type" as "task-assign"
-
9. Re: support template for task assignment
tejjbpm Jul 23, 2009 5:45 AM (in response to tejjbpm)sorry..where do i specify the event type?..how do i specify it when calling the custom template?
-
10. Re: support template for task assignment
tejjbpm Jul 23, 2009 5:46 AM (in response to tejjbpm)hey got it..i will try it and let you know ..
-
11. Re: support template for task assignment
swatis Jul 23, 2009 5:52 AM (in response to tejjbpm)Please see the sample code from prev reply.
-
12. Re: support template for task assignment
tejjbpm Jul 23, 2009 5:58 AM (in response to tejjbpm)works like a treat....:)
I thought there is no way of acheiving this other than jbpm code..
thanks a lot for your reply swati..you have saved my day ! :) -
13. Re: support template for task assignment
kukeltje Jul 23, 2009 5:59 AM (in response to tejjbpm)making the task-template configurable via the jBPM source should not take more than 2 hours... itÅ› fairly obvious.
In JpdlXmlReader there is a line:
Delegation delegation = createMailDelegation(notificationEvent, null, null, null, null);
notificationEvent contains 'task-assign' what is also the template name
If before this line you check if a template with e.g. the name <task-name>-task-assign exists, you pass in this string, otherwise you pass in just the notificationEvent.
Write a testcase for this et voila... -
14. Re: support template for task assignment
swatis Jul 23, 2009 6:01 AM (in response to tejjbpm)welcome boss :)