-
1. Re: modeling a long running process
koen.aers Apr 10, 2006 12:06 PM (in response to fptoth)Fred,
For both cases, you should use indeed use the asynchronous features. Certainly for the second case, it is best to rely on JMS because JMS queues are transactional resources that you have control over. You can use MDB's that read the messages from the queues and depending on the outcome of the job done signal the token to return to the previous state and retry, or continue along another transition...
Hope this helps,
Koen -
2. Re: modeling a long running process
i_n_g Apr 10, 2006 3:57 PM (in response to fptoth)i'm lost, what's the role of JMS in a ftp action?
-
3. Re: modeling a long running process
fptoth Apr 10, 2006 4:39 PM (in response to fptoth)My understanding is that the internal asynchronous messaging within jbpm is fairly limited, though it may be enough for my purposes.
For example, if I needed to run a bunch of ftp jobs at once, I might need a pool of "ftp runner" objects. These would sit around waiting for messages to ftp files. JMS would guarantee that a single request message was sent to one and only one object.
My sense is that this is well beyond jbpm's internal messaging, but I'm not certain of the details.
Can anyone comment on just how far you can go with jbpm internal messaging before you need JMS?
Also, what is the state of JMS support in jbpm? I've seen several references to "to come".
Thanks,
Fred -
4. Re: modeling a long running process
i_n_g Apr 10, 2006 6:04 PM (in response to fptoth)i played a little bit with the "async", here is what I got:
1. create a "task-node" without "task". Using "task-node" because it does not need a human signal as "node". It's automatic.
2. add the Customized ActionHandler under a outbout transition.
3. jbpm-web will block for long time when you click "run process" button.
4. change the task-node.@async to be "true". Now jbpm-web returns html page immediately upon clicking "run process". And you can check the running-instances page.
NOTE:
I also tried put long-term Action in after-signal event, it's not called. I guess there is no signal-event; signal-event is always triggerd by a explicitly signal() call.
I also tried put long-term Action in after-enter event, it doesn't work as async; but works as a normal sync mode. -
5. Re: modeling a long running process
fptoth Apr 10, 2006 6:43 PM (in response to fptoth)Ok, now I'm lost. What is this "jbpm-web" application? Am I missing a tool? The only thing that I have is the plain "jbpm" war file from the starter kit that contains a demo of the "websale" process.
Where is this "run process" button you're referring to? Or is this your code?
Thanks,
Fred -
6. Re: modeling a long running process
i_n_g Apr 10, 2006 7:06 PM (in response to fptoth)The jbpm web is the war file.
If you are using jbpm designer for eclipse:
1. create a sample jbpm project
2. modify the graph and create a customized ActionHandler
3. right click on the ".par" folder and click "deploy par achive" menu, eclipse will ask you for the jbpm server (deault is localhost:8080). It will be posted to the jbpm.war/upload servlet.
(alternatively, you can package it as a local file and use jbpm.war/deploy.html to upload the file)
4. Now if you go to localhost:8080/jbpm; you will find the new deployed "sample" process.
5. There is no "run process" button, sorry for confusing. You should click the "Start Process Link" in the home page. -
7. Re: modeling a long running process
fptoth Apr 10, 2006 8:44 PM (in response to fptoth)Thanks, that's helpful. I have been deploying with ant, but I'm happy to know about the upload mechanism.
Would you consider posting your test processdefinition.xml?
I keep getting validation errors with the eclipse plugin, and it's just as bad when I try writing them manually. I'm collecting examples.
Thanks,
Fred -
8. Re: modeling a long running process
koen.aers Apr 11, 2006 9:51 AM (in response to fptoth)Yes, if you want to have robustness you should use JMS instead of the internal asynchronous support, which works well for simple applications, but not for the high end.
Regards,
Koen -
9. Re: modeling a long running process
fptoth Apr 11, 2006 2:39 PM (in response to fptoth)Thanks for your response. But can we learn at what point we need to switch from internal messaging to JMS? What are the problems with internal messaging? How will we know when not to use it? Does it turn blue under load? Does the CPU burst into flames? Excess stomach acid?
What is the status of jBPM support for JMS? Are we on our own to integrate our own action code with JMS? Or is there undocumented support? Or is there unreleased code in CVS? Or should we guess?
Any hints appreciated.
Thanks,
Fred -
10. Re: modeling a long running process
fptoth Apr 11, 2006 2:44 PM (in response to fptoth)gudake,
I've been trying to play with this too. I think I need to have actions on plain rather than on tasks, because I want the external process
to control the process flow.
Isn't it true that in your experiment with async tasks, the process continued on regardless of what happened in the async action? It essentially "went past" the async action?
In my case, I want to do something like:
1. Go to "ftp runner" node
2. Execute async ftp job
3. On normal completion, signal the process to continue normally
4. On abnormal completion, signal the process to do something else
Does this fit with what you see?
Thanks,
Fred -
11. Re: modeling a long running process
fptoth Apr 11, 2006 5:02 PM (in response to fptoth)Sorry, the above is supposed to say "plain node", but the code got lost.
-
12. Re: modeling a long running process
koen.aers Apr 12, 2006 2:24 AM (in response to fptoth)Fred,
There *is* some unreleased code wrt JMS in CVS. It will be released in the 3.2 branch AFAIK.
The moment you want to switch is really up to you. If you want to use clustering for instance, you would have to use a clusterable JMS solution. As long as the internal system works for you, there is no reason not to use it... If you want to scale up the high end with really big loads, than you will probably want to use a performing JMS server.
So in a way you should estimate (or as you put it guess) what the expected loads are going to be and test if the performance under this load (which you would have to simulate) is ok.
Regards,
Koen -
13. Re: modeling a long running process
jaidotnet Apr 18, 2006 10:48 AM (in response to fptoth)I am also trying to some thing like this . I am new to Java and jBPM . Amy simple samples please. I posted something as a new link then I found out this one..
Any thing will be helpful.