jDev Dev [
http://community.jboss.org/people/dSalam] replied to the discussion
"JBPM mail using JSF expressions, how?"
To view the discussion, visit:
http://community.jboss.org/message/552917#552917
--------------------------------------------------------------
... And this is my class that deploys the process and starts job executions
public void execute() throws Exception
{
ProcessDefinition processDefinition =
ProcessDefinition.parseXmlResource("TimerProcess/Tprocessdefinition.xml");
JbpmContext jbpmContext= JbpmConfiguration.getInstance().createJbpmContext();
System.out.println("------ parsing");
try{
// Create an instance of the process definition.
ProcessInstance instance = processDefinition.createProcessInstance();
System.out.println("------------ deploying process");
jbpmContext.deployProcessDefinition(processDefinition);
instance.signal("trSetTimer");
JobExecutor jobExecutor =
jbpmContext.getJbpmConfiguration().getJobExecutor();
if (jobExecutor==null) {
throw new JbpmException("no job executor configured in resource
");
}
jobExecutor.start();
jbpmContext.save(instance);
}finally{
jbpmContext.close();
}
}
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/552917#552917]
Start a new discussion in jBPM at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]