[JBoss jBPM] - Solved
by Jean-LucT
It was the correct way (the transition Non was followed only once in fact). I've made a coding error later that made my trace be triggered twice.
So the correct way of doing a Decision in Java code is to code directly in the Source tab of your processdefinition.xml the following code :
<decision name="Client actif ?">
| <handler class="fr.jl2tho.tutorialjbpm.action.IsCustomer" />
| <transition name="Oui" to="Enregistrer la Question"></transition>
| <transition name="Non" to="Prevenir le commercial"></transition>
| </decision>
|
Where IsCustomer implements org.jbpm.graph.node.DecisionHandler.
It seems to me impossible to do it through the GUI ProcessDesigner.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4082114#4082114
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4082114
18 years, 7 months
[JBoss jBPM] - Re: How to take a decision in java code
by Jean-LucT
Sorry but I didn't find this file on my jbpm-jpdl-suite-3.2.1.zip file. I may have to look for another download.
But I made some progress : in fact I've now define my process like this :
<decision name="Client actif ?">
| <handler class="fr.jl2tho.tutorialjbpm.action.IsCustomer" />
| <transition name="Oui" to="Enregistrer la Question"></transition>
| <transition name="Non" to="Prevenir le commercial"></transition>
| </decision>
|
There is no way in using the GUI to do so and the code assist doesn't provide any clue to add the handler tag.
My class is now a DecisionHandler :
public class IsCustomer implements DecisionHandler {
| private static final Logger logger = Logger.getLogger(IsCustomer.class);
| public IsCustomer(){
| super();
| }
|
| public String decide(ExecutionContext executionContext) throws Exception {
| String maSortie="Oui";
| ContextInstance contextInstance = executionContext.getContextInstance();
| if (contextInstance.getVariable("Nom du contact").equals("Non")) {
| maSortie="Non";
| }
|
| return maSortie;
| }
|
| public void setConfiguration(String Config){
|
| }
| }
|
Im' now able to go either through the Non or Oui transition.
My last problem is that it seems to me that it goes twice through the Non transition.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4082107#4082107
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4082107
18 years, 7 months
[JCA/JBoss] - Re: database failover for ejb application (persistance.xml p
by grdzeli_kaci
ok vickyk, i will try to explain my task,
in my company we have two billing system:
1. Online(Realtime) Billing and
2.Offline Billing
1. online billing is pure java program which uses oracle timesten in-memory databases.
2. offline billing is java (EJB) application(s) , which is on jboss and uses oracle database faiover cluster. for this application oracle is transparent and we have no any problems with it.
but offline billing also use timesten databases described above for online billing, offline billing does not know which timesten database is active and which is stand by, that is know online billing, it takes decision for switching timesten from one to another. after switch it send message to offline billing that which timesten database is active.
know after offline billing got message it must be switch database for itself.
Oracle Timesten In-Memory Database does not have cluster.
Messaging between online and offline billing based on TIBCO Rendezvous Messaging.
we tried to use timesten database for active-standby configuration, one is activa another is standby and so on.
is is correct if i use URLSelector strategy ?
and i don't know what does it mean "BL implemented in URLSelector"
you idea use multiple DS i knew, but i think that is not good design.
ps. sorry for my poor English.
________
Regards,
Paata.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4082100#4082100
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4082100
18 years, 7 months