Ok,
I apologize in advance. I have been searching around for hours and haven't come up
with anything, since this has got to be something easy, I can only conclude that I am
being stupid.
So I am trying to setup a very simple Junit testcase for a process which includes a couple
of task nodes assigned to a swimlane.
I setup things using the eclipse "Process Project" template, which it nicely
sets up a hibernate.cfg.xml to pointing to:
jdbc:hsqldb:mem:.
(One time use memory db??)
When I run my testcase I get the DelegationException below which I am quite sure is
because it can't find the user I specified in the swimlane
So the question is, how do I set it up so that the users get added each time I run the
JUnit test?
| org.jbpm.graph.def.DelegationException
| at
org.jbpm.taskmgmt.exe.TaskMgmtInstance.performAssignment(TaskMgmtInstance.java:208)
| at
org.jbpm.taskmgmt.exe.TaskMgmtInstance.getInitializedSwimlaneInstance(TaskMgmtInstance.java:176)
| at org.jbpm.taskmgmt.exe.TaskInstance.assign(TaskInstance.java:192)
| at
org.jbpm.taskmgmt.exe.TaskMgmtInstance.createTaskInstance(TaskMgmtInstance.java:148)
| at org.jbpm.graph.node.TaskNode.execute(TaskNode.java:167)
| at org.jbpm.graph.def.Node.enter(Node.java:316)
| at org.jbpm.graph.def.Transition.take(Transition.java:119)
| at org.jbpm.graph.def.Node.leave(Node.java:383)
| at org.jbpm.graph.def.Node.leave(Node.java:358)
| at org.jbpm.graph.node.Fork.execute(Fork.java:134)
| at org.jbpm.graph.def.Node.enter(Node.java:316)
| at org.jbpm.graph.def.Transition.take(Transition.java:119)
| at org.jbpm.graph.def.Node.leave(Node.java:383)
| at org.jbpm.graph.node.StartState.leave(StartState.java:70)
| at org.jbpm.graph.exe.Token.signal(Token.java:174)
| at org.jbpm.graph.exe.Token.signal(Token.java:123)
| at org.jbpm.graph.exe.ProcessInstance.signal(ProcessInstance.java:217)
| at org.kbtoys.jrw.SimpleTest.testProcess(SimpleTest.java:25)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| 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.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
| at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
| at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
| at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
| at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
| at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
| Caused by: org.jbpm.identity.assignment.ExpressionAssignmentException: couldn't
resolve assignment expression 'user(grover)'
| at
org.jbpm.identity.assignment.ExpressionAssignmentHandler.assign(ExpressionAssignmentHandler.java:97)
| at
org.jbpm.taskmgmt.exe.TaskMgmtInstance.performAssignmentDelegation(TaskMgmtInstance.java:217)
| at
org.jbpm.taskmgmt.exe.TaskMgmtInstance.performAssignment(TaskMgmtInstance.java:193)
| ... 35 more
| Caused by: java.lang.RuntimeException: no active JbpmContext for resolving assignment
expression'user(grover)'
| at
org.jbpm.identity.assignment.ExpressionAssignmentHandler.getExpressionSession(ExpressionAssignmentHandler.java:109)
| at
org.jbpm.identity.assignment.ExpressionAssignmentHandler.assign(ExpressionAssignmentHandler.java:69)
| ... 37 more
|
|
Thanks!
Jeremy
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3966837#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...