-
1. Re: jBPM4 - Task Escalation with Timer
kukeltje Aug 20, 2009 8:39 AM (in response to djcye)in a delegationclass (e.g. actionhandler within a time) you can do something like
context.getToken().getNode()
and if it is a tasknode do everything with it... -
2. Re: jBPM4 - Task Escalation with Timer
kukeltje Aug 20, 2009 8:40 AM (in response to djcye)oeps. my proposal was for 3... not sure for 4 though.... I think the api should have something, just not played with this
-
3. Re: jBPM4 - Task Escalation with Timer
djcye Aug 20, 2009 10:35 AM (in response to djcye)i studied the docs and the only way to assign tasks is through the TaskService or the assignmentHandler. i tried to put the assignmenthandler inside a "timeout event" section but that isnt valide.
well i also tried to use the eventhandler approach (to use the TaskService) without success. All TaskQuerys result in 0. Testet the same TaskQuery from a EJB Web-Service and it showed more than 0, so its not the querys fault ^^". perhaps this kind of operations is not supported from inside the handlers.
so the only option i see is to put theInitialContext ctx = new InitialContext(); ProcessEngine processEngine =(ProcessEngine)ctx.lookup("java:/ProcessEngine"); TaskService taskService = processEngine.getTaskService(); TaskQuery b = taskService.createTaskQuery(); b.assignee("peter"); List<Task> c = b.list(); System.out.println(c.size());
one additional question: if i use a transition timer inside a task node and the timer fires. will the task be completed / deleted ?
i tried to figure it out on the server. after the timer fires the task still remains in the assigned groups but cant be claimed anymore. exceptions when trying to claim:16:17:22,953 INFO [DefaultCommandService] exception while executing command org.jbpm.pvm.internal.cmd.AssignTaskCm d@7aba71 org.jbpm.api.JbpmException: task 55 does not exist
actualy task 55 realy doesnt exist. the taskid i try to claim is 59 O_o
and16:27:02,218 ERROR [[Resteasy]] Servlet.service() for servlet Resteasy threw exception org.jboss.resteasy.spi.UnhandledException: java.lang.RuntimeException: Unexpected invocation exception: null
andCaused by: org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [org.jbpm.pvm.internal.m odel.ExecutionImpl#75]
well i think the task gets deleted. but i am not sure. -
4. Re: jBPM4 - Task Escalation with Timer
djcye Aug 20, 2009 10:37 AM (in response to djcye)sry, ignore the "so the only option i see is to put the.." at the moment i see none XD
-
5. Re: jBPM4 - Task Escalation with Timer
kukeltje Aug 21, 2009 5:06 AM (in response to djcye)djcye,
It is very hard for us to understand everything if we just see snippets/partial stacktraces etc... please make a unittest as described in http://www.jboss.org/index.html?module=bb&op=viewtopic&t=158610 so we can have a better look and mayve try ourselves.