[jBPM] - Simple state machine with transitions
by Alfie Kirkpatrick
Alfie Kirkpatrick [https://community.jboss.org/people/alfiekirkpatrick] created the discussion
"Simple state machine with transitions"
To view the discussion, visit: https://community.jboss.org/message/821954#821954
--------------------------------------------------------------
We have an existing (bespoke) workflow engine in our product and we are looking at options to bring it up-to-date using jBPM or similar.
Each asset type in our system has a state machine that defines the lifecycle of the asset. For each state there are a number of transitions to other states (or back to the same state). These can be triggered by users of the system or through an API.
It's important that the people doing the configuration for a project can easily define the state machine for a particular asset type. This is currently done through a non-graphical web form as a complex kind of table (not pretty but it works).
Additionally, we can define which user roles can execute each transition and therefore control who can shift assets from one state to another. Since 'save' and 'view' are actually transitions internally, this provides a good level of access control.
There's more functionality such as custom actions on transitions and transition parameters but you get the basic idea.
I'm new to jBPM (I did some work on jBPM 4 but for a different scenario). It seems this scenario would typically be handled by a combination of user task (or manual task) and a gateway. The steps might be:
- Define a task connected to a gateway
- Before completing the task, set process variable to the path to follow, eg. transition="save"
- Place a constraint on each outgoing flow on the gateway, eg. return "save".equals(transition)
It seems the mapping of task output to variable could be handled in the BPMN also, though I've not looked at that in detail.
The main issue I see is that this is tricky and error prone to set up for a complex scenario, so I am trying to think of ways to simplify it for projects.
One idea would be to define a simpler XML format expressing the states/transitions involved and then transform it to BPMN for jBPM before loading.
Another idea would be to add a new SemanticModule to the PackageBuilderConfiguration, to allow different elements in the process that give the "higher level" definition we're after.
A third idea would be to give up on BPMN and use the underlying state machine in jBPM/Drools, ie. handle things at a lower level. It seems that the SemanticModule for BPMN ends up transforming to some lower level XML, and maybe this is where we should be looking.
Sorry for the long post, but any general thoughts on which way to proceed, or areas to investigate much appreciated!
Alfie.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/821954#821954]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 10 months
[jBPM] - Continual internal server error when starting JBPM-Console
by David Harris
David Harris [https://community.jboss.org/people/dmwpepper] created the discussion
"Continual internal server error when starting JBPM-Console"
To view the discussion, visit: https://community.jboss.org/message/822071#822071
--------------------------------------------------------------
I'm consistently getting the following error, displayed after logging into the JBPM- Console (jBPM 5.4). I've tried deleting the directory and then reinstalling, but the error still occurs. Any ideas what it might be?:
URL: ' http://localhost:8080/gwt-console-server/rs/tasks/krisv http://localhost:8080/gwt-console-server/rs/tasks/krisv'
Action: 'org.jboss.bpm.console.client.task.LoadTasksAction'
Exception: 'class com.google.gwt.http.client.RequestException'
HTTP 500:
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.jboss.resteasy.spi.UnhandledException: java.lang.NoClassDefFoundError: org/jboss/netty/channel/socket/ClientSocketChannelFactory
org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:340)
org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:214)
org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:190)
org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:540)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:502)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119)
org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)
root cause
java.lang.NoClassDefFoundError: org/jboss/netty/channel/socket/ClientSocketChannelFactory
org.hornetq.core.remoting.impl.netty.NettyConnectorFactory.createConnector(NettyConnectorFactory.java:40)
org.hornetq.core.client.impl.ClientSessionFactoryImpl.getConnection(ClientSessionFactoryImpl.java:1118)
org.hornetq.core.client.impl.ClientSessionFactoryImpl.getConnectionWithRetry(ClientSessionFactoryImpl.java:993)
org.hornetq.core.client.impl.ClientSessionFactoryImpl.connect(ClientSessionFactoryImpl.java:224)
org.hornetq.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:663)
org.jbpm.task.service.hornetq.HornetQTaskClientConnector.connect(HornetQTaskClientConnector.java:96)
org.jbpm.task.service.hornetq.HornetQTaskClientConnector.connect(HornetQTaskClientConnector.java:76)
org.jbpm.task.service.TaskClient.connect(TaskClient.java:845)
org.jbpm.integration.console.TaskClientFactory.newAsyncInstance(TaskClientFactory.java:101)
org.jbpm.integration.console.TaskClientFactory.newAsyncInstance(TaskClientFactory.java:111)
org.jbpm.integration.console.TaskClientFactory.newInstance(TaskClientFactory.java:65)
org.jbpm.integration.console.TaskManagement.connect(TaskManagement.java:61)
org.jbpm.integration.console.TaskManagement.getAssignedTasks(TaskManagement.java:124)
org.jboss.bpm.console.server.TaskListFacade.getTasksForIdRef(TaskListFacade.java:101)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/822071#822071]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 10 months
[jBPM] - Error: APPLICATION ERROR: transaction still active in request with status 0
by alvinuw
alvinuw [https://community.jboss.org/people/alvinuw] created the discussion
"Error: APPLICATION ERROR: transaction still active in request with status 0"
To view the discussion, visit: https://community.jboss.org/message/820178#820178
--------------------------------------------------------------
Hello,
I am trying to deploy my jbpm5.4 process in console.
The process is very simple, which contains a start -> the first workItem(EmailSender)->the first workItem(EmailReceiver)->an end
For some reason, I have to write the custom workitemhandlers for the two workItems, EWSHandler and EWSHandler2.
*Please note:* I also have two variables(MsgId, Checker) for the com.sample.bpmn.EmailApps process.
And I used eclipse plugin to develop it, it works well on eclipse.
In EWSHandler.java, I have:
Map<String, Object> results = new HashMap<String, Object>();
results.put("MsgId", id);
results.put("Checker", recipient);
manager.completeWorkItem(workItem.getId(), results);
I followed the below steps to deploy the process in console.
*1*. modify $jbpm_installer/conf/META-INF/CustomWorkItemHandlers.conf
[
"Log": new org.jbpm.process.instance.impl.demo.SystemOutWorkItemHandler(),
"EmailSender": new com.sample.EWSHandler(),
"EmailReceiver": new com.sample.EWSHandler2(),
]
*2.* put both com.sample.EWSHandler.jar and com.sample.EWSHandler2.jar in $jbpm_installer/dependencies folder.
*3.* Run commands
ant clean.demo
ant install.demo
ant start.demo
*4.* Upload EmailApps-image.png and EmailApps.bpmn to Guvnor's defaultPackge, then build package.
*5.* login Console, check Process Overview.
https://community.jboss.org/servlet/JiveServlet/showImage/2-820178-20884/... https://community.jboss.org/servlet/JiveServlet/downloadImage/2-820178-20...
*6. I don't know why it shows "Process1" instead of "EmailApps" in my process list. How to change the process name?*
When I checked the server.log, it gave me the following error*.
*
12:24:37,529 WARN [org.drools.guvnor.server.repository.RulesRepositoryManager] (http-localhost-127.0.0.1-8080-14) Creating RulesRepository with default username.
12:24:37,529 INFO [stdout] (http-localhost-127.0.0.1-8080-14) =============== session-guest-33
12:24:37,529 INFO [stdout] (http-localhost-127.0.0.1-8080-14) =============== session-guest-33
12:24:45,407 ERROR [org.jboss.as.txn] (http-localhost-127.0.0.1-8080-6) *JBAS010152:* *APPLICATION ERROR: transaction still active in request with status 0*
12:24:47,513 WARN [org.drools.guvnor.server.repository.RulesRepositoryManager] (http-localhost-127.0.0.1-8080-14) Creating RulesRepository with default username.
12:24:47,513 INFO [stdout] (http-localhost-127.0.0.1-8080-14) =============== session-guest-34
I searched this error in both google and our community, but didn't get a proper answer.
If you need me to provide more details, please let me know.
Thank you very much.
Alvin
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/820178#820178]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 10 months
[jBPM] - Your idea to design this case
by Ouadi BELMOKHTAR
Ouadi BELMOKHTAR [https://community.jboss.org/people/ouadi_dev] created the discussion
"Your idea to design this case"
To view the discussion, visit: https://community.jboss.org/message/822040#822040
--------------------------------------------------------------
Hi Guys,
I am developing a workflow web-based application, the simplification of BPMN2 process definition is :
The first human task is assigned to *Maker* actor.
Then the second human task is assigned to *Checker* actor.
Currency can take : *OnInstance* or *Validated* states in database.
Maker actor complete his HumanTask after adding a new currency across a JSF form, after that, the currency take the OnInstance state in database.
After Checker actor connect to the application, hi has a list of assigned HumanTask in combination with currencies data that are OnInstance state (already added by Maker actor), by clicking on a currency item in the list, the checker actor is forwarded to a JSF page in order to validate this currency, his assigned HumanTask must be completed at the same time of submitting the currency validation JSF form.
*The problem is, how to associate each Currency that is OnInstance state with Checker HumanTask, in order to complete his HumanTask at the same time of validating the selected currency in the list ?*
The completion of checker HumanTask and validation of currency must be done at the same time, *THEN we must define a mechanism in order to associate the currency just added by Maker actor with checker assigned humanTask created by jBPM engine across wish he will validate this currency. *
So, this association must be done just after the Maker actor add a new currency and completing his HumanTask.
*So, we must consider when the Maker actor added several currencies in one time, in this case, several HumanTask will be assigned to Checker actor by the jBPM engine.*
Thanks in advance
Ouadi,
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/822040#822040]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 10 months
[jBPM] - Task assign + LDAP
by aemdtuc
aemdtuc [https://community.jboss.org/people/aemdtuc] created the discussion
"Task assign + LDAP"
To view the discussion, visit: https://community.jboss.org/message/822013#822013
--------------------------------------------------------------
I´m having a problem regarding task assignment in jBPM 5.4
My actual system has:
- JBPM Console with LDAP
- GUVNOR with LDAP
- Human Task with LDAP
However when JBPM requires access to GUVNOR, using a LDAP fixed user (Now has my LDAP credentials) defined in:
- jbpm-installer\conf\default.jbpm.console.properties
The application is working well with this configuration and you can start a process. However the new task is not assigned to the indicated group and the error is:
14:03:38,663 ERROR [org.jbpm.task.service.TaskServerHandler] (Thread-69) There are no known Business Administrators, task cannot be created according to WS-HT specification: org.jbpm.task.service.CannotAddTaskException: There are no known Business Administrators, task cannot be created according to WS-HT specification
at org.jbpm.task.service.TaskServiceSession.doCallbackOperationForPeopleAssignments(TaskServiceSession.java:1326) [jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final]
at org.jbpm.task.service.TaskServiceSession.addTask(TaskServiceSession.java:170) [jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final]
at org.jbpm.task.service.TaskServerHandler.messageReceived(TaskServerHandler.java:151) [jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final]
at org.jbpm.task.service.hornetq.HornetQTaskServerHandler.messageReceived(HornetQTaskServerHandler.java:43) [jbpm-human-task-hornetq-5.4.0.Final.jar:5.4.0.Final]
at org.jbpm.task.service.hornetq.BaseHornetQTaskServer.run(BaseHornetQTaskServer.java:104) [jbpm-human-task-hornetq-5.4.0.Final.jar:5.4.0.Final]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_17]
14:03:38,704 ERROR [org.jbpm.process.workitem.wsht.GenericHTWorkItemHandler] (Thread-107) Fri Jun 07 14:03:38 CEST 2013: Error when creating task on task server for work item id 15. Error reported by task server: There are no known Business Administrators, task cannot be created according to WS-HT specification: org.jbpm.task.service.CannotAddTaskException: There are no known Business Administrators, task cannot be created according to WS-HT specification
at org.jbpm.task.service.TaskServiceSession.doCallbackOperationForPeopleAssignments(TaskServiceSession.java:1326) [jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final]
at org.jbpm.task.service.TaskServiceSession.addTask(TaskServiceSession.java:170) [jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final]
at org.jbpm.task.service.TaskServerHandler.messageReceived(TaskServerHandler.java:151) [jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final]
at org.jbpm.task.service.hornetq.HornetQTaskServerHandler.messageReceived(HornetQTaskServerHandler.java:43) [jbpm-human-task-hornetq-5.4.0.Final.jar:5.4.0.Final]
at org.jbpm.task.service.hornetq.BaseHornetQTaskServer.run(BaseHornetQTaskServer.java:104) [jbpm-human-task-hornetq-5.4.0.Final.jar:5.4.0.Final]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_17]
My question is regarding a possible solution to this error or another alternative to communicate GUVNOR and the JBPM CONSOLE using both LDAP connections.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/822013#822013]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 10 months
[JBoss Web Services] - Problem on EAP 6.1/JBoss AS 7.2 from AS 7.1.1
by John Ament
John Ament [https://community.jboss.org/people/meetoblivion] created the discussion
"Problem on EAP 6.1/JBoss AS 7.2 from AS 7.1.1"
To view the discussion, visit: https://community.jboss.org/message/821998#821998
--------------------------------------------------------------
Hi all
I'm testing my app locally, where we've been using AS 7.1.1 for a while. The idea is to beable to drop this in as a replacement for our AS 7.1.1 runtime, since we're eventually going to target EAP for our runtime.
I found an issue around web services. One of our clients, which sends data to us, includes the following soap action: SOAPAction=["urn:anonRobustOpResponse"] or SOAPAction=["urn:anonNoOpResponse"]. IN AS 7.1.1 these actions were accepted. However in AS 7.2/EAP 6.1 they are not being accepted, with the following exception:
11:01:06,039 WARNING [org.apache.cxf.phase.PhaseInterceptorChain] (http-/0.0.0.0:8082-1) Interceptor for { http://registration.webservices.com/ http://registration.webservices.com/}RegistrationWebService
Service#{ http://registration.webservices.com/ http://registration.webservices.com/}InviteSupplier has thrown exception, unwinding now: org.apache.cxf.interceptor.Fault: The given SOAPAction urn:anonRobustOpResponse does not match an operation.
at org.apache.cxf.binding.soap.interceptor.SoapActionInInterceptor$SoapActionInAttemptTwoInterceptor.handleMessage(SoapActionInInterceptor.java:188)
at org.apache.cxf.binding.soap.interceptor.SoapActionInInterceptor$SoapActionInAttemptTwoInterceptor.handleMessage(SoapActionInInterceptor.java:162)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262) [cxf-api-2.6.6-redhat-3.jar:2.6.6-redhat-3]
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) [cxf-api-2.6.6-redhat-3.jar:2.6.6-redhat-3]
at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:237)
at org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:95)
at org.jboss.wsf.stack.cxf.transport.ServletHelper.callRequestHandler(ServletHelper.java:156)
at org.jboss.wsf.stack.cxf.CXFServletExt.invoke(CXFServletExt.java:87)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:225)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:145)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-1.jar:1.0.2.Final-redhat-1]
at org.jboss.wsf.stack.cxf.CXFServletExt.service(CXFServletExt.java:135)
at org.jboss.wsf.spi.deployment.WSFServlet.service(WSFServlet.java:140) [jbossws-spi-2.1.2.Final-redhat-1.jar:2.1.2.Final-redhat-1]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-1.jar:1.0.2.Final-redhat-1]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_09]
The client is using axis2 for their runtime. Any thoughts on how to allow CXF/JBoss WS to accept this action?
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/821998#821998]
Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 10 months