[jboss-user] [JBoss jBPM] - Re: Why doesn't work?
ricardomarques
do-not-reply at jboss.com
Mon May 21 07:37:51 EDT 2007
BTW, i'm trying to isolate the problem, now i've tried to execute the process from another way, this time using StartProcessInstanceCommand.
Using this code:
| Properties props = System.getProperties();
| try {
|
| props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
| props.put(Context.PROVIDER_URL, "jnp://localhost:1099");
| props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
|
| Context ctx = new InitialContext(props);
|
| Object obj = ctx.lookup("CommandService");
|
| CommandServiceRemoteHome remoteCommandService = (CommandServiceRemoteHome) javax.rmi.PortableRemoteObject.narrow(obj,CommandServiceRemoteHome.class);
| CommandServiceRemote commandService = remoteCommandService.create();
|
| StartProcessInstanceCommand cmd = new StartProcessInstanceCommand();
|
| cmd.setProcessName("send mail 4");
| cmd.setCreateStartTask(false);
| cmd.setActorId("grover");
|
|
| System.out.println("RETURNING OBJECT: " + commandService.execute(cmd).toString());
|
| commandService.remove();
| ctx.close();
|
I get this exception:
| Caused by: org.jbpm.JbpmException: couldn't execute org.jbpm.command.StartProcessInstanceCommand at 1d3510d
| at pep.workflow.server.beans.command.CommandServiceBean.execute(CommandServiceBean.java:71)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
| at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:237)
| at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
| at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:169)
| at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
| at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
| at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
| at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
| at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
| at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
| ... 24 more
| Caused by: org.jbpm.JbpmException: token 'Token(/)' can't be signalled cause it is currently not positioned in a node
| at org.jbpm.graph.exe.Token.signal(Token.java:134)
| at org.jbpm.graph.exe.ProcessInstance.signal(ProcessInstance.java:251)
| at org.jbpm.command.StartProcessInstanceCommand.execute(StartProcessInstanceCommand.java:32)
| at pep.workflow.server.beans.command.CommandServiceBean.execute(CommandServiceBean.java:67)
| ... 38 more
|
|
The process XML is this:
| <?xml version="1.0" encoding="UTF-8"?>
|
| <process-definition
| xmlns="urn:jbpm.org:jpdl-3.1" name="sendmail">
| <start-state name="Inicio">
| <transition name="" to="Send Mail"></transition>
| </start-state>
| <end-state name="Fim"></end-state>
| <node name="Send Mail">
| <action class="pep.test.MailMeActionHandler"></action>
| <transition name="" to="Fim"></transition>
| </node>
| </process-definition>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4047193#4047193
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4047193
More information about the jboss-user
mailing list