[JBoss jBPM] - Overdue actions, timers.
by jjrs
Hi,
Our process definitions are based on nodes and actions inside them (being executed in async mode). We are using jBPM for controlling batch processes, therefore I thought the best option was using nodetype "node".
One of the requirements is notifying if one of the actions is "running late", if it's overdue (for example if it has been running for 30 minutes and still hasn't finished)
I have been trying to associate a timer to an action or a node for trying to obtain this behaviour, but the only thing I have been able to do is to "schedule" the execution of the action, although not being able to supervise its duration.
Is there an easy way to obtain this functionality from jBPM or should I code that functionality inside my actions ?
Thanks a lot in advance.
Regards.
Jose.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4217549#4217549
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4217549
17 years, 1 month
[JBoss jBPM] - Fork, Join SubProcess
by margotmedia
Use Case
- create a process definition that manage more sub-processes's instances.
- after all sub-process are created wait until all sub-processes finish.
I implemented this use case using a Custom Fork that create the sub-process, but the problem with it is that the Join don't wait until all processes finish.
Could you give me an idea how to implement this?
Thanks
Next is my process definition and my action code.
| <?xml version="1.0" encoding="UTF-8"?>
|
| <process-definition xmlns="" name="notificaRegistrazione">
|
|
| <start-state name="Richiesta registrazione">
| <controller>
| <variable name="decisionCustom.counter" />
| </controller>
|
| <transition to="Crea Evento Azienda da visitare" name="inviaRegistrazione"></transition>
| </start-state>
|
|
| <task-node name="Crea Evento Azienda da visitare">
| <task name="crea_visita">
| <assignment pooled-actors="mediatore"></assignment>
| </task>
| <transition to="decisionCustom" name="invia"></transition>
| </task-node>
|
|
|
| <task-node name="Riempire questionario (Visualizza Admin)">
| <task name="compilaQuestionario">
| <assignment pooled-actors="utenteContadino"></assignment>
| </task>
| <transition to="Contadino Accettato" name="fine"></transition>
| </task-node>
|
| <process-state name="SubProcessNotifica">
| <sub-process name="notificaRequestReply"></sub-process>
| <variable access="read" name="provaMessaggio" mapped-name="notifyMessageRequest"></variable>
| <transition to="CustomJoin" name="forkJoinEnd"></transition>
| </process-state>
|
| <fork name="CustomFork" >
| <transition to="SubProcessNotifica" name="forkJoinStart"></transition>
| <transition to="decisionCustom" name="to decision1"></transition>
| </fork>
|
| <join name="CustomJoin">
| <transition to="Riempire questionario (Visualizza Admin)" name="rispostaQuestionario"></transition>
| </join>
|
| <decision name="decisionCustom">
| <handler class="org.domain.SeamAmiciDelGas.processes.CounterDecision"/>
| <transition to="CustomJoin" name="no"></transition>
| <transition to="CustomFork" name="yes"></transition>
| </decision>
|
| <end-state name="Contadino Accettato"></end-state>
|
| </process-definition>
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4217518#4217518
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4217518
17 years, 1 month
[JBoss jBPM] - Re: Using Drools for jBPM decision
by turpin_vincent
For testing, i have recreate a Decision handler based on the code below:
16: public class DroolsDecisionHandler extends DroolsHandler implements
| 17: DecisionHandler {
| 18: private static final long serialVersionUID = -8900810376838166513L;
| 19:
| 20: public List<String> assertObjects;
| 21: public String workingMemoryName;
| 22:
| 23: public String decide(ExecutionContext executionContext)
| 24: throws Exception {
| 25: WorkingMemory workingMemory = getWorkingMemory(
| 26: workingMemoryName, assertObjects, executionContext);
| 27: workingMemory.setGlobal("decision", new Decision());
| 28: workingMemory.fireAllRules();
| 29: return ((Decision) workingMemory.getGlobal("decision"))
| 30: .getOutcome();
| 31: }
| 32:
| 33: }
|
And I have found that the executionContext was unable to solve my objects.
For example,
(Iteration on assertObjects)
| ContextInstance ci = executionContext.getContextInstance();
|
| while (iter.hasNext()) {
| objectName = (String) iter.next();
| object = ci.getVariable(objectName);
| System.out.println("object name is: " + objectName);
| workingMemory.assertObject(object);
| }
|
|
object are always null!
That shows me that object are never mapped!
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4217505#4217505
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4217505
17 years, 1 month