[JBoss jBPM] - What is the difference between a
by prajatna
As mentioned in documentation..
TASK NODE
A task node represents one or more tasks that are to be performed by humans. So when execution arrives in a task node, task instances will be created in the task lists of the workflow participants. After that, the node will behave as a wait state. So when the users perform their task, the task completion will trigger the resuming of the execution. In other words, that leads to a new signal being called on the token.
NODE
The type node serves the situation where you want to write your own code in a node. The nodetype node expects one subelement action. The action is executed when the execution arrives in the node. The code you write in the actionhandler can do anything you want but it is also responsible for propagating the execution.
But confusion is that, where to use task node , and where a node.. Coz in both the case required acton is being written inside a handler class....
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4247517#4247517
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4247517
16 years, 4 months
[JBoss Messaging] - Re: Receiving XML from c++ sender
by sanches
"timfox" wrote : First of all, you are using JBoss Messaging 1.x , not JBoss MQ (default JMS provider in AS 5.0 is JBM) - I can see that in the stack trace.
|
Thanks for clarification, I was thinking that's MQ due to my declaration of JBoss' MBean:
| <mbean code="org.jboss.mq.server.jmx.Topic"
| name="jboss.mq.destination:service=Topic,name=SERVER/TOP">
| <attribute name="JNDIName">SERVER/TOP</attribute>
| <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
| </mbean>
|
"timfox" wrote : In JBM 1.x Having a forward slash in a destination name is illegal (there was a recent thread on this on this forum). You could try defining your topic as server.top, using a dot '.' to delimit words in a destination is also more consistent with how many other messaging systems define topic hierarchies.
|
Thank you, I've replaced slashes with dots and that's working well.
P.S. I was not able to find topic you talked about. Search isn't working. Hope this issue is in plans to fix already.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4247516#4247516
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4247516
16 years, 4 months
[Management, JMX/JBoss] - org/jboss/mx/server/MBeanServerBuilderImpl not found execpti
by rajika
hello everybody,
I guess this the correct forum to ask this question. If not please forward me to the correct one.
Environment:
OS - Linux
JBoss 5.0.0GA.
I am trying to deploy my application on JBoss. My application requires some data sources so I configured them as follows.
| <datasources>
| <local-tx-datasource>
|
| <!-- The jndi name of the DataSource, it is prefixed with java:/ -->
| <!-- Datasources are not available outside the virtual machine -->
| <jndi-name>XADerbyDS</jndi-name>
|
| <!-- for in-process persistent db, saved when jboss stops. The
| org.jboss.jdbc.DerbyDatabase mbean is necessary for properly db shutdown -->
| <connection-url>jdbc:derby://localhost:1527/esbdb;create=false</connection-url>
|
| <!-- The driver class -->
| <driver-class>org.apache.derby.jdbc.ClientDriver</driver-class>
|
| <!-- The login and password -->
| <user-name>esb</user-name>
| <password>esb</password>
|
| <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
| <min-pool-size>5</min-pool-size>
|
| <!-- The maximum connections in a pool/sub-pool -->
| <max-pool-size>20</max-pool-size>
|
| <!-- The time before an unused connection is destroyed -->
| <idle-timeout-minutes>5</idle-timeout-minutes>
|
| <!-- Whether to check all statements are closed when the connection is returned to the pool,
| this is a debugging feature that should be turned off in production -->
| <track-statements/>
|
| <!-- This mbean can be used when using in process persistent derby -->
| <!-- <depends>jboss:service=Derby</depends> -->
| </local-tx-datasource>
| <local-tx-datasource>
| <jndi-name>XADerbyDS1</jndi-name>
| <connection-url>jdbc:derby://localhost:1527/esbdb1;create=false</connection-url>
| <driver-class>org.apache.derby.jdbc.ClientDriver</driver-class>
| <user-name>esb</user-name>
| <password>esb</password>
| <min-pool-size>5</min-pool-size>
| <max-pool-size>20</max-pool-size>
| <idle-timeout-minutes>5</idle-timeout-minutes>
| <track-statements/>
| <depends>jboss:service=Derby</depends>
| </local-tx-datasource>
|
| <mbean code="org.jboss.jdbc.DerbyDatabase" name="jboss:service=Derby"/>
| </datasources>
|
|
I put the required jars (derby.jar, derbyclient.jar, derbynet.jar and derby-plugin.jar) into
$JBOSS_HOME/server/default/lib and I put the jboss-jmx.jar jar also into the same directory. But still I am getting the following exception when starting the JBOss server. Any help to fix the issue is greatly appreciate. Thanks in advance.
| 12:34:30,148 ERROR [AbstractKernelController] Error installing to Start: name=jboss:service=Derby state=Create mode=Manual requiredState=Installed
| java.lang.ExceptionInInitializerError
| at java.lang.Class.forName0(Native Method)
| at java.lang.Class.forName(Class.java:242)
| at org.jboss.jdbc.DerbyDatabase.getConnection(DerbyDatabase.java:222)
| at org.jboss.jdbc.DerbyDatabase.startService(DerbyDatabase.java:189)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:376)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:322)
| at sun.reflect.GeneratedMethodAccessor106.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
| at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:189)
| at $Proxy36.start(Unknown Source)
| at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
| at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
| at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
| at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
| at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
| at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
| at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
| at org.jboss.system.ServiceController.start(ServiceController.java:460)
| at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:146)
| at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:104)
| at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:45)
| at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
| at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
| at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
| at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:545)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
| at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
| at org.jboss.Main.boot(Main.java:209)
| at org.jboss.Main$1.run(Main.java:547)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.jboss.mx.server.MBeanServerBuilderImpl: java.lang.ClassNotFoundException: org/jboss/mx/server/MBeanServerBuilderImpl
| at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:499)
| at javax.management.MBeanServerFactory.getNewMBeanServerBuilder(MBeanServerFactory.java:530)
| at javax.management.MBeanServerFactory.newMBeanServer(MBeanServerFactory.java:304)
| at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:219)
| at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:180)
| at sun.management.ManagementFactory.createPlatformMBeanServer(ManagementFactory.java:264)
| at java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:512)
| at org.apache.derby.impl.services.jmx.JMXManagementService$3.run(Unknown Source)
| at org.apache.derby.impl.services.jmx.JMXManagementService$3.run(Unknown Source)
| at java.security.AccessController.doPrivileged(Native Method)
| at org.apache.derby.impl.services.jmx.JMXManagementService.findServer(Unknown Source)
| at org.apache.derby.impl.services.jmx.JMXManagementService.boot(Unknown Source)
| at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
| at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
| at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown Source)
| at org.apache.derby.iapi.services.monitor.Monitor.startSystemModule(Unknown Source)
| at org.apache.derby.impl.services.monitor.BaseMonitor.runWithState(Unknown Source)
| at org.apache.derby.impl.services.monitor.FileMonitor.<init>(Unknown Source)
| at org.apache.derby.iapi.services.monitor.Monitor.startMonitor(Unknown Source)
| at org.apache.derby.iapi.jdbc.JDBCBoot.boot(Unknown Source)
| at org.apache.derby.jdbc.EmbeddedDriver.boot(Unknown Source)
| at org.apache.derby.jdbc.EmbeddedDriver.<clinit>(Unknown Source)
| ... 56 more
| Caused by: java.lang.ClassNotFoundException: org/jboss/mx/server/MBeanServerBuilderImpl
| at java.lang.Class.forName0(Native Method)
| at java.lang.Class.forName(Class.java:164)
| at javax.management.MBeanServerFactory.loadBuilderClass(MBeanServerFactory.java:445)
| at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:484)
| ... 77 more
| 12:34:30,194 ERROR [AbstractKernelController] Error installing to Real: name=vfsfile:/home/rajika/installtion/jboss/jboss-5.0.0.GA/server/default/deploy/esb-derby-ds.xml state=PreReal mode=Manual requiredState=Real
| org.jboss.deployers.spi.DeploymentException: Error deploying: jboss:service=Derby
| at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
| at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:123)
| at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:45)
| at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
| at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
| at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
| at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:545)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
| at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
| at org.jboss.Main.boot(Main.java:209)
| at org.jboss.Main$1.run(Main.java:547)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: java.lang.ExceptionInInitializerError
| at java.lang.Class.forName0(Native Method)
| at java.lang.Class.forName(Class.java:242)
| at org.jboss.jdbc.DerbyDatabase.getConnection(DerbyDatabase.java:222)
| at org.jboss.jdbc.DerbyDatabase.startService(DerbyDatabase.java:189)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:376)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:322)
| at sun.reflect.GeneratedMethodAccessor106.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
| at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:189)
| at $Proxy36.start(Unknown Source)
| at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
| at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
| at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
| at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
| at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
| at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
| at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
| at org.jboss.system.ServiceController.start(ServiceController.java:460)
| at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:146)
| at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:104)
| ... 23 more
| Caused by: javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.jboss.mx.server.MBeanServerBuilderImpl: java.lang.ClassNotFoundException: org/jboss/mx/server/MBeanServerBuilderImpl
| at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:499)
| at javax.management.MBeanServerFactory.getNewMBeanServerBuilder(MBeanServerFactory.java:530)
| at javax.management.MBeanServerFactory.newMBeanServer(MBeanServerFactory.java:304)
| at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:219)
| at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:180)
| at sun.management.ManagementFactory.createPlatformMBeanServer(ManagementFactory.java:264)
| at java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:512)
| at org.apache.derby.impl.services.jmx.JMXManagementService$3.run(Unknown Source)
| at org.apache.derby.impl.services.jmx.JMXManagementService$3.run(Unknown Source)
| at java.security.AccessController.doPrivileged(Native Method)
| at org.apache.derby.impl.services.jmx.JMXManagementService.findServer(Unknown Source)
| at org.apache.derby.impl.services.jmx.JMXManagementService.boot(Unknown Source)
| at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
| at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
| at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown Source)
| at org.apache.derby.iapi.services.monitor.Monitor.startSystemModule(Unknown Source)
| at org.apache.derby.impl.services.monitor.BaseMonitor.runWithState(Unknown Source)
| at org.apache.derby.impl.services.monitor.FileMonitor.<init>(Unknown Source)
| at org.apache.derby.iapi.services.monitor.Monitor.startMonitor(Unknown Source)
| at org.apache.derby.iapi.jdbc.JDBCBoot.boot(Unknown Source)
| at org.apache.derby.jdbc.EmbeddedDriver.boot(Unknown Source)
| at org.apache.derby.jdbc.EmbeddedDriver.<clinit>(Unknown Source)
| ... 56 more
| Caused by: java.lang.ClassNotFoundException: org/jboss/mx/server/MBeanServerBuilderImpl
| at java.lang.Class.forName0(Native Method)
| at java.lang.Class.forName(Class.java:164)
| at javax.management.MBeanServerFactory.loadBuilderClass(MBeanServerFactory.java:445)
| at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:484)
| ... 77 more
|
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4247515#4247515
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4247515
16 years, 4 months
[EJB 3.0] - Question: TimerService creating WorkerJobs in a cluster
by CarstenRudat
Hi all,
I'm searching for an "best practice" answer for the following problem: I have several EJB3 TimerServices. They create "WorkerJobs" every x minutes, which were enqueued into a JMS-Queue. A MDB consumes them and executes these jobs.
That works fine.
Now, the load of this perticular JBoss is - some kind - at its limit, so I'm thinking of a second, third,... server to build up a cluster.
If I just deploy the application on a cluster (shared database; shared database for JBoss-Messaging; each node has a unique server-peer-id; ...), the TimerServices will run on each node and produce to much WorkerJobs (I just want one for every x minutes).
So, what should I do? Is there a JEE-way to handle that or a JBoss-way (cluster singleton?)?
Thank you for your help, and I apologise, that this is more general JEE question.
Carsten
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4247508#4247508
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4247508
16 years, 4 months
[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, 4 months