[jboss-user] [JBoss jBPM] - Re: dynamically create tasks
AJanz
do-not-reply at jboss.com
Sat Oct 4 16:42:30 EDT 2008
ok here is the test
| public void testRuntimeTaskCreation() {
| ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(
| "<process-definition>" +
| "<start-state name='Start'>" +
| " <transition to='in Bearbeitung' name='beginnen'></transition>" +
| "</start-state> " +
| " <task-node name='in Bearbeitung' signal='never'> " +
| "<transition to='Ende' name='beenden' ></transition>" +
| "<transition to='in Bearbeitung' name='nicht zuständig, weitergeleitet'></transition>"+
| "<transition to='in Bearbeitung' name='beantwortet'></transition> " +
| "<transition to='in Bearbeitung' name='nicht zuständig, zurück an Initiator'></transition>" +
| "</task-node>"+
| "<end-state name='Ende'></end-state> </process-definition>");
|
|
| ProcessInstance processInstance = new ProcessInstance(processDefinition);
| processInstance.signal("beginnen");
|
| TaskMgmtInstance tmi = (TaskMgmtInstance) processInstance.getInstance(TaskMgmtInstance.class);
| TaskInstance ti = tmi.createTaskInstance();
| if ( ti !=null) System.out.println("error creating task");
| else System.out.println("Task created!");
| }
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4180408#4180408
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4180408
More information about the jboss-user
mailing list