[JBoss-user] [JBoss jBPM] - Re: Need Help for Sub-Process
You have to do it in the XML. There is no GUI component for the sub process. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3913388#3913388 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3913388 --- 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=7637alloc_id=16865op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: Need some help for GPD
This helps you create a process definition and test it. Are you asking how to deploy the process definition into the database? That would deploying the par file. I'm not sure if the GPD comes with a build.xml so you can do it with ant. I've got one, but it's been so long, I'm not sure if I made it from scratch or it came with the GPD. Sean I've included the build.xml for reference. You will need to change it to fit your project, but it is very handy... | ?xml version=1.0? | project name=EJB Creator default=create_par basedir=. | | !-- VARIABLES THAT NEED CUSTOMIZED -- | | property name=jbpm.home value=C:/stuff/installs/jboss_jbpm/jbpm-starters-kit-with-eclipse-3.0/jbpm-starters-kit-with-eclipse-3.0/jbpm / | property name=jboss.home value=C:/stuff/installs/jboss_jbpm/jbpm-starters-kit-with-eclipse-3.0/jbpm-starters-kit-with-eclipse-3.0/jbpm-server / | property name=jboss.deploy.subdir value=server/jbpm/deploy / | property name=shared.lib.location value=../shared_libraries/lib / | property name=cdhps.location value=../cdhps/bin / | property name=cdhps.util.location value=../util/build / | | !-- SETUP ENVIRONMENT VARIABLES FOR THE BUILD = -- | | !-- Version of this project -- | property name=version value=1.0.0 Alpha / | | !-- Various Locations -- | property name=src.dir value=./src/java / | property name=build.dir value=./build/classes / | property name=par.dir value=./par / | property name=xml.dir value=./src/process / | property name=config.dir value=./conf / | property name=javadoc.dir value=./doc/javadoc / | property name=javadoc.overview value=src/doc/overview.html / | property name=db.conn.props value=src/config.files/hibernate.properties / | | !-- Workflow Par Name -- | property name=parname value=Workflow / | | !-- CLASSPATH -- | path id=classpath.config | pathelement path=${build.dir} / | pathelement path=${config.dir} / | pathelement path=${cdhps.location}/ | pathelement path=${cdhps.util.location}/ | fileset dir=${shared.lib.location} includes=**/*.jar / | /path | | !-- CLEAN = -- | | target name=clean description=cleans/removes output directories | delete dir=${build.dir} / | delete dir=${par.dir} / | delete dir=${javadoc.dir} / | /target | | !-- PREPARE === -- | | target name=prepare depends=clean description=creates output directories | !-- Create the time stamp -- | tstamp/ | !-- Create the build directory structure used by compile -- | mkdir dir=${par.dir} / | mkdir dir=${build.dir} / | mkdir dir=${javadoc.dir} / | /target | | !-- COMPILE === -- | | target name=compile depends=prepare description=compiles the actionhandler classes | !-- Compile the java code from ${src.dir} into ${build.dir} -- | echo message=Compiling source code... / | javac srcdir=${src.dir} | destdir=${build.dir} | classpath refid=classpath.config / | include name=**/*.java / | /javac | /target | | !-- CREATE PAR FILE === -- | | target name=create_par depends=compile description=creates the par file | jar jarfile=${par.dir}/${parname}.par | fileset dir=${build.dir}/.. includes=**/*.class/ | fileset dir=${xml.dir}includes=**/*.xml / | /jar | /target | | !-- DEPLOY PAR FILE === -- | | target name=deploy_par depends=create_par,declare.jbpm.tasks description=deploys the par file | deploypar par=${par.dir}/${parname}.par / | /target | | target name=declare.jbpm.tasks description=used by deploy_par to define deploypar ant task | taskdef name=deploypar classname=org.jbpm.ant.DeployParTask | classpath refid=classpath.config / | /taskdef | /target | | !-- JAVADOC === -- | | target name=javadoc depends=compile description=creates the javadocs for this project | javadoc | sourcepath=${src.dir} | destdir=${javadoc.dir} | author=true | version=true | private=false |
[JBoss-user] [JBoss jBPM] - Re: randomly get Exception
What version of jBPM are you running? I am using 3.0 and I've never seen that error and I've been testing the h3ll out of it. Sean View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3913154#3913154 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3913154 --- 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=7637alloc_id=16865op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: randomly get Exception
Also... be careful with your transactions. Objects are (generally) tied to the hibernate sesion they came from. Always keep that in mind when dealing with the session and objects. If you open two sessions, you could have objects bound to the wrong session. Or if you close a session, fiddle with an object and then open it, you could also have trouble. That may have nothing to do with what you're seeing, but just in case... View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3913156#3913156 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3913156 --- 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=7637alloc_id=16865op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: randomly get Exception
Have you looked at the BERND.SYS_C00581420 constraint to see specifically what it is? is it trying to put the same row in twice? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3913158#3913158 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3913158 --- 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=7637alloc_id=16865op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: Valid use case?
jBPM can do what you are talking about. You could : 1. have multiple processes definitions that map your functionality 2. have one process that has multiple transitions and pass a context variable around to indicate which path to take 3. have the nodes actually route themselves to different places (setNode). There may be other options. Those are the ones that come to mind I think option 1 is best, but option 2 could also do the job. I personally don't like option 3 because I think the process flow should match the process diagram, but you can make jBPM basically do whatever you want. Sean View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3913186#3913186 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3913186 --- 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=7637alloc_id=16865op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: sub process return
Hmmm... I am using 3.0 (not the alpha). I get this error when trying to get to the sub process: | java.lang.NullPointerException: can't create a process instance when processDefinition is null | at org.jbpm.graph.exe.ProcessInstance.init(ProcessInstance.java:60) | at org.jbpm.graph.node.ProcessState.execute(ProcessState.java:86) | at org.jbpm.graph.def.Node.enter(Node.java:284) | at org.jbpm.graph.def.Transition.take(Transition.java:92) | at org.jbpm.graph.def.Node.leave(Node.java:349) | at org.jbpm.graph.def.Node.leave(Node.java:313) | at com.cdhps.jbpm.NodePersist.transition(NodePersist.java:304) | at com.cdhps.jbpm.NodePersist.execute(NodePersist.java:216) | at org.jbpm.graph.def.Action.execute(Action.java:79) | at org.jbpm.graph.def.Node.execute(Node.java:295) | at org.jbpm.graph.def.Node.enter(Node.java:284) | at org.jbpm.graph.def.Transition.take(Transition.java:92) | at org.jbpm.graph.def.Node.leave(Node.java:349) | at org.jbpm.graph.node.StartState.leave(StartState.java:73) | at org.jbpm.graph.exe.Token.signal(Token.java:127) | at org.jbpm.graph.exe.Token.signal(Token.java:92) | at com.cdhps.jbpm.ProcessWrapper.startProcess(ProcessWrapper.java:170) | at com.cdhps.jbpm.ProcessWrapper$ProcessWrapperThread.run(ProcessWrapper.java:765) | at java.lang.Thread.run(Thread.java:595) | main process xml snippet: |process-state name=spawn | sub-process name=simple2 / | transition name=tr1 to=fork1/transition |/process-state | sub process xml: | ?xml version=1.0 encoding=UTF-8? | | process-definition | xmlns=http://jbpm.org/3/jpdl; | xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; | xsi:schemaLocation=http://jbpm.org/3/jpdl http://jbpm.org/xsd/jpdl-3.0.xsd; | name=simple2 |start-state name=start | task | controller | variable name=color / | variable name=size / | /controller | /task | transition name=tr1 to=uno/transition |/start-state |end-state name=end | event type=node-enter | action name=action1 class=com.cdhps.jbpm.EndStateAction/action | /event |/end-state |node name=uno | action class=com.cms.workflow.sample_simple2.Uno/action | transition name=tr1 to=end/transition |/node | /process-definition | the sub process is there. I can run it and it works fine. I have a bad feeling this is a bug with 3.0 that has been fixed and I am loath to rebuild my jbpm database to potentially break something else I have already tested... View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3912898#3912898 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3912898 --- 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=7637alloc_id=16865op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: sub process return
I could see the ProcessInstance.end() method was adjusted from 3.0 to 3.1alpha (so something wasn't likely right), and I didn't want to upgrade to 3.1 yet... I needed persistance, so I just wrote my own ProcessState as a node extension. It was pretty easy. Essentially the two things needed done: 1. the parent must go into a wait state if execution returns (due to error or end) 2. the child's end must signal the parent token to continue. The additional benefit to this was that I can see it in the process designer. Sean View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3912968#3912968 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3912968 --- 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=7637alloc_id=16865op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: unique id for each process Instance??
Is there any unique id associated with instance of processdefinition? which you can use to fetch a particular process later.. yes, look at the jbpm_processinstance table How do you track a particular process to find out its state etc..? The transaction is maintained outside the jBPM engine. ie: state is not saved until the jBPM engine exits and YOU commit the changes. You can make it save state at a more granular level, but it will be work on yor part. How do you get the pool of all the process instances? query the jbpm_processinstance table can A suprocess be instantiated on a different engine..(May be jbpm engine installed on another machine?) I would not cross VMs for a single process instance. they need to talk to each other. essentially the end() method of the ProcessInstance resignals the parent token. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3912973#3912973 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3912973 --- 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=7637alloc_id=16865op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: What are the advantages of deploying a par?
I would think you want the def in the database. I assume you will want to historically track your transactions back to the definition. If you create it on the fly, you will never know for sure what the process was at that time. Plus you run the risk of your def being changed and the problem not being caught until you run an instance of it. I can think of a dozen reasons for putting it in the database. The versioning of process definitions is one of the things I really like about jBPM. Sean View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3912974#3912974 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3912974 --- 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=7637alloc_id=16865op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: unique id for each process Instance??
I've been deep in the code of jBPM over the last week. I've written my own persistent node, fork node, join node, and sub process node. I always hate it when my questions go unanswered, so if I can help out, I do. Sean View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3912982#3912982 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3912982 --- 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=7637alloc_id=16865op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: unique id for each process Instance??
Hmmm. maybe. I was unable to get the subprocess to work for me in 3.0, so I can't be positive. I imagine the scenario like this: VM1: mainprocess --- calls subprocess (through RMI/etc) on VM2 VM2: subprocess --- ends and signals main token to continue --- the main token will now continue on VM2! This is me reading the code, so I could be tested wrong... but it appears you have no control over ProcessInstance.end() logic. It is going to signal the ProcessState to continue. It just looks ugly. I wouldn't do it. Our plan is to run different process instances on different VMs, but a process instance's lifecycle will live on one VM. Sean View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3912984#3912984 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3912984 --- 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=7637alloc_id=16865op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: unique id for each process Instance??
I am running jBPM inside Jetty. It is a lightweight webserver that allows me to issue URL commands to do stuff against jBPM. I have methods such as: startProcess signalToken pauseProcess restartTokenNode endProcess We can then deploy as many Jetty instances as we want. We then register each IP + port in a database and have our GUI or scheduler issue the URL command on the appropriate IP + Port. (The IP + Port will have names and for a level of indirection so that scheduler entries will say: startProcess on VM5, not IP + port). If you want to save state all the time, I recommend creating a custom node base class that hides the work for you. What I do (which is considered evil) is essentially pass the jBPM session into the node via a transient context variable. I then pull it out in the node and commit changes when I find it appropriate ( I do it twice, once before executing custom logic and once after executing custom logic). Sean View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3912992#3912992 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3912992 --- 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=7637alloc_id=16865op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: working with jbpm
I do indeed have my own process monitor, which is essentially a more fancy query than I provided here. I have added several context variables to allow me to add detailed state information to a process, such as ERROR, PAUSED, INACTIVE, ACTIVE, PAUSING, COMPLETED. I am able to see the status of each token in the job, pause the job, signal a token, end the job, and restart a token on the same step. When a token errors out, it also provides restart information and error information in a comment as well. All of this only works if you jBPM to save state in each node, which is considered by many to be a naughty, evil thing, but it can be done... Ltr, Sean View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3912705#3912705 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3912705 --- 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=7637alloc_id=16865op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: working with jbpm
Also, leaveNode is not probably what you want. I think the documentation is not clear on your real options are. You essentially have two types of nodes: ones that automatically transition (fork,join) and ones that do not (state). It is very important to know what each node does. If you signal a node that doesn't need it, you will get some VERY bizarre behaviour. It is also important to know that if you are dealing with a fork, signalling the process is not your best approach, but instead, you signal the appropriate tokens. I have chosen to customize a node to automatically signal based on the response from a subclass method. If the method on the subclass exits normally, it signals. If the method throws an exception, I leave the node in a wait state (no signal). In other words, use signal, but be aware that if you introduce a fork/join, things will get more complicated. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3912706#3912706 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3912706 --- 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=7637alloc_id=16865op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: working with jbpm
There will never be a situation where I will span multiple nodes without saving state. To me, each node is a step in a job. In that light, it is critical to know exactly where the process is so that work is not done twice in case of a power / machine failure. The first node might pick up a file. It might span three asynch processes to process that file differently. After the join, a report may be produced. I need to be able to monitor exactly where everything is and provide the facility to restart a job, step, or pause all jobs if need be. This requires me to save state 2 times in each node: upon entry and after the work is complete. The nice thing is that I can later build an issue tracking system with jBPM as well and have one place that holds all our business processes, both batch, and issue management. This moves us close to a BAM (I hate that term) / Dashboard solution where we can see everything that is going on in our business and monitor it realtime. Without accurate node persistance, I do not see how this is possible. you asked... Sean View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3912745#3912745 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3912745 --- 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=7637alloc_id=16865op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - sub process return
When does a sub process return to the main process? Example: a sub process goes into a wait state. Its token is triggered later. Does it bring the parent token back to life and the parent continues where it left off? I don't see anything in the end state that would indicate this would occur. I also noticed that it didn't seem like the parent process checks the child process to see if it is done... the last command in the execute is a signal and the leave has no prevention logic in it. I will play with it, but I'm curious if anyone knows these answers. Sean View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3912794#3912794 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3912794 --- 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=7637alloc_id=16865op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: fork node question
I've never considered having a join bring together two forks. I'm not sure it was intended to do that. It would be easy enough to try it out. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3912416#3912416 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3912416 --- 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=7637alloc_id=16865op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: working with jbpm
I am just not able to see that transition from one state to next state How are you looking for it? Are you querying the database? You can use the query below to check the status of non-completed processes: This will show one row for each instance + token + context variable Keep in mind that you will need to begin and commit a transaction to persist the process instance to the database. Also be aware that since the transaction is outside jBPM, state is not saved until jBPM returns which is either at completion of the entire process or it goes into a wait state. ie: jBPM does NOT persist state as it moves within itself, unless you make it thru custom code ;-). select def.id_ as def_id, def.name_ as def_name, def.version_ as def_version, instance.id_ as instance_id, instance.start_ as instance_start, instance.end_ as instance_end, token.id_ as token_id, token.nodeenter_ as token_enter, node.id_ as node_id, node.name_ as node_name, node.class_ as name_class, var.name_ as var_name, var.stringvalue_ as var_value from jbpm_processinstance instance, jbpm_processdefinition def, jbpm_token token left outer join jbpm_variableinstance var on token.id_ = var.token_, jbpm_node node where instance.end_ is null and instance.processdefinition_ = def.id_ and instance.roottoken_ = token.id_ and token.node_ = node.id_ View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3912417#3912417 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3912417 --- 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=7637alloc_id=16865op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: event registration for JBPM?
Is there a way to register external events for jbpm, such that they cause a state transition? jBPM is a workflow engine. It isn't designed to listen for events and react to them. That is up to the developer. You could slice this two ways: 1. write an action that looks for the file and signals the token to continue (your suggestion). The process isn't in a wait state, but is running your code waiting for the file. 2. put the process in a wait state and have a separate proces look for the file. When the file was located it would signal the token with the same results. The trick would be knowing the token_id, so I'd go with option 1. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3912421#3912421 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3912421 --- 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=7637alloc_id=16865op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: Prioritization
I agree with Rainer. jBPM is just a workflow engine. It does not prioritize the execution/speed of tasks. This would be something you would do outside jBPM. My first job was a mainframe job (s!). When you submited work to the mainframe/CPU, you submitted a list of things you want to perform in something called JCL, which could be thought of as similar to jBPM. This was put into a queue. This queue could be given CPU/processing priority, but the JCL itself was affected. What I'm saying is that it isn't the worklow engine's job to do this, but it is possible to do it outside of it, but I doubt you would want to go to that amount of work... Sean View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3912507#3912507 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3912507 --- 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=7637alloc_id=16865op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: jBPM and clustering
State is saved in the database, so you should be fine in a cluster. I would not allow a single process instance to run across clusters (which could theortically happen in a fork). Someone else can answer the timer question. I believe timers (SchedulerThread.java?) are implemented using threads, which is interesting since threads are a no-no in a J2EE environment ;-) View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3912058#3912058 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3912058 --- 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=7637alloc_id=16865op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: jBPM and clustering
Me leave? Nah. I'm like a bad penny. You don't even want to see my NodePersist class. That breaks all the rules ;-) Ltr Sean View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3912069#3912069 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3912069 --- 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=7637alloc_id=16865op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: jBPM and clustering
Very nice. You'll only find NodePersist in dark alleys alongside stolen watches. I'm actually very happy with it along with ForkAsync and JoinAsync. I can run a query and know exactly what nodes a process is in. The query returns one row for each token with its status and restart info if it fails. And the process flow definition isn't cluttered with any extra nodes or code to make asynch stuff work... I will be putting a symaphore in shortly to prevent a race condition and then it should be solid as a rock. Ya know, when I think of someone coding in switzerland, I imagine a cabin out in the woods at the base of a moutain with the fireplace going and wireless access. I don't want to know about the dreary cubicle you are actually in. I prefer the cabin vision. Ltr, Sean View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3912103#3912103 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3912103 --- 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=7637alloc_id=16865op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: Simultaneous execution of Fork children
I think there are two uses of jBPM. The traditional use is a long transaction where multiple nodes occur within one transaction. I see the validity of this, but this isn't the only use for jBPM. The second use for jBPM is to save state when each node is complete. Yes, this means the node is doing stuff with the transaction, but this is what I personally wanted from the get go. Without this, you will be UNABLE to monitor jBPM processes externally because the results are in memory until committed to the database. Without this second solution, jBPM will never be able to handle asynchronous processing. I have essentially been hacking jBPM to do this and I am about finished. There are obviously others that want this functionality as well. My coworkers were a bit dumbfounded to discover I had to do this manually. You may say that this makes it flexible. I say it makes it cumbersome. By saying use two is invalid, I think you are turning people away from a valid use of the process engine. To do this, you simply need to add three nodes (at a minimum): StateAsync, ForkAsync, JoinAsync. This does not break jBPM. It just provides a different use where the nodes themselves do work with the jBPMSession. Sean View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3911921#3911921 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3911921 --- 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=7637alloc_id=16865op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: Simultaneous execution of Fork children
jBPM isn't a jBoss solution. It should work outside the context of a J2EE engine. How are you going to provide a BAM solution automatically if it doesn't save state for you... I think we will agree to disagree. I am going to create my ForkAsync and be done... Sean View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3911930#3911930 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3911930 --- 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=7637alloc_id=16865op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: Simultaneous execution of Fork children
Here is the original process def: http://static.flickr.com/20/71523252_c5116f6d9a.jpg?v=0 Here is the new process def: http://static.flickr.com/20/71779978_7df2acc810.jpg?v=0 parallel1 and parallel2 are designed to go into wait states. I then signal their respective tokens which causes parallel1b and parallel2b to run. each waits 30 seconds before continuing, so I have time to signal the tokens. Notice the inclusion of a refresh state in each branch before the join. The purpose of this state is to cause the branch to exit (no signal). Just before falling out, it fires off a thread that is designed to resignal the token. This causes the branch to continue past the refresh node with state refreshed. It works. I've tested it. I was really really close to chucking jBPM completely, so this insight saved a headache on my part... This code is not perfect and I intend on improving today. I want make these changes: 1. have the thread wake up every second checking to see if the token is finished (I think I should be able to do this). 2. create some sort of symaphore so that a save of state and load of state are synchronous for a process instance. Since this could happen across VMs, it will be interesting. Here is the code snippet: call this in the execute of a class in the node-enter of refresh: Refresh r = new Refresh(context.getToken().getId()); This is the inner class: Note that ProcessWrapper is a convenience class I've created to do common things in jBPM without having to worry about all the details. It is normally called by a URL using jetty... // Class to re-signal the token after it falls out of scope private class Refresh implements Runnable { private long tokenId; public Refresh(long tokenId) { this.tokenId = tokenId; Thread t = new Thread(this); t.start(); } public void run() { try { // Sleep for 10 seconds (that should be more than enough for the // persistance of this step to complete) Thread.sleep(1); // Re-signal ProcessWrapper wrapper = new ProcessWrapper(); log.info(about to signal token from refresh: + tokenId); wrapper.signalToken(tokenId); log.info(token signaled from refresh: + tokenId); } catch (Exception ex) { log.error(Was unable to refresh token before join: + tokenId); } } } View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3911737#3911737 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3911737 --- 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=7637alloc_id=16865op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: Simultaneous execution of Fork children
Alejandro : When you say lock the process instance, are you saying: hibernateSession = jbpmSession.getSession; jbpmObject = lookupJbpmObjectYouWantToWorkOn(...); hibernateSession.lock(jbpmObject , LockMode.UPGRADE); I found this in discussion thread: http://www.jboss.com/?module=bbop=viewtopict=72556 View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3911744#3911744 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3911744 --- 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=7637alloc_id=16865op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: Simultaneous execution of Fork children
First, let me say that I am going to create a new fork and join node that works asynch. I was going to just create a new fork node, but after discussing the issue with my coworkers, we are going to add a new join that is aware of asynch tokens. This is the most elegant solution to this problem. It eliminates the need for extra states... Elaborating on: parallel1 and parallel2 are designed to go into wait states. I then signal their respective tokens which causes parallel1b and parallel2b to run. each waits 30 seconds before continuing, so I have time to signal the tokens. I think when we say goes into a wait state, it can be confusing. That simply means that I have a state node and I don't cause a signal to occur, leaving the token in that state node. parallel1 and parallel2 are state nodes that execute code in the node-enter event to simply Thread.sleep(3) then fall out, leaving the nodes in a wait state. I have a jetty server (http://jetty.mortbay.org/jetty/) that listens for certain URL requests. I have a request to signal a token. I use this URL to signal each token, causing the tokens to run in their own threads. Since parallel1 and parallel2 are signalled, the processes move respectively into parallel1b and parallel2b which Thread.sleep(3) and then signal themselves to continue. Say what you will, but I think jBPM needs asynch classes. We need it for our batch processing. I know that firing off threads in a J2EE environment is a no-no, but jBPM will not always be running in a J2EE environment and asynch behavior is desireable and as this discussion thread shows, it is hard to achieve properly... View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3911762#3911762 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3911762 --- 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=7637alloc_id=16865op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: Simultaneous execution of Fork children
OK, here is the JoinAsync class. Instead of using a join when you have asychronous logic going on, use a standard node that calls this in its action and asynchronous logic should work. Yes, it is a bit of a hack because it essentially reloads the parentToken for analysis and then throws it away, but hey, it gets the job done. | /** | * | */ | package com.whatever.jbpm; | | import java.rmi.RemoteException; | import java.util.Collection; | import java.util.Iterator; | | import org.apache.commons.logging.Log; | import org.apache.commons.logging.LogFactory; | import org.dom4j.Element; | import org.jbpm.graph.action.Script; | import org.jbpm.graph.def.Node; | import org.jbpm.graph.exe.ExecutionContext; | import org.jbpm.graph.exe.Token; | import org.jbpm.jpdl.xml.JpdlXmlReader; | import org.jbpm.jpdl.xml.Parsable; | import org.jbpm.graph.def.ActionHandler; | import org.jbpm.db.JbpmSession; | import org.jbpm.db.JbpmSessionFactory; | | //public class JoinAsync extends Node implements Parsable { | | public class JoinAsync implements ActionHandler { | | private static final long serialVersionUID = 1L; | | /** | * specifies if this joinhandler is a discriminator. a descriminator | * reactivates the parent when the first concurrent token enters the join. | */ | private boolean isDiscriminator = false; | | /** | * a fixed set of concurrent tokens. | */ | private Collection tokenNames = null; | | /** | * a script that calculates concurrent tokens at runtime. | */ | private Script script = null; | | /** | * reactivate the parent if the n-th token arrives in the join. | */ | private int nOutOfM = -1; | | private static final JbpmSessionFactory jbpmSessionFactory = JbpmSessionFactory.buildJbpmSessionFactory(); | | public void read(Element element, JpdlXmlReader jpdlReader) { | } | | public void execute(ExecutionContext executionContext) { | Token token = executionContext.getToken(); | | // if this token is not able to reactivate the parent, | // we don't need to check anything | if (token.isAbleToReactivateParent()) { | | // the token arrived in the join and can only reactivate | // the parent once | token.setAbleToReactivateParent(false); | | Node joinNode = token.getNode(); | | Token parentToken = token.getParent(); | Token originalParentToken = parentToken; | | if (parentToken != null) { | | /* == */ | | // The parent token must be reloaded from the database for | // asynchronous behaviour to work properly | log.debug(need to reload parent token from database); | JbpmSession jbpmSession = null; | try { | jbpmSession = jbpmSessionFactory.openJbpmSession(); | | // Get the parent token from the database | log.debug(about to reload parent token from database); | parentToken = jbpmSession.getGraphSession().loadToken(parentToken.getId()); | log.debug(reloaded parent token from database!); | // Need to load the children before closing the session | Iterator iter = parentToken.getChildren().values().iterator(); | while (iter.hasNext()) { | Token t = (Token) iter.next(); | // Need to set the flag on this token since it isn't committed yet | if (t.getId() == token.getId()) { | t.setAbleToReactivateParent(false); | } | } | log.debug(reloaded parent token's children from database!); | | } catch (Exception ex) { | System.out.println(error: + ex.toString()); | } finally { | if (jbpmSession != null) { | jbpmSession.close(); | } |
[JBoss-user] [JBoss jBPM] - Re: Simultaneous execution of Fork children
I expected a spanking for doing that, but I need updated state info and it did the trick. I did isolate it so that the referenced tokens are in their own hibernate session and closed the session afterwords. Nothing is broken in this case. I need the state refreshed in the join and since I am in an object inside the session (join), I can't simply reload the objects (tried that, failed miserably). This is equivalent to taking a peak in the database to get an accurate snapshot of what is going on (my states all commit state on a node by node basis so that I can peak around and see what is going on). This business of not saving state until the entire process is complete will not work for nodes that are long running. I also needed the ability to monitor the process externally, so the state had to be saved... View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3911870#3911870 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3911870 --- 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=7637alloc_id=16865op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: Simultaneous execution of Fork children
I was afraid this was going to happen, but it took me all morning to create the test case. Here is the scenario: [img]http://static.flickr.com/20/71523252_c5116f6d9a.jpg?v=0[/img] If I cause both parallel1 and parallel2 to not signal and signal their respective tokens later asynchronously, the join will not work because the threads don't know about each others state. ie: if parallel2b finishes first, its hit against the join is not registered so that when parallel1b hits the join, the join allows processing thru. I essentially need state refreshed in the join prior to allowing its logic to execute. How do I do this? Once I have this nailed, I am all done with testing... (help) View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3911509#3911509 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3911509 --- 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=7637alloc_id=16865op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: Simultaneous execution of Fork children
OK, the image didn't work and I thought I read my post thru, but I made an important typo: the join is NOT allowing processing thru when the parallel processing occurs in different threads. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3911513#3911513 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3911513 --- 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=7637alloc_id=16865op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: Simultaneous execution of Fork children
The default behaviour of a join is as you describe it, wait for all tokens to arrive. This is true, but if you are running the tokens in different threads the join doesn't know about the state from each thread. To make it clearer, think of it this way: each thread is running in a different VM. The cached hibernate objects need to be refreshed at the join so that one VM knows what is going on in the other. ie: when the second thread hits the join, it doesn't know that the first thread hit the join because they are using seperate instances of hibernate objects. The hibernate data must be refreshed prior to executing the join logic so that the join works properly in an asynchronous environment. Does that make my problem clearer? Sean View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3911525#3911525 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3911525 --- 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=7637alloc_id=16865op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: Simultaneous execution of Fork children
Once a process instance gets into this situation, it is interesting to try to complete it. Both tokens are now stting at the join. I have learned from experience that signaling a join, fork, start, or end cause bad things to happen... If I signal either token, the process instance follows to completion, but it doesn't set the end date on the process instance. If I signal the remaining token, it runs the final steps again and then sets the end date... View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3911531#3911531 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3911531 --- 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=7637alloc_id=16865op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: Simultaneous execution of Fork children
If I try to close the JbpmSession and create a new one in the middle of a process running, it pukes (as expected): ERROR 1208:1345 zationException : failed to lazily initialize a collection of role: org.jbpm.graph.exe.Token.children - no session or session was closed org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: org.jbpm.graph.exe.Token.children - no session or session was closed at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:191) at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:183) at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:48) at org.hibernate.collection.PersistentMap.keySet(PersistentMap.java:165) ... on and on ... This is a problem. I can't stop a process at join and signal the token later. Joins shouldn't be signalled. I don't see a way out of this situation. I am starting to feel that jBPM is not capable of handling asychronous work on a single process instance. I need a way to reload the tokens so that this question in the Join class answers correctly: concurrentToken.isAbleToReactivateParent() Sean View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3911552#3911552 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3911552 --- 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=7637alloc_id=16865op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: Simultaneous execution of Fork children
I was able to come up with a workaround hack. I added a state to each forked branch just prior to the join. This state fires off a thread that sleeps for 10 seconds, allowing the current thread to go into a wait state and then resignals the token for the waiting branch. This causes the the latest state information to be loaded for a correct join. I need to think thru some sort of semaphore mechanism to make sure I don't land into an odd situation where one thread is saving while the other is loading, but it seems to work. Sean View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3911594#3911594 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3911594 --- 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=7637alloc_id=16865op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: Simultaneous execution of Fork children
As an outsider using jBPM and trying to get it ready for production to run our batch processes, it has been throwing me some curve balls. Don't get me wrong here, I like jBPM and picked it from a field of other BPM systems (osworkflow, wfmopen, shark, openwfe, etc...) I do look at stuff with a simpleton's view of the world, but it has frustrated me in two areas: 1. I expected it automatically persist state whenever a state chage occurs. Say what you will, but my expectation of BPM software that claims to be persistent should do this for you. I shouldn't have to do anything to make this work. I solved this problem by passing around a transient variable with a sychronized transaction that I commited and rebegan at each step, but I don't feel I should have had to do this. 2. I expected parallel processing with a fork. If you have to put a process into a wait state to cause parallel activity, it doesn't feel right. What if intel released a processor that they said allowed concurrent processing but then said oh, it really doesn't do this unless your code helps us. Enough ranting. I will play with it today to figure out a workable solution in a non-managed environment (jetty). I just wish I didn't have to and could work on my process/job management screens instead. Sean View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3911165#3911165 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3911165 --- 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=7637alloc_id=16865op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: Simultaneous execution of Fork children
I never seem to be able to connect to that damn sorceforge cvs (g!), so I may be duplicating work here. I have the alpha and don't see anything besides a stubbed out class called ParallelSplit.java. After digging into the problem, it seems to me that a new class called ForkAsync could do the trick. It would simply do this portion of the logic differently: // phase three: launch child tokens from the fork over the given transitions iter = forkedTokens.iterator(); while( iter.hasNext() ) { ForkedToken forkedToken = (ForkedToken) iter.next(); Token childToken = forkedToken.token; String leavingTransitionName = forkedToken.leavingTransitionName; ExecutionContext childExecutionContext = new ExecutionContext(childToken); if (leavingTransitionName!=null) { leave(childExecutionContext, leavingTransitionName); } else { leave(childExecutionContext); } } The join and fork currently work together in a rather sensitive / co-operative manner. Basically the join doesn't allow a token thru until all tokens have reached the join. The join rejectes a token by returning. This causes the for loop of the join (above) to continue processing. I am not sure what will happen if there is no for-loop to come back to. And I am unsure of how thread safe jBPM is... we will see... View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3911224#3911224 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3911224 --- 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=7637alloc_id=16865op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: How to purge stale entries from database?
I use this to clean up my development database of all process instances. begin work; delete from jbpm_comment; delete from jbpm_variableinstance; delete from jbpm_tokenvariablemap; delete from jbpm_moduleinstance; delete from jbpm_log; delete from jbpm_token; delete from jbpm_processinstance; commit work; This doesn't answer your question, I know, but it is how I keep things clean so the failed experiments don't create too much noise. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3911234#3911234 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3911234 --- 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=7637alloc_id=16865op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: Process Definition versions ??
I noticed this happened when I did it manually. I get versions when I deploy it using the ant script task deploy_par View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3911235#3911235 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3911235 --- 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=7637alloc_id=16865op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - fork issues
It appears from the FAQ that forks are not asychronous (scratches head). I am a bit baffled by this. Worse, my fork is not running running both branches. I am not running in a managed environment, such as jBoss, so sending messages around isn't going to work (I believe), and doing work outside the workflow engine doesn't make sense to me. I had always assumed that when a fork was encountered, that a thread was created for each branch... Here is my process.xml: - ?xml version=1.0 encoding=UTF-8? process-definition name=simple start-state name=start /start-state end-state name=end /end-state /process-definition I have a base class that each of the action extend that essentially do this: context.leaveNode(); This should move the process along quite nicely. What is happening is that parallel2 is not firing at all. And if I do eventually get it to fire, I am afraid that it isn't going to run asychronously. I am struggling to make jBPM work for me. First I had to create a solution that persists state at every juncture (done). Now this little bugger. (help) View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3911002#3911002 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3911002 --- 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=7637alloc_id=16865op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: fork issues
Um... that XML wasn't very happy in this post... sorry about that (should have do a preview) Let me try again... | ?xml version=1.0 encoding=UTF-8? | | process-definition name=simple |swimlane name=swimlane1 | assignment class=/assignment |/swimlane |start-state name=start | task | controller | variable name=color / | variable name=size / | /controller | /task | transition name=to_state to=first/transition |/start-state |state name=first | event type=node-enter | action name=node_enter class=com.cms.workflow.sample_simple.Step1/action | /event | transition name=tr1 to=fork1/transition |/state |end-state name=end | event type=node-enter | action name=action1 class=com.cms.workflow.sample_simple.End/action | /event |/end-state |fork name=fork1 | event type=node-enter | action name=action1 class=com.cms.workflow.sample_simple.Fork/action | /event | transition name=tr1 to=parallel1/transition | transition name=tr2 to=parallel2/transition |/fork |state name=parallel1 | event type=node-enter | action name=action1 class=com.cms.workflow.sample_simple.Parallel1/action | /event | transition name=tr1 to=join1/transition |/state |state name=parallel2 | event type=node-enter | action name=action1 class=com.cms.workflow.sample_simple.Parallel2/action | /event | transition name=tr1 to=join1/transition |/state |join name=join1 | event type=node-enter | action name=action1 class=com.cms.workflow.sample_simple.Join/action | /event | transition name=tr1 to=end/transition |/join | /process-definition | View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3911004#3911004 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3911004 --- 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=7637alloc_id=16865op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: Simultaneous execution of Fork children
I am also confused by the use of the term concurrent with the fork and join. Concurrent means occurring or operating at the same time, which is not the case here. Having to manually enhance jBPM to get it to run concurrent processes asynchronously seems odd. I would think this would be the default behavior. I understand what it is doing, but it is confusing. The documentation in regards to fork and join should spell this out. It would have saved me 4 hours of scratching my head, trying to figure out what is going on... View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3911060#3911060 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3911060 --- 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=7637alloc_id=16865op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - getting jBPM to save state at all times
I would like jBPM to save its state in the database as anything changes (new node entered/left/etc). I've tried turning on autocommit both in hibernate and in the code by getting the connection and turning autocommit on, but it doesn't seem to work. The persistence doc does explain how to resolve this: http://docs.jboss.com/jbpm/v3/userguide/persistence.html The only way I've been able to save data to the database is by starting a transaction and eventually committing it. I don't think I should have to manage this. If there is parallel processing going on, this would get nightmarish. I noticed this problem when I started running a query to check the status of the process as it was running to find that NOTHING was in the database because the commit was after the initial signal. code snippet: // start transaction jbpmSession.beginTransaction(); // run entire process // if this runs for an hour, I can't see what is going on rootToken.signal(); // commit entire process (yuck!) jbpmSession.commitTransaction(); meanwhile, the entire process (n signals) has run within the initial signal and I can't monitor it from the database because nothing will go into it until the commit. If the VM would go down in the middle of the transaction, things could get even worse because I don't know what was done and what wasn't. Even if I wanted to manage this within each node, I don't think I can get a handle to the transaction (and I wouldn't want to because two asynch threads could do bad things to the transaction out of order: thread 1 commits, thread 2 tries to commit before thread 1 can begin a new transaction) Status query for reference: select def.id_ as def_id, def.name_ as def_name, def.version_ as def_version, instance.id_ as instance_id, instance.start_ as instance_start, instance.end_ as instance_end, token.id_ as token_id, token.nodeenter_ as token_enter, node.id_ as node_id, node.name_ as node_name, node.class_ as name_class, var.name_ as var_name, var.stringvalue_ as var_value from jbpm_processinstance instance, jbpm_processdefinition def, jbpm_token token left outer join jbpm_variableinstance var on token.id_ = var.token_, jbpm_node node where instance.end_ is null and instance.processdefinition_ = def.id_ and instance.roottoken_ = token.id_ and token.node_ = node.id_ View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3910339#3910339 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3910339 --- 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=7637alloc_id=16865op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: getting jBPM to save state at all times
Thanks for your quick reply. I will think about it over the weekend. I am running jBPM inside jetty (jPBM called by quartz, other processes via URL) to keep it lightweight. I have a base class for all my nodes, so I will figure out how to weave it together. Thanks, Sean View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3910347#3910347 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3910347 --- 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=7637alloc_id=16865op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user