[jBPM Users] - Re: Problem moving from 4.1 to 4.2 using Spring configuratio
by RockerRocker
Thanks Santanu.
I have changed spring-transaction-interceptor from current="true" to current="false" and it did resolve that issue.
Now , when i start a new process, it gives me
org.jbpm.api.JbpmException: no org.jbpm.pvm.internal.session.DbSession in current environment
I am using the following code
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
@Override
public void startProcess(String processName, Map variables)
{
executionService.startProcessInstanceByKey (processName, variables);
}
and the config file has db session as shown below
<transaction-context>
<repository-session />
<pvm-db-session />
<job-db-session />
<task-db-session />
<message-session />
<timer-session />
<history-session />
<hibernate-session />
<hibernate-session current="true" />
<identity-session />
</transaction-context>
Can you let me know if somethings wrong ?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266139#4266139
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266139
16 years, 7 months
[jBPM Users] - Re: nested forks
by makam
I understand your idea, but i think that is not my situation.
I am attaching an example.
|
| <process name="a" xmlns="http://jbpm.org/4.0/jpdl">
|
| <start g="5,129,48,48" name="start1">
| <transition to="fork1"/>
| </start>
| <end g="957,121,48,48" name="end1"/>
|
| <task g="321,197,92,52" name="task2" swimlane="B">
| <transition g="444,222:" to="join2"/>
| </task>
| <task g="75,384,92,52" name="task3" swimlane="A">
| <transition g="684,410:" to="join1"/>
| </task>
| <task g="745,120,92,52" name="task8">
| <transition to="end1"/>
| </task>
| <task g="513,120,92,52" name="task9" swimlane="B">
| <transition to="join1"/>
| </task>
| <task g="324,46,92,52" name="task1" swimlane="C">
| <transition g="440,70:" to="join2"/>
| </task>
| <fork g="266,125,48,48" name="fork2">
| <transition g="289,73:" to="task1"/>
| <transition g="292,226:" to="task2"/>
| </fork>
| <join g="417,123,48,48" name="join2">
| <transition to="task9"/>
| </join>
| <join g="652,119,48,48" name="join1">
| <transition to="task8"/>
| </join>
| <fork g="93,126,48,48" name="fork1">
| <transition to="task3"/>
| <transition to="fork2"/>
| </fork>
| </process>
|
|
In this case, it`s repeating Task1 in the second Fork (fork2).
Thanks for responding so fast.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266118#4266118
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266118
16 years, 7 months
[jBPM Users] - Re: nested forks
by saraswati.santanu
Sebastian,
So far I understand, you have some flow like this:
| <process name="ForumFlow2" xmlns="http://jbpm.org/4.0/jpdl">
| <start g="146,26,48,48" name="start1">
| <transition g="-43,-18" name="to fork1" to="fork1"/>
| </start>
| <fork g="148,100,48,48" name="fork1">
| <transition g="-44,-18" name="to task1" to="task1"/>
| <transition g="-44,-18" name="to task2" to="task3"/>
| </fork>
| <task g="205,191,92,52" name="task3">
| <transition g="-41,-18" name="to join1" to="join1"/>
| </task>
| <task g="59,196,92,52" name="task1">
| <transition g="-41,-18" name="to join1" to="join1"/>
| </task>
| <join g="152,287,48,48" name="join1" multiplicity="1">
| <transition g="-43,-18" name="to fork2" to="fork2"/>
| </join>
| <fork g="298,285,48,48" name="fork2">
| <transition g="-44,-18" name="to task3" to="task2"/>
| <transition g="-44,-18" name="to task1" to="task1"/>
| </fork>
| <task g="399,189,92,52" name="task2">
| <transition g="-41,-18" name="to join2" to="join2"/>
| </task>
| <task g="408,339,92,52" name="task1">
| <transition g="-41,-18" name="to join2" to="join2"/>
| </task>
| <join g="555,267,48,48" name="join2">
| <transition g="-42,-18" name="to end1" to="end1"/>
| </join>
| <end g="559,388,48,48" name="end1"/>
| </process>
|
In the first fork-join, you complete only task2 and leave task1 open and move on to the second fork-join. There you have two more tasks task1 and task3. Now when you search for active tasks you get task1, task1 and task3. But you expect only task1 and task3 to come and the earlier task1 should not come.
To achieve this you need to cancel task1 while taking a transition from first join node. Otherwise incomplete task task1 will always appear in the active task lists.
I would definitely wish to have a join node which based on some configuration cancels all the pending tasks automatically. But so far nothing such is available.
I hope I got you problem correct. If not then that will establish Tom's point in the sticky - Give the jpdl and test case to get a solution quickly :)
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266108#4266108
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266108
16 years, 7 months
[jBPM Users] - Re: Problem moving from 4.1 to 4.2 using Spring configuratio
by saraswati.santanu
Bob,
are you sure that there is no other jbpm.repository.hbm.xml in classpath? I do not see any problem with your configuration. If you are sure that there is no secong repository hbm then you need to do hard debugging of hibernate. In such a case you should watch org.hibernate.cfg.Configuration.classes. classes is a map in Configuration class which contains all the persistent classes hibernate found. Its very unlikely that you will get the PropertyImpl entry there (because it is throwing exception). From there you need to back track to the place where it creates the Configuration object. I do not see any short cut left for you :(
Rocker,
you may need to look at transaction-context and spring-transaction-interceptor. Make sure spring transaction interceptor does not have useCurrent flag on.
The reason why you might be getting the exception is that transaction propagation behaviour is set to "PROPAGATION_MANDATORY". But checkDb has to run in a new transaction. Because of Propagation mandatory, it does not create a transaction, expects that a transaction will be existing. But in does not find any transaction. So explodes.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266100#4266100
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266100
16 years, 7 months
[jBPM Users] - nested forks
by makam
Hi,
I have a situation where you have two nested fork, at the first fork left a task unfinished and launched the second fork with two more tasks, but when it launches the second fork, I repeat one of the tasks of the second Fork.
it means if the second Fork is associated with(Task 1, Task 2), when executed, throws (Task 1, Task 2, Task 1).
The second fork should not only launch their two tasks?, By repeating one of them?. this is normal operation with two nested Fork?.
Greetings
Sebastian.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266097#4266097
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266097
16 years, 7 months