-
1. Re: jBPM 3.1alpha Feedback
koen.aers Nov 30, 2005 5:07 AM (in response to bpoweski)Thanks for your complements. We always get this warm feeling when we get those ;-)
But let me quickly put you at ease with your concerns involving the ContextBuilder mechanism. ContextBuilder is already vanished from cvs. We are working towards support for 3rd party microcontainers. So there will be a native 'mini-microcontainer', but it will be possible to plug-in Sprint as well as JBoss Microcontainer.
Regards,
Koen -
2. Re: jBPM 3.1alpha Feedback
bpoweski Nov 30, 2005 11:39 AM (in response to bpoweski)That is great to hear, I look forward to setting up the next build.
-b -
3. Re: jBPM 3.1alpha Feedback
chprvkmr Dec 6, 2005 9:18 AM (in response to bpoweski)Hi,
It seems console output during transitions/events disabled in this version eg. while node-enter,node-leave etc.. How to enable them? -
4. Re: jBPM 3.1alpha Feedback
kukeltje Dec 6, 2005 1:22 PM (in response to bpoweski)change the log4j config to log the org.jbpm classes at debug level. You can see what get's logged and reduce it again after that.
-
5. Re: jBPM 3.1alpha Feedback
chprvkmr Dec 7, 2005 4:42 AM (in response to bpoweski)Hi,
While trying for async nodes, actions are passed to MessageService but they are not getting executed by Command Executor.
Process definition<?xml version="1.0" encoding="UTF-8"?> <process-definition name="forktest2"> <!-- SWIMLANES (= process roles) --> <swimlane name="user1"> <assignment expression="user(ernie)" /> </swimlane> <swimlane name="user2"> <assignment expression="user(bert)" /> </swimlane> <swimlane name="user3"> <assignment expression="user(grover)" /> </swimlane> <swimlane name="user4"> <assignment expression="user(cookie monster)" /> </swimlane> <!-- NODES --> <start-state name="state-1"> <task> <controller> <variable name="initiatorname" /> <variable name="fileName" /> <variable name="pathName" /> </controller> </task> <transition to="fork1" /> </start-state> <fork name="fork1"> <transition name="to state-2" to="state-2" /> <transition name="to state-4" to="state-4" /> </fork> <task-node name="state-2"> <task swimlane="user1"> <controller> <variable name="initiatorname" access="read"/> <variable name="state-2-yourname"/> </controller> </task> <transition to="state-3" /> </task-node> <node name="state-3" async='true'> <action class='org.jbpm.tutorial.action.MyActionHandler' /> <transition name="to join1" to="join1" /> </node> <task-node name="state-4"> <task swimlane="user2" > <controller> <variable name="initiatorname" access="read"/> <variable name="state-4-yourname"/> </controller> </task> <transition to="state-5" /> </task-node> <node name="state-5" async='true'> <action class='org.jbpm.tutorial.action.MyActionHandler2' /> <transition name="to join1" to="join1" /> </node> <join name="join1"> <transition name="to state-6" to="state-6" /> </join> <task-node name="state-6"> <task swimlane="user3"> <controller> <variable name="initiatorname" access="read"/> <variable name="state-2-yourname" access="read"/> <variable name="state-4-yourname" access="read"/> <variable name="state-5-yourname"/> </controller> </task> <transition to="end" /> </task-node> <end-state name="end" /> </process-definition>
-----
Action Handlerspackage org.jbpm.tutorial.action; import org.jbpm.graph.def.*; import org.jbpm.graph.exe.*; // MyActionHandler represents a class that could execute // some user code during the execution of a jBPM process. public class MyActionHandler implements ActionHandler { private static final long serialVersionUID = 1L; public void execute(ExecutionContext executionContext) { System.out.println("**action1 started**"); for(int i=1; i<500; i++){ System.out.println("[action 1] i = " + i); } System.out.println("**action1 ended**"); executionContext.leaveNode(); } }
package org.jbpm.tutorial.action; import org.jbpm.graph.def.*; import org.jbpm.graph.exe.*; // MyActionHandler represents a class that could execute // some user code during the execution of a jBPM process. public class MyActionHandler2 implements ActionHandler { private static final long serialVersionUID = 1L; public void execute(ExecutionContext executionContext) { System.out.println("**action2 started**"); for(int i=1; i<500; i++){ System.out.println("[action 2] i = " + i); } System.out.println("**action2 ended**"); executionContext.leaveNode(); } }
Process definition gets loaded nicely
14:36:44,527 DEBUG [HibernateSessionFactoryInterceptor] fetching hibernate SessionFactory from JNDI 'java:/jbpm/SessionFactory'
14:36:44,621 DEBUG [SchemaValidationHelper] activating schema validation...
14:36:48,505 DEBUG [HibernateSessionFactoryInterceptor] placed hibernate session factory in context key 'org.hibernate.SessionFactory'
14:36:48,505 DEBUG [HibernateSessionInterceptor] opening a hibernate session
14:36:48,505 DEBUG [HibernateSessionInterceptor] storing hibernate session in context key 'org.hibernate.Session'
14:36:48,521 DEBUG [HibernateSessionInterceptor] storing the jdbc connection created by hiberante in context key 'java.sql.Connection'
14:36:48,521 DEBUG [JbpmSessionInterceptor] storing jbpm sessions in the context
14:36:48,521 DEBUG [HibernateTransactionInterceptor] beginning hibernate transaction
14:36:48,521 DEBUG [SchedulerThread] checking for timers
14:36:48,521 DEBUG [HibernateTransactionInterceptor] committing hibernate transaction
14:36:48,521 DEBUG [JbpmSessionInterceptor] removing jbpm sessions from the context
14:36:48,521 DEBUG [HibernateSessionInterceptor] removing hibernate session from the context
14:36:48,521 DEBUG [HibernateSessionInterceptor] removing connection from the context
14:36:48,521 DEBUG [HibernateSessionInterceptor] closing hibernate session
14:36:48,521 DEBUG [HibernateSessionFactoryInterceptor] removing hibernate session factory from context
14:36:48,583 WARN [JpdlXmlReader] process xml warning: warning: no swimlane or assignment specified for task '<controller> <variable name="initiatorname"/> <variable name="fileName"/> <variable name="pathName"/> </controller> </task>'
14:36:48,599 DEBUG [FileDefinition] preparing file 'classes/org/jbpm/tutorial/action/MyActionHandler.class' for storage in the database
14:36:48,599 DEBUG [FileDefinition] preparing file 'classes/org/jbpm/tutorial/action/MyActionHandler2.class' for storage in the database
14:36:48,599 DEBUG [FileDefinition] preparing file 'processimage.jpg' for storage in the database
14:36:48,599 DEBUG [FileDefinition] preparing file 'classes/org/jbpm/tutorial/action/ActionTest.class' for storage in the database
14:36:48,599 DEBUG [FileDefinition] preparing file 'gpd.xml' for storage in the database
14:36:48,708 DEBUG [PersistenceContext] committing transaction
when state-2 is signalled it goes to asnc node, state-3 but not executing actionhandler
After this, there is no polling done for fetching new commands
14:38:51,936 DEBUG [LogFilter] request http://localhost:8080/jbpm/faces/task.jsp
14:38:51,936 DEBUG [LogFilter] request parameter [taskform:_link_hidden_]=
14:38:51,936 DEBUG [LogFilter] request parameter [taskform:taskInstanceId]=40
14:38:51,936 DEBUG [LogFilter] request parameter [taskform_SUBMIT]=1
14:38:51,936 DEBUG [LogFilter] request parameter [taskform:transitionButton]=Save and Close Task
14:38:51,936 DEBUG [LogFilter] request parameter [taskform:_id2_1:_id8]=iamernie
14:38:51,936 DEBUG [LogFilter] request parameter [taskform:_id2_0:_id8]=iamcm
14:38:51,936 DEBUG [LogFilter] session parameter [taskFormParameters]=[(initiatorname,iamcm), (state-2-yourname,null)]
14:38:51,936 DEBUG [LogFilter] session parameter [org.apache.myfaces.application.jsp.JspStateManagerImpl.SERIALIZED_VIEW-/task.jsp]=[Ljava.lang.Object;@8f7e20
14:38:51,936 DEBUG [LogFilter] session parameter [userBean]=org.jbpm.webapp.bean.UserBean@1ec59df
14:38:51,936 DEBUG [LogFilter] session parameter [javax.faces.request.charset]=ISO-8859-1
14:38:51,936 DEBUG [PersistenceContext] beginning transaction
14:38:51,952 DEBUG [TaskBean] saving the task parameters [(initiatorname,iamcm), (state-2-yourname,iamernie)]
14:38:51,952 DEBUG [TaskBean] ignoring unwritable [initiatorname]
14:38:51,952 DEBUG [TaskBean] submitting [state-2-yourname]=iamernie
14:38:51,952 DEBUG [JbpmSessionInterceptor] storing jbpm sessions in the context
14:38:51,967 DEBUG [JbpmSessionInterceptor] removing jbpm sessions from the context
14:38:51,967 DEBUG [TaskBean] Submitted button:Save and Close Task
14:38:51,967 WARN [StatefulPersistenceContext] Narrowing proxy to class org.jbpm.graph.node.TaskNode - this operation breaks ==
14:38:51,967 DEBUG [GraphElement] event 'task-end' on 'Task(state-2)' for 'Token(/to state-2)'
14:38:51,983 DEBUG [TaskInstance] completion of task 'state-2' results in taking the default transition
14:38:51,983 DEBUG [GraphElement] event 'before-signal' on 'TaskNode(state-2)' for 'Token(/to state-2)'
14:38:51,983 DEBUG [GraphElement] event 'node-leave' on 'TaskNode(state-2)' for 'Token(/to state-2)'
14:38:51,983 DEBUG [GraphElement] event 'transition' on 'Transition(19432e0)' for 'Token(/to state-2)'
14:38:51,998 DEBUG [GraphElement] event 'node-enter' on 'Node(state-3)' for 'Token(/to state-2)'
14:38:51,998 DEBUG [GraphElement] event 'after-signal' on 'TaskNode(state-2)' for 'Token(/to state-2)'
14:38:51,998 DEBUG [TaskBean] assignmentlogs: []
14:38:51,998 DEBUG [JbpmSessionInterceptor] storing jbpm sessions in the context
14:38:51,998 DEBUG [DbMessageServiceImpl] sending msg 'org.jbpm.command.ExecuteNodeCommand@b172ef' to destination 'EXECUTE'
14:38:51,998 DEBUG [StaticNotifier] notifying one thread (EXECUTE, java.lang.Object@116f2e6)
14:38:51,998 DEBUG [JbpmSessionInterceptor] removing jbpm sessions from the context
14:38:52,014 INFO [[/jbpm]] WARNING: Component _id13 just got an automatic id, because there was no id assigned yet. If this component was created dynamically (i.e. not by a JSP tag) you should assign it an explicit static id or assign it the id you get from the createUniqueId from the current UIViewRoot component right after creation!
14:38:52,061 DEBUG [PersistenceContext] committing transaction
14:38:52,108 DEBUG [LogFilter] request http://localhost:8080/jbpm/faces/css/jbpm.css
14:38:52,108 DEBUG [LogFilter] session parameter [org.apache.myfaces.application.jsp.JspStateManagerImpl.SERIALIZED_VIEW-/home.jsp]=[Ljava.lang.Object;@17127f4
14:38:52,108 DEBUG [LogFilter] session parameter [userBean]=org.jbpm.webapp.bean.UserBean@1ec59df
14:38:52,108 DEBUG [LogFilter] session parameter [javax.faces.request.charset]=ISO-8859-1
14:38:52,108 DEBUG [PersistenceContext] beginning transaction
14:38:52,108 DEBUG [PersistenceContext] committing transaction
14:38:52,123 DEBUG [LogFilter] request http://localhost:8080/jbpm/faces/images/logo_green.gif
14:38:52,123 DEBUG [LogFilter] session parameter [org.apache.myfaces.application.jsp.JspStateManagerImpl.SERIALIZED_VIEW-/home.jsp]=[Ljava.lang.Object;@17127f4
14:38:52,123 DEBUG [LogFilter] session parameter [userBean]=org.jbpm.webapp.bean.UserBean@1ec59df
14:38:52,123 DEBUG [LogFilter] session parameter [javax.faces.request.charset]=ISO-8859-1
when state-4 is signalled it goes to asnc node, state-5 but not executing actionhandler.
14:45:44,405 DEBUG [TaskBean] Submitted button:Save and Close Task
14:45:44,405 WARN [StatefulPersistenceContext] Narrowing proxy to class org.jbpm.graph.node.TaskNode - this operation breaks ==
14:45:44,405 DEBUG [GraphElement] event 'task-end' on 'Task(state-4)' for 'Token(/to state-4)'
14:45:44,436 DEBUG [TaskInstance] completion of task 'state-4' results in taking the default transition
14:45:44,436 DEBUG [GraphElement] event 'before-signal' on 'TaskNode(state-4)' for 'Token(/to state-4)'
14:45:44,436 DEBUG [GraphElement] event 'node-leave' on 'TaskNode(state-4)' for 'Token(/to state-4)'
14:45:44,451 DEBUG [GraphElement] event 'transition' on 'Transition(ced1ac)' for 'Token(/to state-4)'
14:45:44,451 DEBUG [GraphElement] event 'node-enter' on 'Node(state-5)' for 'Token(/to state-4)'
14:45:44,451 DEBUG [GraphElement] event 'after-signal' on 'TaskNode(state-4)' for 'Token(/to state-4)'
14:45:44,451 DEBUG [TaskBean] assignmentlogs: []
14:45:44,451 DEBUG [JbpmSessionInterceptor] storing jbpm sessions in the context
14:45:44,451 DEBUG [DbMessageServiceImpl] sending msg 'org.jbpm.command.ExecuteNodeCommand@1f4a427' to destination 'EXECUTE'
14:45:44,451 DEBUG [StaticNotifier] notifying one thread (EXECUTE, java.lang.Object@116f2e6)
When I restarted the jboss server, strangely I got the below error from command executor
14:47:41,895 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
14:47:41,895 DEBUG [SchedulerThread] checking for timers
14:47:42,161 DEBUG [HibernateTransactionInterceptor] committing hibernate transaction
14:47:42,161 DEBUG [JbpmSessionInterceptor] removing jbpm sessions from the context
14:47:42,161 DEBUG [HibernateSessionInterceptor] removing hibernate session from the context
14:47:42,161 DEBUG [HibernateSessionInterceptor] removing connection from the context
14:47:42,161 DEBUG [HibernateSessionInterceptor] closing hibernate session
14:47:42,161 DEBUG [HibernateSessionFactoryInterceptor] removing hibernate session factory from context
14:47:42,317 DEBUG [DbMessageServiceImpl] received msg 'org.jbpm.command.ExecuteNodeCommand@39d072'
14:47:42,332 DEBUG [CommandExecutor] executing command 'org.jbpm.command.ExecuteNodeCommand@39d072'
14:47:42,535 DEBUG [HibernateTransactionInterceptor] committing hibernate transaction
14:47:42,566 DEBUG [JbpmSessionInterceptor] removing jbpm sessions from the context
14:47:42,566 DEBUG [HibernateSessionInterceptor] removing hibernate session from the context
14:47:42,566 DEBUG [HibernateSessionInterceptor] removing connection from the context
14:47:42,566 DEBUG [HibernateSessionInterceptor] closing hibernate session
14:47:42,566 DEBUG [HibernateSessionFactoryInterceptor] removing hibernate session factory from context
14:47:42,566 ERROR [CommandExecutor] org.jbpm.msg.command.CommandExecutor$MessageProcessingException: message org.jbpm.command.ExecuteNodeCommand@39d07
14:47:42,566 INFO [STDOUT] org.jbpm.msg.command.CommandExecutor$MessageProcessingException: message org.jbpm.command.ExecuteNodeCommand@39d072' couldn
14:47:42,566 INFO [STDOUT] at org.jbpm.msg.command.CommandExecutor.executeCommand(CommandExecutor.java:77)
14:47:42,566 INFO [STDOUT] at org.jbpm.msg.command.CommandExecutor.run(CommandExecutor.java:34)
14:47:42,566 INFO [STDOUT] Caused by: org.jbpm.graph.def.DelegationException
14:47:42,566 INFO [STDOUT] at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:299)
14:47:42,566 INFO [STDOUT] at org.jbpm.graph.def.GraphElement$$FastClassByCGLIB$$7a7d6aa6.invoke()
14:47:42,566 INFO [STDOUT] at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
14:47:42,566 INFO [STDOUT] at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:136)
14:47:42,566 INFO [STDOUT] at org.jbpm.graph.def.ProcessDefinition$$EnhancerByCGLIB$$af249621.raiseException()
14:47:42,566 INFO [STDOUT] at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
14:47:42,566 INFO [STDOUT] at org.jbpm.graph.def.Node.execute(Node.java:314)
14:47:42,566 INFO [STDOUT] at org.jbpm.graph.def.Node$$FastClassByCGLIB$$d187eeda.invoke()
14:47:42,566 INFO [STDOUT] at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
14:47:42,582 INFO [STDOUT] at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:136)
14:47:42,582 INFO [STDOUT] at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$6292fdb1.execute()
14:47:42,582 INFO [STDOUT] at org.jbpm.command.ExecuteNodeCommand.execute(ExecuteNodeCommand.java:29)
14:47:42,582 INFO [STDOUT] at org.jbpm.msg.command.CommandExecutor.executeCommand(CommandExecutor.java:72)
14:47:42,582 INFO [STDOUT] ... 1 more
14:47:42,582 INFO [STDOUT] Caused by: java.lang.RuntimeException: couldn't get value for file 'classes/org/jbpm/tutorial/action/MyActionHandler.class'
14:47:42,582 INFO [STDOUT] at org.jbpm.file.def.FileDefinition.getBytes(FileDefinition.java:160)
14:47:42,582 INFO [STDOUT] at org.jbpm.instantiation.ProcessClassLoader.findClass(ProcessClassLoader.java:34)
14:47:42,582 INFO [STDOUT] at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
14:47:42,582 INFO [STDOUT] at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
14:47:42,582 INFO [STDOUT] at org.jbpm.instantiation.Delegation.instantiate(Delegation.java:105)
14:47:42,582 INFO [STDOUT] at org.jbpm.instantiation.Delegation.getInstance(Delegation.java:90)
14:47:42,582 INFO [STDOUT] at org.jbpm.instantiation.Delegation$$FastClassByCGLIB$$6bae1598.invoke()
14:47:42,582 INFO [STDOUT] at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
14:47:42,582 INFO [STDOUT] at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:136)
14:47:42,582 INFO [STDOUT] at org.jbpm.instantiation.Delegation$$EnhancerByCGLIB$$48e0ab6f.getInstance()
14:47:42,582 INFO [STDOUT] at org.jbpm.graph.def.Action.execute(Action.java:94)
14:47:42,582 INFO [STDOUT] at org.jbpm.graph.def.Action$$FastClassByCGLIB$$7876e90e.invoke()
14:47:42,582 INFO [STDOUT] at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
14:47:42,582 INFO [STDOUT] at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:136)
14:47:42,582 INFO [STDOUT] at org.jbpm.graph.def.Action$$EnhancerByCGLIB$$627501e5.execute()
14:47:42,582 INFO [STDOUT] at org.jbpm.graph.def.Node.execute(Node.java:310)
14:47:42,660 INFO [STDOUT] ... 7 more
14:47:42,660 INFO [STDOUT] Caused by: java.lang.RuntimeException: file 'classes/org/jbpm/tutorial/action/MyActionHandler.class' not found in db
14:47:42,660 INFO [STDOUT] at org.jbpm.file.def.FileDefinition.getByteArray(FileDefinition.java:184)
14:47:42,660 INFO [STDOUT] at org.jbpm.file.def.FileDefinition.getBytesFromDb(FileDefinition.java:176)
14:47:42,660 INFO [STDOUT] at org.jbpm.file.def.FileDefinition.getBytes(FileDefinition.java:157)
14:47:42,660 INFO [STDOUT] ... 22 more
14:47:42,660 DEBUG [HibernateSessionFactoryInterceptor] fetching hibernate SessionFactory from JNDI 'java:/jbpm/SessionFactory'
14:47:42,660 DEBUG [HibernateSessionFactoryInterceptor] fetching hibernate SessionFactory from JNDI 'java:/jbpm/SessionFactory'
14:47:42,660 DEBUG [HibernateSessionFactoryInterceptor] placed hibernate session factory in context key 'org.hibernate.SessionFactory'
14:47:42,660 DEBUG [HibernateSessionInterceptor] opening a hibernate session
14:47:42,660 DEBUG [HibernateSessionInterceptor] storing hibernate session in context key 'org.hibernate.Session'
14:47:42,660 DEBUG [HibernateSessionInterceptor] storing the jdbc connection created by hiberante in context key 'java.sql.Connection'
14:47:42,660 DEBUG [JbpmSessionInterceptor] storing jbpm sessions in the context
14:47:42,660 DEBUG [HibernateTransactionInterceptor] beginning hibernate transaction
14:47:42,660 DEBUG [DbMessageServiceImpl] received msg by id 'null'
14:47:42,660 DEBUG [HibernateTransactionInterceptor] committing hibernate transaction
14:47:42,660 DEBUG [JbpmSessionInterceptor] removing jbpm sessions from the context
14:47:42,660 DEBUG [HibernateSessionInterceptor] removing hibernate session from the context
14:47:42,660 DEBUG [HibernateSessionInterceptor] removing connection from the context
14:47:42,660 DEBUG [HibernateSessionInterceptor] closing hibernate session
14:47:42,660 DEBUG [HibernateSessionFactoryInterceptor] removing hibernate session factory from context
14:47:42,660 INFO [STDOUT] Exception in thread "CommandExecutor(EXECUTE)"
14:47:42,660 INFO [STDOUT] java.lang.IllegalArgumentException: attempt to create delete event with null entity
14:47:42,738 INFO [STDOUT] at org.hibernate.event.DeleteEvent.(DeleteEvent.java:24)
14:47:42,738 INFO [STDOUT] at org.hibernate.impl.SessionImpl.delete(SessionImpl.java:663)
14:47:42,738 INFO [STDOUT] at org.jbpm.db.MessagingSession.delete(MessagingSession.java:28)
14:47:42,738 INFO [STDOUT] at org.jbpm.msg.db.DbMessageServiceImpl.receiveByIdNoWait(DbMessageServiceImpl.java:55)
14:47:42,738 INFO [STDOUT] at org.jbpm.msg.command.CommandExecutor.handleProcessingException(CommandExecutor.java:101)
14:47:42,738 INFO [STDOUT] at org.jbpm.msg.command.CommandExecutor.run(CommandExecutor.java:39)