[jboss-user] [JBoss jBPM] - Timer on node clarification
o_lion
do-not-reply at jboss.com
Thu Apr 9 09:26:57 EDT 2009
Hi all,
I'm beginner. I have a problem.
I put a timer and an action on a node, but the timer never start.
To start the timer do I have to modify anything? What can i do, have you got any idea?
I have Jboss 4.2.3 GA and JBPM jbpm-3.2.6.SP1.
My deployed process is:
<?xml version="1.0" encoding="UTF-8"?>
<process-definition xmlns="urn:jbpm.org:jpdl-3.2"
name="processname">
<start-state name="init">
</start-state>
test
getValue
<end-state name="finish"></end-state>
</process-definition>
I execute the process in my web application so:
JbpmContext context= JbpmConfiguration.getInstance().createJbpmContext();
try {
Map <String , Object> variables= new HashMap<String, Object>();
JbpmInputsParameter inputs= new JbpmInputsParameter();
variables.put("inputsBean", inputs);
System.out.println("Start process: "+Calendar.getInstance().getTime());
ProcessInstance instance = context.newProcessInstance("process name");
instance.addInitialContextVariables(variables);
while (!instance.hasEnded()) {
System.out.println("I'm in state "+instance.getRootToken().getNode().getName());
instance.signal();
}
System.out.println("End process: "+Calendar.getInstance().getTime());
System.out.println("The result is: "+instance.getContextInstance().getVariable("result"));
} catch (Exception e) {
e.printStackTrace();
}finally{
context.close();
}
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4224684#4224684
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4224684
More information about the jboss-user
mailing list