[jboss-user] [JBoss jBPM] - Re: task in start state
It worked. Thanks, Debnath View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4122478#4122478 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4122478 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss jBPM] - Re: task in start state
Hi Here is the JUnit test case. Please check if the APIs have been used correctly Thanks, Debnath package org.jbpm.tutorial.startstatetask; | | import org.jbpm.graph.def.ProcessDefinition; | import org.jbpm.graph.exe.ProcessInstance; | import org.jbpm.graph.exe.Token; | import org.jbpm.taskmgmt.exe.TaskMgmtInstance; | | import junit.framework.TestCase; | | public class StartStateTask extends TestCase { | public void testStartStateTask() { | | ProcessDefinition processDefinition = ProcessDefinition.parseXmlString( | " " + | " " + | " " + | " " + | " " + | " " + | " " + | " " + | " " + | " " + | " " + | " " + | " " + | " " + | " " + | "" + | "" + | "" + | ""); | | ProcessInstance processInstance = | new ProcessInstance(processDefinition); | | Token token = processInstance.getRootToken(); | TaskMgmtInstance taskmgmtInstance = processInstance.getTaskMgmtInstance(); | assertEquals(true, taskmgmtInstance.hasUnfinishedTasks(token)); | } } View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4120378#4120378 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4120378 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss jBPM] - Re: task in start state
Hi I have the following state definition (fragment): | | | | | | | | | ... I use the following code to create a process Instance: ProcessDefinition processDefinition = ProcessDefinition.parseXmlString( ); ProcessInstance processInstance = new ProcessInstance(processDefinition); Later, I call the following code: TaskMgmtInstance taskmgmtInstance = processInstance.getTaskMgmtInstance(); Token token = processInstance.getRootToken(); if (taskmgmtInstance.hasUnfinishedTasks(token) == false) { ... } else { ... } However, even though the start state has a task, it seems to enter the "if" block, not the "else" part. Any suggestions would be appreciated. Thanks, Debnath View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4120312#4120312 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4120312 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user