-
1. Re: The bpmn process flow not moving forward from one node to another automatically
salaboy21 Oct 18, 2011 7:47 AM (in response to jaiyachandhiran)BPMN process inside jBPM3? that's new for me.. I'm pretty sure that you are just creating a jPDL process right?
WIth that degree of detail is almost impossible to help you, can you share the process XML file definition? The jBPM3.2 docs and the book https://www.packtpub.com/jbpm-developer-guide/book
will defenitely help you out.
Cheers
-
2. Re: The bpmn process flow not moving forward from one node to another automatically
jaiyachandhiran Oct 18, 2011 10:02 AM (in response to salaboy21)Hi
I have attached the Process definition file. I need to move from one node to another . In this example afte the state Node[first] it will go to Dev Connection Node ( Inside I have written a java code which i have mentioned below ) and then after this i have used a decision ,here i want the message= Yes to be passed to decision , so that another node will be called else it will go to end.
My Problem is after the Dev connection Node its not moving to decision. And another thing is how to send the paramter to decision from Dev Conncetion . Please Help me out.
If u have questions please reply me i will post more information for u to help me.
Java Code
public void execute(ExecutionContext context) throws Exception {
String query = "SELECT login_name from rs_users where user_id = 2";
try
{
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","resonancedev","resonancedev");
Statement stmt = con.createStatement();
//int rs = stmt.executeUpdate(query1);
ResultSet rs = stmt.executeQuery(query);
while (rs.next()) {
message = rs.getString("login_name");
message = "Yes";
System.out.println("name-->" +message);
}
con.close();
}
catch (Exception e) {
// TODO: handle exception
message = e.toString();
}
context.getContextInstance().setVariable("message", message);
}
-
processimage.jpg 22.8 KB
-
-
3. Re: The bpmn process flow not moving forward from one node to another automatically
salaboy21 Oct 18, 2011 11:15 AM (in response to jaiyachandhiran)I didn't analyze too much your code, but if you signal the node as soon as you finish doing your code it will move to the next node in the graph.
Try with context.signal() or some equivalent. I don't remember the syntax right and I don't have a jbpm3 project by hand to test it here...
Doing this: context.getContextInstance().setVariable("message", message);
You are setting a variable called message to the process context and then you can use that variable in the decision node. Make sure that you define that variable at process level.
Cheers
-
4. Re: The bpmn process flow not moving forward from one node to another automatically
jaiyachandhiran Oct 18, 2011 12:49 PM (in response to salaboy21)thanks for ur reply. i will try it tommorow morning and reply back u the result.
-
5. Re: The bpmn process flow not moving forward from one node to another automatically
jaiyachandhiran Oct 19, 2011 2:15 AM (in response to jaiyachandhiran)Hi
I tried context.leaveNode(); in the Action Handler , but when i start the process i get the below error.
Failed to start process: org.jbpm.graph.def.DelegationException
WHy the one line code gives this error, any jar or files needed?
Please Help me out.
-
6. Re: The bpmn process flow not moving forward from one node to another automatically
jaiyachandhiran Oct 28, 2011 1:43 AM (in response to jaiyachandhiran)Hi
The context.leaveNode(); in the Action Handler is working fine. The problem is actually in my flow. So for moving forward from one node to another we can use context.leaveNode(); in the Action Handler.