[JBoss jBPM] - Re: Problem trying Class Tutorial
by falazar
Set the classpath and moved forward....
The last part of it is throwing an error.... When running figure 4.8
CastException error... but I dont know why
15:30:49,146 [main] DEBUG GraphElement : event 'process-start' on 'ProcessDefinition(TestActionClass)' for 'Token(/)'
15:30:49,149 [main] DEBUG GraphElement : event 'before-signal' on 'StartState(start)' for 'Token(/)'
15:30:49,150 [main] DEBUG GraphElement : event 'node-leave' on 'StartState(start)' for 'Token(/)'
15:30:49,151 [main] DEBUG GraphElement : event 'transition' on 'Transition(to_auction)' for 'Token(/)'
15:30:49,152 [main] DEBUG GraphElement : executing action 'action[hello]'
15:30:49,161 [main] ERROR GraphElement : action threw exception: com.jbay.action.HelloActionHandler
java.lang.ClassCastException: com.jbay.action.HelloActionHandler
at org.jbpm.graph.def.Action.execute(Action.java:122)
at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:235)
at org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:212)
at org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:182)
at org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:166)
at org.jbpm.graph.def.Transition.take(Transition.java:106)
at org.jbpm.graph.def.Node.leave(Node.java:382)
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 com.jbay.HelloTest.testProcess(HelloTest.java:26)
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.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)
1
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958952#3958952
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958952
19 years, 9 months
[JBoss Eclipse IDE (users)] - Re: Frequent
by znbailey
Rob,
Absolutely. My configuration information is as follows:
JBoss 3.2.7, using the "default" configuration. Deploying in a flat file EAR.
The error message in the error console (and in the dialog that appears) is as follows:
Timeout waiting for JbossServer Cascade Server 4.x (TRUNK) to start. Server did not start after 450s.
The Exception Stack Trace is not available.
Here is the session data, as available from the "event details":
eclipse.buildId=M20060629-1905
| java.version=1.5.0_05
| java.vendor=Sun Microsystems Inc.
| BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
| Command-line arguments: -os win32 -ws win32 -arch x86
My program arguments are : "--configuration=default --host=localhost"
VM arguments: "-Xms256m -Xmx512m"
Let me know if I can get you any other information.
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958948#3958948
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958948
19 years, 9 months
[JBoss jBPM] - Re: JBPM TaskCreation at RunTime
by abbasshah
Hope it is clear now
<process-definition xmlns='' name='TestProcess'>
| <start-state name='start'>
| <transition name='' to='setup'>< /transition>
| </start-state>
| <node name='setup'>
| <action class='com.sample.SetupProcessActionHandler'/>
| <transition name='' to='TNODE1'>< /transition>
| </node>
|
| <task-node name='TNODE1' signal='never' create-tasks='false'>
| <event type='node-enter'>
| <action class='com.sample.testTask.OnNodeEnter'/>
| </event>
| <task name='TASK_EAT'>
| <event type='task-create'>
| <action class='com.sample.testTask.OnTaskCreation'/>
| </event>
| <event type='task-end'>
| <action class='com.sample.testTask.OnComplete'/>
| </event>
| </task>
|
| <task name='TASK_DRINK'>
| <event type='task-create'>
| <action class='com.sample.testTask.OnTaskCreation'/>
| </event>
| <event type='task-end'>
| <action class='com.sample.testTask.OnComplete'/>
| </event>
| </task>
|
| <transition name='' to='TNODE2'>< /transition>
| </task-node>
|
| <task-node name='TNODE2' signal='never' create-tasks='false'>
| <event type='node-enter'>
| <action class='com.sample.testTask.OnNodeEnter2'/>
| </event>
|
| <task name='TASK_SLEEP'>
| <event type='task-create'>
| <action class='com.sample.testTask.OnTaskCreation'/>
| </event>
| <event type='task-end'>
| <action class='com.sample.testTask.OnComplete'/>
| </event>
| </task>
| <transition name='' to='end'>< /transition>
| </task-node>
|
| <node name='loopback'>
| <transition name='' to='TNODE1'></transition>
| </node>
|
| <end-state name='end'></end-state>
|
| </process-definition>
anonymous wrote : TNODE1 Task Creation Handler
public class OnNodeEnter implements ActionHandler {
|
| public void execute(ExecutionContext executionContext) throws Exception {
| System.out.println("OnNodeEnter-->- Start");
|
| Token token = executionContext.getToken();
| TaskMgmtInstance tmi = executionContext.getTaskMgmtInstance();
| TaskNode taskNode = (TaskNode) executionContext.getNode();
|
|
| Task doEAT = taskNode.getTask("TASK_EAT");
| tmi.createTaskInstance(doEAT, token);
|
| Task doDrink = taskNode.getTask("TASK_DRINK");
| tmi.createTaskInstance(doDrink, token);
|
| System.out.println("OnNodeEnter-->- END");
| }
| }
anonymous wrote : TNODE2 Task Creation Handler
| public class OnNodeEnter2 implements ActionHandler {
|
| public void execute(ExecutionContext executionContext) throws Exception {
| System.out.println("OnNodeEnter2-->- Start");
|
| Token token = executionContext.getToken();
| TaskMgmtInstance tmi = executionContext.getTaskMgmtInstance();
| TaskNode taskNode = (TaskNode) executionContext.getNode();
|
| Task doSleep = taskNode.getTask("TASK_SLEEP");
| tmi.createTaskInstance(doSleep, token);
|
| System.out.println("OnNodeEnter2-->- END");
| }
| }
anonymous wrote : ActionHandler on task-create event on all tasks
public class OnTaskCreation implements ActionHandler {
| public void execute(ExecutionContext executionContext) throws Exception {
| System.out.println("--> TaskInstacne Id ="+executionContext.getTaskInstance().getName());
| System.out.println("--> TaskInstacne Id ="+executionContext.getTaskInstance().getId());
| }
| }
anonymous wrote : Process Exceution and TASK_EAT ending
Following test is within transaction and in the end i rollback transaction, so that in case of exception nothing is populated in tables.
public void testRunTimeTaskCreation() {
| try {
| loadProcessDefinition(processDef);
|
| Long processInstanceId = createNewProcessInstance();
| ProcessInstance processInstance = findProcessInstance(processInstanceId);
|
| Collection<TaskInstance> tasks = processInstance.getTaskMgmtInstance().getTaskInstances();
|
| // only complete TASK_EAT which get created once process is created
|
| for (TaskInstance task : tasks) {
| System.out.println("----------Task name = "+task.getName());
| if (task.getName().equals("TASK_EAT")) {
|
| assignAndStart(task);
| task.end(); // end the task and transit to TNODE2, leave TASK_DIRNK as it is (uncompleted)
| break;
| }
| }
| } catch (Exception e) {
| e.printStackTrace();
| fail();
| }
|
| }
|
anonymous wrote : OnCreation Actionhandler is giving following out put, if above test is run all togather in same transaction.
:
TaskInstacne Name = TASK_EAT
TaskInstacne Id = 700
TaskInstacne Name = TASK_DRINK
TaskInstacne Id = 701
.....
TaskInstacne Name = TASK_SLEEP
TaskInstacne Id = 0
anonymous wrote : if above test is divided in two test , 1. create process and commit trans then , 2. complete TASK_EAT is perform in different within separate trans output is.
:
TaskInstacne Name = TASK_EAT
TaskInstacne Id = 702
TaskInstacne Name = TASK_DRINK
TaskInstacne Id = 703
.
.
.
TaskInstacne Name = TASK_SLEEP
TaskInstacne Id = 704
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958942#3958942
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958942
19 years, 9 months