[jBPM] - jBPM5 - Using as a state machine in clustered spring application with a dashboard
by Narayan Singh
Narayan Singh [http://community.jboss.org/people/narayans] created the discussion
"jBPM5 - Using as a state machine in clustered spring application with a dashboard"
To view the discussion, visit: http://community.jboss.org/message/595120#595120
--------------------------------------------------------------
We're currently investigating to use BPM as a workflow/state machine for process orchestration in a very high volume clustered environment. Orchestration component is Spring application which sends and receives events from other component over MQ/REST and basically events decides process state transition.
Here are some basic requirements for the Orchestration component we have and so far my observations with jBPM5 -
1. Clustering and Server deployment - Multiple instances of orchestration component are deployed to the cluster, hence the process state is maintained across cluster and server instances can drop and join the cluster any time.
Observation: If I use drools-spring to boot-strap my jBPM5 engine then I got 2 options - a) create new session or b) load existing session. But to load existing session I need to specify session id. In other words, I would need to write custom code upfront to decide whether I want to create new session or load existing one based on some thing, and this code needs to be cluster-safe as multiple instances starting up at the same time.
So do you agree we cant use any out-of-the box solution here and one have to write custom boot-strap code?
2. Dashboard support - We have our own platform-wide Dashboard and we want to add process state information to it, ideally using REST interface provided by jBPM. So we're not using any of jBPM console apps provided out-of-the-box.
Observation: currently jBPM console functionality is consists of JBoss BPM modules(ex. org.jboss.bpm:gwt-console-server etc) hooked in with jBPM integration services as provided in jbpm-gwt-xxx modules. we cant use it out-of-the box because -
1/ some of the jbpm-gwt-xxx modules have got persistence.xml with hard-wired H2 database details
2/ they are tightly coupled with Human-task and Guvonor, however in our case we are bundling all our processes as part of the application and not using any WS-HT either. In other words state transition of our process is driven by the events.
So as I understand we would need to build our version of "org.jboss.bpm:gwt-console-server" bundled with custom services to expose REST api to be used by dashboard. Would Knowledge api be used to extract current state from the database or am I missing something here?
3. Persistence - As I understand there are 2 forms of it - runtime state and auditing. Auditing is mainly pluggable using various listeners, and there are some out-of the box audit loggers available. For Runtime state, which is core part of jBPM5, I only see 3 entities -
<class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</class>
<class>org.drools.persistence.info.SessionInfo</class>
<class>org.drools.persistence.info.WorkItemInfo</class>
Observation: Runtime state is stored in binary form and there is no relationship between tables, so merely looking at tables not able to say which process part of which session. So one has to use knowledgeSession to extract the information.
I see loads of potential in jBPM5 and believe it could be used in our case. I would really appreciate any directions here to understand how it can solve our requirements as pointed out above?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/595120#595120]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 3 months
[jBPM] - Incorrect Gateway diverge and converge operations in jBPM 5
by shashi mhatre
shashi mhatre [http://community.jboss.org/people/khalipili] created the discussion
"Incorrect Gateway diverge and converge operations in jBPM 5"
To view the discussion, visit: http://community.jboss.org/message/581930#581930
--------------------------------------------------------------
I am using below sample flow in my test. it contains three human task. once the process process is started it execute successfully till human task creation. As the first gateway diverge is of type "AND" it creates two task as shown below. I can view these task in jbpm-console. now once i login as user "Shashi" and complete the first task, As the next gateway converge is of type "XOR", the flow proceeds further and create the next task for user "Shashi".
As process have proceed further till gateway converge, jbpm should have remove the task for user "kris". but jbpm still shows the task for user "kris".
this seems to be a error in jbpm process execution.
next once user "shashi" completes the human task, process execution completes but throws below error. it seems that human task handler tries to abort the "kris" task which should have be aborted prior (at gateway converge).
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
java.lang.IllegalArgumentException: attempt to create merge event with null entity
at org.hibernate.event.MergeEvent.<init>(MergeEvent.java:60)
at org.hibernate.event.MergeEvent.<init>(MergeEvent.java:43)
at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:688)
at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:692)
at org.hibernate.ejb.AbstractEntityManagerImpl.merge(AbstractEntityManagerImpl.java:235)
at org.drools.persistence.processinstance.JPAWorkItemManager.abortWorkItem(JPAWorkItemManager.java:124)
at org.drools.command.runtime.process.AbortWorkItemCommand.execute(AbortWorkItemCommand.java:56)
at org.drools.command.runtime.process.AbortWorkItemCommand.execute(AbortWorkItemCommand.java:29)
at org.drools.persistence.session.SingleSessionCommandService.execute(SingleSessionCommandService.java:274)
at org.drools.command.impl.CommandBasedStatefulKnowledgeSession$1.abortWorkItem(CommandBasedStatefulKnowledgeSession.java:149)
at com.sample.util.CommandBasedWSHumanTaskHandler$GetCompletedTaskResponseHandler.execute(CommandBasedWSHumanTaskHandler.java:257)
at org.jbpm.task.service.TaskClientHandler.messageReceived(TaskClientHandler.java:81)
at org.jbpm.task.service.mina.MinaTaskClientHandler.messageReceived(MinaTaskClientHandler.java:47)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:713)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)
at org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:375)
at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:229)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)
at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:119)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:426)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:638)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:598)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:587)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$400(AbstractPollingIoProcessor.java:61)
at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:969)
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
[2011:01:19 17:01:78:exception] Uncaught exception on client
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
. http://community.jboss.org/servlet/JiveServlet/showImage/2-581930-11171/S... http://community.jboss.org/servlet/JiveServlet/downloadImage/2-581930-111...
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/581930#581930]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 3 months
[JBoss Web Services] - WebServiceException: Cannot find service endpoint target
by johannes dünser
jodue [http://community.jboss.org/people/jodue] created the discussion
"WebServiceException: Cannot find service endpoint target"
To view the discussion, visit: http://community.jboss.org/message/566689#566689
--------------------------------------------------------------
hi!
i am trying to resolve the following problem for some day's now without success. maybe one of you jboss-guru's can point me in the right direction ;)
i am developing a webservice with *jboss4.2.2/3-ga* and *java1.6*. i managed to get a simple web-service running but when i add it to the whole project, the deployer gives me this exception (trace):
13:13:42,482 ERROR [MainDeployer] Could not start deployment: file:/data/usr/local/jboss-4.2.3.GA/server/default/tmp/deploy/tmp1136423091139585996base-app.jar-contents/base.jar
javax.xml.ws.WebServiceException: Cannot find service endpoint target: jboss.j2ee:name=MailingListService,service=EJB3,jar=base.jar,ear=base-app.jar
at org.jboss.wsf.container.jboss42.InvocationHandlerEJB3.init(InvocationHandlerEJB3.java:83)
at org.jboss.wsf.framework.deployment.DefaultLifecycleHandler.create(DefaultLifecycleHandler.java:51)
at org.jboss.wsf.framework.deployment.EndpointLifecycleDeploymentAspect.create(EndpointLifecycleDeploymentAspect.java:42)
at org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl.deploy(DeploymentAspectManagerImpl.java:118)
at org.jboss.wsf.container.jboss42.ArchiveDeployerHook.deploy(ArchiveDeployerHook.java:97)
at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:90)
at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
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:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy34.start(Unknown Source)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
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:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy9.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
13:13:42,482 ERROR [MainDeployer] Could not start deployment: file:/data/usr/local/jboss-4.2.3.GA/server/default/tmp/deploy/tmp1136423091139585996base-app.jar-contents/base.jar
javax.xml.ws.WebServiceException: Cannot find service endpoint target: jboss.j2ee:name=MailingListService,service=EJB3,jar=base.jar,ear=base-app.jar
at org.jboss.wsf.container.jboss42.InvocationHandlerEJB3.init(InvocationHandlerEJB3.java:83)
at org.jboss.wsf.framework.deployment.DefaultLifecycleHandler.create(DefaultLifecycleHandler.java:51)
at org.jboss.wsf.framework.deployment.EndpointLifecycleDeploymentAspect.create(EndpointLifecycleDeploymentAspect.java:42)
at org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl.deploy(DeploymentAspectManagerImpl.java:118)
at org.jboss.wsf.container.jboss42.ArchiveDeployerHook.deploy(ArchiveDeployerHook.java:97)
at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:90)
at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
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:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy34.start(Unknown Source)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
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:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy9.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
the service seems to be registered but not started as i see it under *Registered Service Endpoints* but with "*Start Time = null*"
from what i have read on other boards/mailing lists, it seems to be some sort of a timing problem/race condition. the (simople test) service itself does not depend on any other class but yet again, the problem only occurs when it's integrated in the whole project which also workes by itself ???
the demo code:
@WebService
@SOAPBinding(style=SOAPBinding.Style.RPC)
public interface IMailingListService extends Remote
{
@WebMethod public String helloWorld() throws RemoteException;
}
@Stateless
@WebService(
endpointInterface="packagename.IMailingListService"
)
public class MailingListService implements IMailingListService
{
@WebMethod public String helloWorld() throws RemoteException
{
return "hello world";
}
}
thanks in advance for any idea that points me in the right direction :)
greetings johannes
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/566689#566689]
Start a new discussion in JBoss Web Services at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 3 months
[JBoss Remoting] - Re: Remote Client.addCallbackListener hang
by Ron Sigal
Ron Sigal [http://community.jboss.org/people/ron_sigal] created the discussion
"Re: Remote Client.addCallbackListener hang"
To view the discussion, visit: http://community.jboss.org/message/601555#601555
--------------------------------------------------------------
Hi David,
I think you're on the right track. BisocketClientInvoker.handleConnect() is waiting for a socket to use for the "control" connection. In fact, it should already be there in the sockets Set. When JBossMessaging sets up a connection, it calls org.jboss.remoting.Client.addListener(), which results in a call to BisocketClientInvoker.transport():
protected Object transport(String sessionId, Object invocation, Map metadata,
Marshaller marshaller, UnMarshaller unmarshaller)
throws IOException, ConnectionFailedException, ClassNotFoundException
{
String listenerId = null;
if (invocation instanceof InvocationRequest)
{
InvocationRequest ir = (InvocationRequest) invocation;
Object o = ir.getParameter();
if (o instanceof InternalInvocation)
{
InternalInvocation ii = (InternalInvocation) o;
if (InternalInvocation.ADDLISTENER.equals(ii.getMethodName())
&& ir.getLocator() != null) // getLocator() == null for pull callbacks
{
Map requestPayload = ir.getRequestPayload();
listenerId = (String) requestPayload.get(Client.LISTENER_ID_KEY);
listenerIdToClientInvokerMap.put(listenerId, this);
BisocketServerInvoker callbackServerInvoker;
callbackServerInvoker = BisocketServerInvoker.getBisocketServerInvoker(listenerId);
callbackServerInvoker.createControlConnection(listenerId, true);
}
// Rather than handle the REMOVELISTENER case symmetrically, it is
// handled when a REMOVECLIENTLISTENER message is received by
// BisocketServerInvoker.handleInternalInvocation(). The reason is that
// if the Client executes removeListener() with disconnectTimeout == 0,
// no REMOVELISTENER message will be sent.
}
}
return super.transport(sessionId, invocation, metadata, marshaller, unmarshaller);
}
In particular, the call to callbackServerInvoker.createControlConnection() creates the socket on the client side whose counterpart on the server side should land in the sockets Set. For some reason, that isn't happening. If you can nail that down, then you've got it.
Thank you for letting me know about this issue. Please let me know how your detective work goes, and let me know if you have any questions.
-Ron
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/601555#601555]
Start a new discussion in JBoss Remoting at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 3 months
[JBoss Messaging] - How to browse the DLQ?
by Aurélien Lansmanne
Aurélien Lansmanne [http://community.jboss.org/people/alansmanne] created the discussion
"How to browse the DLQ?"
To view the discussion, visit: http://community.jboss.org/message/585449#585449
--------------------------------------------------------------
Hello,
I've been trying to read the messages from the Jboss DLQ for some times... but without success.
First, i've tried to use a QueueBrowser. I thought it could display the messages in the DLQ as they are stuck there and never received by any client.
Queue DLQueue = ServiceLocator.getInstance().getQueue("queue/DLQ");
QueueConnectionFactory queueConnectionFactory = ServiceLocator.getInstance().getQueueConnectionFactory("ConnectionFactory"); //Service locator is a wrapper that does (QueueConnectionFactory) context.lookup("qConnFactoryName")
QueueConnection queueConnection = queueConnectionFactory.createQueueConnection();
QueueSession queueSession = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
QueueBrowser DLQBrowser = queueSession.createBrowser(DLQueue);
Enumeration<?> dlqEnum = DLQBrowser.getEnumeration();
while (dlqEnum.hasMoreElements()) {
Object object = dlqEnum.nextElement();
// Do something with object
}
queueConnection.close();
But the enumeration is empty...
I've also tried to use the JMX-console. When I click on name=DLQ,service=Queue, then listMessageCounter(), i can see that there are indeed 100 messages in the DLQ. But when I try to browse them :
* listScheduledMessages() : empty ...
* listMessages() : empty...
* listInProcessMessages() : empty...
Then, I tried to open the HSQL database myself with DBVisualizer to browse the JMS_MESSAGES table. But I was only able to see some messages IDS, but not the message itself.
My last option is to use a Message Listener on the DLQ and do all the business to store them somewhere I can easily access... if I can't use any of the previous options.
Any help is appreciated.
Aurélien Lansmanne.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/585449#585449]
Start a new discussion in JBoss Messaging at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 4 months