[JBoss jBPM] - Problem with Tax Node
by prajatna
Hi,
I have a task node with two transitions and a task attached to it.The code is as follows..
| <task-node name="HOD_Approval">
| <event type="node-enter">
| <action class="com.sample.action.ProcessAction" accept-propagated-events="false"></action>
| </event>
| <transition to="Finance_Approval" name="Accepted"></transition>
| <transition to="end-state" name="Denied"></transition>
| </task-node>
Inside ProcessAction class I am accepting the decision from user and want to go to the next transition accordingly..
| public class ProcessAction implements ActionHandler {
|
| private static final long serialVersionUID = 1L;
|
| public void execute(ExecutionContext executionContext) throws Exception { System.out.println("######################---------ProcessAction------------1-----------------###################### .");
| System.out.println("This Node is---"+executionContext.getNode().getName());
| System.out.print("Enter your decission: ");
| BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
|
| String decission = null;
| try {
| decission = br.readLine();
| } catch (IOException ioe) {
| System.out.println("IO error trying to read your decission!");
| }
| System.out.println("Thanks for the desission, " + decission);
| System.out.println("######################---------ProcessAction------------2-----------------###################### .");
| if(decission != null && decission.equalsIgnoreCase("a")){
|
| System.out.println("######################---------ProcessAction----a--------3-----------------###################### .");
| executionContext.getTaskInstance().end("Accepted");
| }
| else if(decission != null && decission.equalsIgnoreCase("d")){
|
| System.out.println("######################---------ProcessAction-----d-------3-----------------###################### .");
| executionContext.leaveNode("Denied");
| }
| else if(decission != null && decission.equalsIgnoreCase("c")){
| System.out.println("######################---------ProcessAction-----c-------3-----------------###################### .");
|
| executionContext.leaveNode("checkBudget");
| }
| else{
| System.out.println("Error trying to read your decission!..Enter only a/d ");
| }
|
| }
| }
|
With this the flow is navigating correctly to the next node as per the decision, But after reaching end -state , again the process is selecting a default transition ..where as it should stop, at end node..
The class I am using to invoke the jBPM is as follows..
| public class TravelProcessTest extends TestCase {
|
| public static void main(String args[])throws Exception {
| new TravelProcessTest().execute();
| }
| public void execute() throws Exception {
| JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();
| JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
|
| // Extract a process definition from the processdefinition.xml file.
| ProcessDefinition processDefinition = ProcessDefinition.parseXmlResource("simple/processdefinition.xml");
| //HashMap map = new HashMap();
|
| //map.put("travelDate",new Integer(100));
| //map.put("travelPeriod",new Integer(50));
|
| //Create an instance of the process definition.
| //ProcessInstance instance = new ProcessInstance(processDefinition,map);
| ProcessInstance instance = new ProcessInstance(processDefinition);
| System.out.println("--------------------1-----------------######### .");
| displayStatus(instance);
| System.out.println("---------------------2-----------------########## .");
| instance.signal();
|
| System.out.println("---------------------3-----------------###########.");
| displayStatus(instance);
| System.out.println("---------------------4-----------------###########.");
| instance.end();
|
|
| }
|
| private void displayStatus(ProcessInstance instance) {
| String nodeName = instance.getRootToken().getNode().getName();
| System.out.println("You are now in node: "+nodeName);
|
| }
| }
|
|
|
Can you please suggest what is going wrong.. so that even after reaching end state , the process is again propagating to another transition..
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4247506#4247506
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4247506
16 years, 8 months
[JBoss jBPM] - JBPM-4.0 configuration with eclipse fetching error
by GajananM
when i am trying to configure the jbpm plugin (jbpm-gpd-site.zip) file with eclipse3.5 that time i am getting below error
Cannot complete the install because one or more required items could not be found.
Software being installed: jBPM 4 Graphical Editor and Tools 1.0.0.v200907072256-3--8s733L3H3H77DF (org.jboss.tools.flow.jpdl4.feature.feature.group 1.0.0.v200907072256-3--8s733L3H3H77DF)
Missing requirement: jPDL4 Graphical Editor 1.0.0.v200907072256 (org.jboss.tools.flow.jpdl4 1.0.0.v200907072256) requires 'bundle org.eclipse.gef 3.4.1' but it could not be found
Cannot satisfy dependency:
From: jBPM 4 Graphical Editor and Tools 1.0.0.v200907072256-3--8s733L3H3H77DF (org.jboss.tools.flow.jpdl4.feature.feature.group 1.0.0.v200907072256-3--8s733L3H3H77DF)
To: org.jboss.tools.flow.jpdl4 [1.0.0.v200907072256]
please help me to resolved this issue
thanks in advance
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4247472#4247472
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4247472
16 years, 8 months
[JBoss jBPM] - Problem with Errors in named queries when deploying jbpm wit
by gerry78
Hi All,
I am trying to use jbpm 3.3.1 with oracle 10g and weblogic 10.3. I get the following exception from hibernate when i deploy the application:
org.hibernate.HibernateException: Errors in named queries: GraphSession.deleteJobsForProcessInstance, JobSession.deleteTimersForProcessInstance, GraphSession.AllProcessNames, JobSession.suspendJobs, JobSession.deleteExecuteNodeJobsForProcessInstance, GraphSession.deleteTaskInstancesById, JobSession.deleteTimersByName, JobSession.resumeJobs
I tried to chenge the server to a tomcat server or the database to mysql and the same problem exists. I saw in some post that using the latest version of hibernate will solve the problem but this haven't done the trick.
The problem exists in the org/jbpm/db/hibernate.queries.hbm.xml but i don't know how to change the queries there.
Is anyone that experienced a simular problem and solve it that can help?
Thanks a lot.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4247446#4247446
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4247446
16 years, 8 months
[JBoss jBPM] - Re: change hibernate , replace with other orm
by sebastian.s
Hello Tommy,
I am still quite new to jBPM and I am not an expert on this but I think jBPM depends heavily on Hibernate. Changing jBPM to use a different ORM would require quite some changes and coding.
You would have to rewrite / change all parts where Hibernate is used - this means all method and function calls etc. So there is no easy way or description of changing the ORM used in the project. Whereever persistence is required in jBPM Hibernate is used - so that would mean huge changes.
In case I got something wrote I'll be happy to hear corrections and statements of the advanced users here.
Anyway: What's the problem with Hibernate? Since it is used internally by jBPM you don't have to deal directly with it. So where is the point in changing the ORM?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4247430#4247430
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4247430
16 years, 8 months