[JBoss jBPM] - Re: Ending tasks manually
by frinux
Hum sorry but I don't have lot of time to build an sample of the error. I found a (dirty) way to do the job :
I noticed that although taskInstance.end(transition) doesn't work, token.signal(transition) does. So here is what I've done :
Transition tr=taskInstance.getTask().getTaskNode().getLeavingTransition("refusee");
|
| Token currentToken = processInstance.getRootToken();
| currentToken.signal(tr);
|
| @SuppressWarnings(value={"unchecked"}) //taskMgmtSession returns a raw List... We ignore the warning thrown by Java
| List<TaskInstance> userTaskList2 = taskMgmtSession.findTaskInstances(demande.getDemandeur().getUsername());
|
| for(int j = 0 ; j < userTaskList2.size() ; j++)
| {
| TaskInstance taskInstance2 = userTaskList2.get(j);
| if(taskInstance2.getProcessInstance().getId() == processInstanceId)
| {
| if(taskInstance2.getName().equals("valider_demande"));
| {
| taskInstance2.end();
| break;
| }
| }
| }
It is a temporary solution, and it's not optimized but it works. I keep it like that until I don't find a clean way... (I still suspect that taskInstance.end(transition) doesn't work properly).
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4234630#4234630
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4234630
16 years, 11 months
[JBoss jBPM] - jBPM timer's Action getting locked
by sumit.jbpm
Hi there,
I am using the jbpm-jpdl-3.2 version in my project. There are certain processes in my project where I am using jbpm-timer feature.
I have defined the timer in my processdefinition.xml in the following fashion:
| ....
| <timer name="billingNotification" duedate="5 minutes" >
| <action class = "com.myproject.integration.jbpm.billingapproval.handlers.BillingTimerHandler">
| <processName>billingapproval</processName>
| </action>
| </timer>
| ....
|
The problem that I am facing is that the above timer fires whenever I am manually increasing the system-time limit beyond the timer-time limit. But if suppose I am simply waiting for 5 mins then the timer action is getting locked just after the timer expires, and doesnot get executed.
Why is this happening?
I have given servlet entry for 'JobExecutorServlet' in the project's web.xml.
Also the jbpm.cfg.xml and hibernate.cfg.xml are having relevant entries regarding JobExecutor and timer.
If any body can help me accross in this regard it will be a great help. Or if any further info required for answering plz let reply to this question.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4234562#4234562
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4234562
16 years, 11 months