[jboss-user] [JBoss jBPM] - Best practices for cancelling a workflow
I need a way to cancel a workflow and have a handler fire, letting me know that the process was terminated abnormally. I'd like the handler to fire only when the process terminates in a non-standard way. For instance, I need to do some clean up of business code, clean up that I wouldn't have to do if the workflow ended normally. What's the recommended way to do this? I know about ProcessInstance.end(). Is there a way to create a handler or an event that let's me know (in Java code) when the workflow was terminated abnormally, ie. because of a call to end()? As an alternative, I can associate a Node named "cancel" with each step of the workflow, and signal each Task/Node/State to transition to the "cancel" node. But that seems clumsy - since I'd have to define a "cancel" step for every workflow and create a transition to it from every workflow node. A better way? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4031327#4031327 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4031327 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss jBPM] - Re: using a JBPM timer
"kukeltje" wrote : 1: look at the testcases in the source. Lots of info there | 2: yes, place an action on the transition or the 'leave node' event | 3: I'm not sure. best if you try. But even if it does, you could always use the in-memory hsqldb. No 'real' persistence then. Thanks! This is probably a dumb question, but where are the testcases you are referring to? Does JBPM ship with its own JUnit tests? If so, where are they located? Also, just a clarification about persistence. I'm asking whether the Timer (and scheduler service) require the JBPM db tables (as defined by Hibernate mapping files). In my case, I trying to avoid using Oracle or HSQL dbs. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4029319#4029319 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4029319 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss jBPM] - using a JBPM timer
I need to create a workflow where a node will stay in a wait state until either a timer "times out" or the user completes the task -- whichever comes first. What's the best way to model this use case? I think I understand how to assign and complete tasks. But I'm not too sure about timers. (I am still getting my JBoss deployment working with the jbpm scheduler, so I can't test the scenarios yet). Here's a simplified version of the task-node with a timer (and without any user assignments yet): | | | | | | | | | A couple of questions: 1) If the timer "times out" by the duedate and the user didn't complete the task, will the workflow automatically transition to the next node, "Next Step"? Or do I need to signal to transition in the ActionHandler associated with the timer? 2) How do I make sure that MyActionHandler is *always* triggered - that is, regardless of whether the timer "timed out" or the user completed the task? Should I associate an action with the transition? 3) Do timers (and the 'scheduler' service) required db persistence? My test workflow example isn't persistent (though in the future it probably will be). My understanding is that I only need to enable the 'scheduler' property in my jbpm.cfg.xml file and make sure that the JbpmThreadsServlet is configured correctly in my web app's web.xml file. Is that correct? Thanks in advance, pf View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4029157#4029157 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4029157 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user