[JBoss-user] [JBoss jBPM] - Re: Need Help for Sub-Process

2005-12-19 Thread sforema
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=bb&op=viewtopic&p=3913388#3913388 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3913388

[JBoss-user] [JBoss jBPM] - Re: Valid use case?

2005-12-16 Thread sforema
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 place

[JBoss-user] [JBoss jBPM] - Re: randomly get Exception

2005-12-16 Thread sforema
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=bb&op=viewtopic&p=3913158#3913158 Reply to the post : http://www.jboss.com/index.html?module=bb&op=po

[JBoss-user] [JBoss jBPM] - Re: randomly get Exception

2005-12-16 Thread sforema
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

[JBoss-user] [JBoss jBPM] - Re: randomly get Exception

2005-12-16 Thread sforema
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=bb&op=viewtopic&p=3913154#3913154 Reply to the post : http://www.jboss.com/index.html?module=bb&op

[JBoss-user] [JBoss jBPM] - Re: Need some help for GPD

2005-12-16 Thread sforema
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 ma

[JBoss-user] [JBoss jBPM] - Re: unique id for each process Instance??

2005-12-15 Thread sforema
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

[JBoss-user] [JBoss jBPM] - Re: unique id for each process Instance??

2005-12-15 Thread sforema
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

[JBoss-user] [JBoss jBPM] - Re: unique id for each process Instance??

2005-12-15 Thread sforema
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=bb&op=viewt

[JBoss-user] [JBoss jBPM] - Re: What are the advantages of deploying a par?

2005-12-15 Thread sforema
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

[JBoss-user] [JBoss jBPM] - Re: unique id for each process Instance??

2005-12-15 Thread sforema
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

[JBoss-user] [JBoss jBPM] - Re: sub process return

2005-12-15 Thread sforema
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:

[JBoss-user] [JBoss jBPM] - Re: sub process return

2005-12-15 Thread sforema
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.(ProcessInstance.java:60) | at org.jbpm.graph.nod

[JBoss-user] [JBoss jBPM] - sub process return

2005-12-14 Thread sforema
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

[JBoss-user] [JBoss jBPM] - Re: working with jbpm

2005-12-14 Thread sforema
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

[JBoss-user] [JBoss jBPM] - Re: working with jbpm

2005-12-14 Thread sforema
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

[JBoss-user] [JBoss jBPM] - Re: working with jbpm

2005-12-14 Thread sforema
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 e

[JBoss-user] [JBoss jBPM] - Re: Prioritization

2005-12-13 Thread sforema
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 perfo

[JBoss-user] [JBoss jBPM] - Re: event registration for JBPM?

2005-12-13 Thread sforema
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 sign

[JBoss-user] [JBoss jBPM] - Re: working with jbpm

2005-12-13 Thread sforema
"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

[JBoss-user] [JBoss jBPM] - Re: fork node question

2005-12-13 Thread sforema
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=bb&op=viewtopic&p=3912416#3912416 Reply to the post : http://www.jboss.com/index.html?mo

[JBoss-user] [JBoss jBPM] - Re: jBPM and clustering

2005-12-12 Thread sforema
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 fa

[JBoss-user] [JBoss jBPM] - Re: jBPM and clustering

2005-12-12 Thread sforema
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=bb&op=viewtopic&p=3912069#3912069 Reply to the post : http://www.jboss.com/index.html?module=bb&op=pos

[JBoss-user] [JBoss jBPM] - Re: jBPM and clustering

2005-12-12 Thread sforema
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,

[JBoss-user] [JBoss jBPM] - Re: Simultaneous execution of Fork children

2005-12-10 Thread sforema
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 : ht

[JBoss-user] [JBoss jBPM] - Re: Simultaneous execution of Fork children

2005-12-10 Thread sforema
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 do

[JBoss-user] [JBoss jBPM] - Re: Simultaneous execution of Fork children

2005-12-09 Thread sforema
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

[JBoss-user] [JBoss jBPM] - Re: Simultaneous execution of Fork children

2005-12-09 Thread sforema
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

[JBoss-user] [JBoss jBPM] - Re: Simultaneous execution of Fork children

2005-12-09 Thread sforema
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.

[JBoss-user] [JBoss jBPM] - Re: Simultaneous execution of Fork children

2005-12-09 Thread sforema
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=bb&op=viewtopic

[JBoss-user] [JBoss jBPM] - Re: Simultaneous execution of Fork children

2005-12-09 Thread sforema
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 parallel1

[JBoss-user] [JBoss jBPM] - Re: Simultaneous execution of Fork children

2005-12-08 Thread sforema
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 lat

[JBoss-user] [JBoss jBPM] - Re: Simultaneous execution of Fork children

2005-12-08 Thread sforema
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.hiberna

[JBoss-user] [JBoss jBPM] - Re: Simultaneous execution of Fork children

2005-12-08 Thread sforema
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 c

[JBoss-user] [JBoss jBPM] - Re: Simultaneous execution of Fork children

2005-12-08 Thread sforema
"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 V

[JBoss-user] [JBoss jBPM] - Re: Simultaneous execution of Fork children

2005-12-08 Thread sforema
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=bb&op=viewtopic&p=3911513#3911513 Reply

[JBoss-user] [JBoss jBPM] - Re: Simultaneous execution of Fork children

2005-12-08 Thread sforema
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

[JBoss-user] [JBoss jBPM] - Re: Process Definition versions ??

2005-12-07 Thread sforema
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=bb&op=viewtopic&p=3911235#3911235 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mod

[JBoss-user] [JBoss jBPM] - Re: How to purge stale entries from database?

2005-12-07 Thread sforema
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; comm

[JBoss-user] [JBoss jBPM] - Re: Simultaneous execution of Fork children

2005-12-07 Thread sforema
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

[JBoss-user] [JBoss jBPM] - Re: Simultaneous execution of Fork children

2005-12-07 Thread sforema
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

[JBoss-user] [JBoss jBPM] - Re: Simultaneous execution of Fork children

2005-12-06 Thread sforema
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 d

[JBoss-user] [JBoss jBPM] - Re: fork issues

2005-12-06 Thread sforema
Um... that XML wasn't very happy in this post... sorry about that (should have do a preview) Let me try again... | | | | | | | | | | | | | | | | | | |

[JBoss-user] [JBoss jBPM] - fork issues

2005-12-06 Thread sforema
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 t

[JBoss-user] [JBoss jBPM] - Re: getting jBPM to save state at all times

2005-12-02 Thread sforema
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 pos

[JBoss-user] [JBoss jBPM] - getting jBPM to save state at all times

2005-12-02 Thread sforema
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 resol