hi,
i had tried your solution but when i put expression in decision node in my xpdl
file the workflow already goes in the default branch and if i don't put any
expression in decision node the file is block in the node. i join my xpld file
and my file of exploration if you see any errors can you help me to understand
how works this workflow because i'm a beginner in this domain and it's
difficult to understand how works this technologie. thx tou for your help
the JAVA FILE: (JUnit)
|
| package com.testjbpm;
|
| import org.jbpm.graph.def.*;
| import org.jbpm.graph.exe.*;
| import org.jbpm.jpdl.xml.*;
| import org.jbpm.taskmgmt.exe.TaskInstance;
| import junit.framework.TestCase;
|
| public class testjbpm extends TestCase {
| public void testProcess() throws Exception{
| String x1="non";
|
| System.out.println("enter your value of x1");
| x1= clavier.lireString();
|
| java.io.FileReader reader= new
java.io.FileReader("eclipse/testjbpm/src/java/testjbpm.par/processdefinition.xml");
|
| JpdlXmlReader test= new JpdlXmlReader(reader);
|
| ProcessDefinition definition =
| test.readProcessDefinition();
| assertNotNull("Definition should be not null",
definition);
|
| ProcessInstance instance = new
ProcessInstance(definition);
| TaskInstance task =new TaskInstance("Analyse
DA","acheteur");
|
| if (x1=="non"){
| task.end();
| System.out.println("la transition est non");
| }
| else{
| if(x1=="oui"){
| task.end("oui");
| System.out.println("la transition est
oui");
| }
| else{
| System.out.println("problem");
}
| }
|
| System.out.println("task Id is
+task.getAvailableTransitions());
| instance.signal();
|
| }
| }
|
|
my XPLD FILE:
| <?xml version="1.0" encoding="UTF-8"?>
|
| <process-definition
| xmlns="urn:jbpm.org:jpdl-3.1" name="testjbpm">
| <start-state name="start">
| <transition name="start_to_AnalyseDA" to="Analyse DA">
| </transition>
|
| </start-state>
| <task-node name="Analyse DA">
| <transition name="" to="fournisseur existe-t-il?"></transition>
| </task-node>
| <decision name="fournisseur existe-t-il?" expression="non">
| <transition name="oui" to="traitement DA" >
| </transition>
| <transition name="non" to="peut-on réorienter la DA vers fournisseur
existant?">
| </transition>
| </decision>
| <task-node name="traitement DA">
| <transition name="" to="end1"></transition>
| </task-node>
| <decision name="peut-on réorienter la DA vers fournisseur existant?"
expression="oui">
| <transition name="oui" to="traitement DA">
| </transition>
| <transition name="non" to="fournisseur existe dans SAP?">
| </transition>
| </decision>
|
| ...............
|
thank you very much for your help
Antitrust1982
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3928483#3928483
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3928483
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user