[JBoss jBPM] - Problem with timers
by petia
Thanks Roland, here I am starting a new topic.
I have a problem with setting a timer on a Task Node.
I have defined the following process
| <?xml version="1.0" encoding="UTF-8"?>
| <process-definition xmlns="urn:jbpm.org:jpdl-3.2" name="timer-test">
| <swimlane name="Initiator">
| <assignment actor-id="admin"></assignment>
| </swimlane>
|
| <start-state name="start-state1">
| <task name="start task" swimlane="Initiator"></task>
| <transition to="TaskA"></transition>
| </start-state>
|
| <task-node name="TaskA">
| <task name="TaskA">
| <assignment actor-id="petia"></assignment>
| </task>
| <timer duedate="10 seconds" transition="skipB"></timer>
| <transition to="TaskB" name="execute B"></transition>
| <transition to="end-state1" name="skipB"></transition>
| </task-node>
|
| <task-node name="TaskB">
| <task name="TaskB">
| <assignment actor-id="petia"></assignment>
| </task>
| <transition to="end-state1"></transition>
| </task-node>
|
| <end-state name="end-state1"></end-state>
| </process-definition>
The idea is that if the timer in Task Node TaskA expires the process will be ended (and the Task Node TaskB skipped).
However, when running the process and the timer expires, the transition skipB is not executed (as specified in the code) and the process stalls at Task Node TaskA (which appears in the tasks list, but without an "End" button available for it).
I am running jBPM 3.2.3. From the discussion on http://www.jboss.com/index.html?module=bb&op=viewtopic&t=140634&postdays=... I can see that there have been some problems with timers on State Nodes which apparently have been fixed in 3.2.4. Does this apply to my problem with timers on task nodes? Have anyone else experienced a similar problem?
Note, the timer is important. Example of a business scenario: if a notification is not registered within a week, the process is ended otherwise it is continued. Therefore, the solution proposed by Alejandro (thanks Alejandro) suggesting that the timer is replaced by asynchronous continuation (see below), can not be applied in this case.
anonymous wrote : JBSEAM-1575 depends on JBPM-1135 which is already resolved. That said, I have two suggestions.
|
| The first is to replace the timer with an asynchronous continuation, unless you need the delay (which I understand you do not). Just set the node's async attribute to true. It does not need to be a separate emtpy state, you can decorate any of your existing nodes with that attribute.
|
| The second is to implement a ThreadLocal based solution which prevents recursive calls once the loop node is reached. I came to it for preventing the stack overflow in the BPEL while activity, but it can be implemented for jPDL as well. You can browse the code in the online repository. Look at Loop.execute(). It is much of a hack - you might want to stick to asynchronous continuations unless you need more performance.
| _________________
| Saludos/Regards,
| Alejandro
In summary: Does the Timer on Task Node work in jBPM 3.2.3? Does it work in jBPM 3.2.4? (Clarification: the timer seems indeed to expire, but the specified transition is not taken, which results in a stalling process instance)
Kind regards, Petia
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4171721#4171721
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4171721
17 years, 8 months
[Clustering/JBoss] - Problems with JBoss clustering
by agohar
Hi,
I am having problems in jboss clustering, here is what i am trying to do:
We have 8 servers at 2 physical locations and these are all clustered well and were working fine with jdk1.4.2 and jboss-4.0.2. We wanted to upgrade our servers with new java 5 and jboss-4.2.2 versions and applications to use JbossWS and EJB3.0 versions. For that we put down the 4 servers (2 from each location) and upgraded them with new java and jboss versions and new upgraded applications. We are using udp multicast for the clustering so i changed the ports and IPs in following files to split the cluster:
- cluster-service.xml
- tree cache files
- jboss-web-cluster/META-INF/jboss-service.xml
I didn't change the partition name though and tried to run these both clusters in parallel. But got into problems, when i start any two of them they startup fine and create a new separate cluster fine but when i try to add third one, it is very very slow during start up and take ages to start, but doesn't throw any exceptions during startup and when it is up it throw:
| 2008-08-20 01:07:45,008 ERROR [org.jgroups.protocols.UDP] [10.100.54.135:41757] failed receiving unicast packet
| java.lang.ArrayIndexOutOfBoundsException
| at java.net.PlainDatagramSocketImpl.receive0(Native Method)
| at java.net.PlainDatagramSocketImpl.receive(PlainDatagramSocketImpl.java:136)
| at java.net.DatagramSocket.receive(DatagramSocket.java:712)
| at org.jgroups.protocols.UDP$UcastReceiver.run(UDP.java:885)
| at java.lang.Thread.run(Thread.java:595)
| 2008-08-20 01:07:45,008 ERROR [org.jgroups.protocols.UDP] failure in multicast receive()
| java.lang.ArrayIndexOutOfBoundsException
I tried every combination of servers any two servers run perfectly fine and third and fourth ones cause problems. The other cluster works perfectly fine its jsut the problem with the new one. I had upgraded jgroups version to jgroups-2.6.0-GA because of a bug and now using this (2.6.0-GA) version.
Please let me know if there is anything i can look at? Your help will be highly appreciated
Thank you
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4171712#4171712
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4171712
17 years, 8 months