-
1. Re: task due date
kukeltje Jul 28, 2009 10:27 AM (in response to frinux)No, the duedate on the task is noting more than an indication of when it should end. If you want to take a transition on that date, add a timer with a transition and a duedate of the timer that is identical to the duedate on the task.
-
2. Re: task due date
frinux Jul 28, 2009 10:32 AM (in response to frinux)Ok, but I saw somewhere a while ago that I could not change the timer value dynamically. Is it true?
If not, how can I retrieve and change the timer? I don't see anything in the TaskInstance class to do so. -
3. Re: task due date
kukeltje Jul 28, 2009 11:16 AM (in response to frinux)retrieving is possible via the api in a kind of complex way (not sure via which calls, Eclipse could help out with codecompletion and trial/error ;-).
Changing is another story. The EL is evaluated when the timer is created so that does not much. For 3 there have been discussions in the forum. Please use google to search for them. If I remember some had it working, but others didn't. I solved it once by really moddeling this in the process (cancel an existing task and creating a new one with a new duedate) -
4. Re: task due date
frinux Jul 29, 2009 8:59 AM (in response to frinux)I noticed the class CreateTimerAction, which has a setDueDate. Do I have to use this?
Here is what I guess :
create a CreateTimerAction
Timer timer = CreateTimerAction.createTimer
What do I do of this Timer?!
BTW, is the Javadoc going to be completed? It's sometimes hard to browse into it, lot's of comments are missing. -
5. Re: task due date
kukeltje Jul 29, 2009 8:54 PM (in response to frinux)for 3: no, for 4 certainly
-
6. Re: task due date
frinux Jul 30, 2009 9:06 AM (in response to frinux)Hum, just to try, I added a timer with a fixed due date value (1 minute). It does nothing, and nothing in the logs too...
I wonder if my schedule engine is running, allthough I configured my web.xml and jbpm.cfg.xml. -
7. Re: task due date
tejjbpm Jul 30, 2009 9:20 AM (in response to frinux)Check your processdefinition xml file whether timer is set..i had few issues with the timer when i updated the JPDL but xml was not reflecting the changes..
It should have<reminder duedate="1 minute" repeat="yes"/>
-
8. Re: task due date
frinux Jul 30, 2009 9:23 AM (in response to frinux)The XML changed, but I d'ont have anything with reminder, but :
<task-node name="valider_demande"> <description> Le valideur doit valider ouy refuser manuellement la demande émise </description> <task name="valider_demande"> <description> Le valideur doit valider ou refuser la demande de congé effectuée par le collaborateur. Si, lorsque la demande débute, le valideur n'a pas pris de décision, elle est automatiquement validée. </description> <assignment class="logica.actions.ValideurAssignmentHandler"></assignment> <controller class="logica.actions.EndTaskControllerHandler"></controller> </task> <timer duedate="1 minute" name="waitForApproval" transition="validee"> <script name="alert"> System.out.println("trop tard : validee !"); </script> </timer> <transition to="notifier_acceptation" name="validee"></transition> <transition to="notifier_refus" name="refusee"></transition> </task-node>
-
9. Re: task due date
tejjbpm Jul 30, 2009 9:26 AM (in response to frinux)which version of jbpm are you usng? my example was jbpm 3.
-
-
11. Re: task due date
tejjbpm Jul 30, 2009 10:15 AM (in response to frinux)Could you try this..update the process definition xml:
Delete this:<timer duedate="1 minute" name="waitForApproval" transition="validee"> <script name="alert"> System.out.println("trop tard : validee !"); </script> </timer>
Try this:<task-node name="valider_demande"> <description> Le valideur doit valider ouy refuser manuellement la demande émise </description> <task name="valider_demande"> <description> Le valideur doit valider ou refuser la demande de congé effectuée par le collaborateur. Si, lorsque la demande débute, le valideur n'a pas pris de décision, elle est automatiquement validée. </description> <assignment class="logica.actions.ValideurAssignmentHandler"></assignment> <controller class="logica.actions.EndTaskControllerHandler"></controller> <reminder duedate="20 seconds" repeat="yes"/> </task> <transition to="notifier_acceptation" name="validee"></transition> <transition to="notifier_refus" name="refusee"></transition> </task-node>
-
12. Re: task due date
frinux Jul 30, 2009 10:20 AM (in response to frinux)Nothing happens. Exactly as is there was no scheduler running...
-
13. Re: task due date
tejjbpm Jul 30, 2009 10:24 AM (in response to frinux)Is your email configuration working? Are you setting the host details in the jbpm cfg correctly..
This should work perfectly..if not..then it is definitely your config issue..check whether they are valid.. -
14. Re: task due date
frinux Jul 30, 2009 10:29 AM (in response to frinux)My emails are working perfectly. Here is the interesting part of my config :
jbpm.cfg.xml :<jbpm-context> <service name='persistence' factory='org.jbpm.persistence.db.DbPersistenceServiceFactory' /> <service name="tx" factory="org.jbpm.tx.TxServiceFactory" /> <service name="scheduler" factory="org.jbpm.scheduler.db.DbSchedulerServiceFactory" /> <!-- Async nodes --> <service name="message" factory="org.jbpm.msg.db.DbMessageServiceFactory" /> <!-- Process logging, in jbpm_log table --> <service name='logging' factory='org.jbpm.logging.db.DbLoggingServiceFactory' /> </jbpm-context>
web.xml :<!-- This servlet serves the purpose of executing pending timer jobs. --> <!-- JbpmJobExecutorServlet BEGIN --> <servlet> <servlet-name>JobExecutorServlet</servlet-name> <servlet-class>org.jbpm.job.executor.JobExecutorServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>JobExecutorServlet</servlet-name> <url-pattern>/jobs</url-pattern> </servlet-mapping> <!-- JbpmJobExecutorServlet END -->