Following changes I did:

1. Read rootToken from the instance I read from the database.

Token rootToken = procInst.getRootToken();

2. signal the rootToken by specifying transition name

rootToken.signal("toReadLoansData");

But now I am getting following error
java.lang.IllegalStateException: couldn't signal token 'Token(/)' : couldn't 
leave node 'null' over the its transition 'toReadLoansData'
        at org.jbpm.graph.exe.Token.signal(Token.java:101)
        at 
com.sample.SimpleProcessTest.readProcessInstance(SimpleProcessTest.java:199)
        at 
com.sample.SimpleProcessTest.testSimpleProcess(SimpleProcessTest.java:25)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at junit.framework.TestCase.runTest(TestCase.java:154)
        at junit.framework.TestCase.runBare(TestCase.java:127)
        at junit.framework.TestResult$1.protect(TestResult.java:106)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.framework.TestResult.run(TestResult.java:109)
        at junit.framework.TestCase.run(TestCase.java:118)
        at junit.framework.TestSuite.runTest(TestSuite.java:208)
        at junit.framework.TestSuite.run(TestSuite.java:203)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

I don't understand when it says 'couldn't leave node 'null'' , which node it is 
refering to and which it getting as NULL.

I want to achieve following:
- Create Process Definition and store it in database using 
jbpmSession.getGraphSession().saveProcessDefinition(definition);

I am using MSSQL. This process has one State node at which execution should 
wait for external input. I have to use State and not task-node as i want to 
take user input.

- create process instances of this process and start execution.  The instance 
will wait at the State node.  Store the waiting processing instance in database.

- Read the saved process instance from the database when external input is 
received and restart the execution.

Please confirm that the approach is correct.  Thanks for any better approaches.

Regards,
Nilesh


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3911703#3911703

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3911703


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to