[jBPM] - jBPM5 - Can't Scale, Won't Scale
by M Arnold
M Arnold [https://community.jboss.org/people/m_arnold123] created the discussion
"jBPM5 - Can't Scale, Won't Scale"
To view the discussion, visit: https://community.jboss.org/message/771731#771731
--------------------------------------------------------------
Hi,
I'm having great trouble designing an application which uses jBPM5 in a scalable way. It seems to be impossible on a practical level. I hope that this is just due to my misunderstandings of the way the jBPM5 works.
I have listed each of my assumptions, and the ramifications of each below. I hope that someone from the community will be able to point out where these assumptions are incorrect.
I would particularly appreciate it if anyone has managed to scale jBPM5, and could described how they achieved it.
1. Everytime jBPM5 executes a process the database transaction updates the process instance info AND the session info, therefore:
1a. it's not scalable to use a single session to execute all processes, or you would suffer contention on the session info.
1b, it's not scalable to use a single session to execute all processes in a cluster, or the updated session info would have to be continually synchronised across the cluster.
2. When using BPMN2 events, jBPM5 only allows you to send events to the process instances within a single session at a time. You need to maintain a list of all the sessions which have incompleted process instances(*), and loop through them all to send events. Therefore:
2a. you should execute all processes in as few sessions as possible, to lessen the number of iterations through this loop.
3. jBPM5 persists BPMN2 timer info in the session info, but the session must be active (ie. loaded from persistence) in order for the timers to activate. Therefore:
3a. when your application starts, you must load all sessions that have active process instances that have timers(**).
3b. you must not have the same session active in two different nodes of a cluster, or the same timers will expire around the same time
3c. when a node crashes, your application must detect this and reload the sessions that were active in the crashed node
4. If you start a process instance in a session, that process instance must always be executed in that session.
4a. when a node wishes to resume a process instance that was persisted, it must first (due to 3b) ask all other nodes if they have the session active, and if so instruct them to dispose it. It can then load the session, load and resume the process. All while preventing race conditions.
4b. when a node receives an event it must (due to 2) carry out all the processing in 4a for each session with active process instances.
(*) I don't think it's possible to know if a session has incompleted process instances..?
(**) I don't think it's possible to know if a session and timers..?
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/771731#771731]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 1 month
[jBPM] - How to change the Port of JBPM5.3 Full Installer?
by Thomas Setiabudi
Thomas Setiabudi [https://community.jboss.org/people/thomas.setiabudi] created the discussion
"How to change the Port of JBPM5.3 Full Installer?"
To view the discussion, visit: https://community.jboss.org/message/763195#763195
--------------------------------------------------------------
Hi,
I Used JBPM5.3 Full Installer, it works well with the default configuration
My question is how do we change the default sample which works at localhost:8080 to some other port?
So far, I have changed:
1. {installerPath}\jboss-as-7.0.2.Final\standalone\configuration\standalone.xml
changing the port value in this part
<socket-binding-group name="standard-sockets" default-interface="public">
<socket-binding name="http" port="8082"/>
doing this, i can access the jbpm console but the console is unable to load any process from guvnor repository
2. {installerPath}\guvnor.preferences.properties
changed port 8080 to 8082
3. {installerPath}\jbpm.console.properties
changed port 8080 to 8082
4. {installerPath}\jboss-as-7.0.2.Final\standalone\deployments\drools-guvnor.war\WEB-INF\classes\preferences.properties
changed port 8080 to 8082
5. {installerPath}\jboss-as-7.0.2.Final\standalone\deployments\jbpm-gwt-console-server.war\WEB-INF\classes\guvnor.preferences.properties
changed port 8080 to 8082
6. {installerPath}\jboss-as-7.0.2.Final\standalone\deployments\jbpm-gwt-console-server.war\WEB-INF\classes\jbpm.console.properties
changed port 8080 to 8082
but still no success, now when i try to refresh the list of process definition in jbpm console I always get the resteasy error.
I suppose there should be some other files that need to be modified. Which files are those?
Any Help is appreciated.
Regards,
Thomas Setiabudi
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/763195#763195]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 2 months
[jBPM] - Prevent duplication in XOR gateway
by Erik Pragt
Erik Pragt [https://community.jboss.org/people/bodiam] created the discussion
"Prevent duplication in XOR gateway"
To view the discussion, visit: https://community.jboss.org/message/751003#751003
--------------------------------------------------------------
Hi all,
I'm just getting started with jBPM, and I have a small question about XOR gateways. At the moment, our nodes have two endpoints, and the code for one endpoint looks like this:
switch(result) {
case OK:
return true;
default:
return false;
}
While for the other endpoint (pointing to an 'end event'), it looks like this:
switch(result) {
case OK:
return false;
default:
return true;
}
So in the other constraint it's the other way around. To me, this looks like a bit of duplication, and in this example it's not too bad, but in more complex examples, it's trickier. So I was wondering, isn't there a better way to do this? Isn't it possible to create one piece of code, and let true go to one sequence flow, and false to the other, without having the need to duplicate the code? Is something like this possible??
Thanks for the help,
Kind regards,
Erik
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/751003#751003]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 2 months
[jBPM] - NodeInstanceLog and Human Tasks relationship
by Rahul Agrawal
Rahul Agrawal [https://community.jboss.org/people/rahulamt] created the discussion
"NodeInstanceLog and Human Tasks relationship"
To view the discussion, visit: https://community.jboss.org/message/766252#766252
--------------------------------------------------------------
How to get the data about who acted on a task using the NodeInstanceLog Table.
The NodeInstanceLog table will give the entries about a processInstance regarding the nodes that were entered and exited. If, in the process, there is a Human Task node and during the execution of the process the flow reaches at the human task node, an entry is creates in NodeInstanceLog table, task is created etc, then some user acts upon it and completes the task, again another entry is created in the NodeInstanceLog showing the exit information of the node.
But I am not able to find out who has acted upon the task. This information is present in the Task table but there is no relationship between this table and NodeInstanceLog.
How should I relate them?
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/766252#766252]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 2 months
[jBPM] - Connection TimeOut while getting assigned tasks
by Prashanth Karnam
Prashanth Karnam [https://community.jboss.org/people/pras_karnam] created the discussion
"Connection TimeOut while getting assigned tasks"
To view the discussion, visit: https://community.jboss.org/message/648811#648811
--------------------------------------------------------------
Hi All,
We are using the BlockingSummaryTaskHandler to get assigned tasks and we are getting the following timeout errors while fetching results.This is very critical , can anyone please help on this
48322772 26/01 08:27:43,710[http-8082-7] INFO emirates.sds.wf.exit - Exit [CTaskClient] CTaskClient method
Hibernate: select task0_.id as col_0_0_, task0_.processInstanceId as col_1_0_, names5_.text as col_2_0_, subjects3_.text as col_3_0_, descriptio4_.text as col_4_0_, task0_.status as col_5_0_, task0_.priority as col_6_0_, task0_.skipable as col_7_0_, task0_.actualOwner_id as col_8_0_, task0_.createdBy_id as col_9_0_, task0_.createdOn as col_10_0_, task0_.activationTime as col_11_0_, task0_.expirationTime as col_12_0_, task0_.processId as col_13_0_, task0_.processSessionId as col_14_0_ from Task task0_ left outer join OrganizationalEntity user1_ on task0_.createdBy_id=user1_.id left outer join OrganizationalEntity user2_ on task0_.actualOwner_id=user2_.id left outer join I18NText subjects3_ on task0_.id=subjects3_.Task_Subjects_Id left outer join I18NText descriptio4_ on task0_.id=descriptio4_.Task_Descriptions_Id left outer join I18NText names5_ on task0_.id=names5_.Task_Names_Id, OrganizationalEntity organizati6_ where organizati6_.id=? and (organizati6_.id in (select potentialo9_.entity_id from PeopleAssignments_PotOwners potentialo9_ where task0_.id=potentialo9_.task_id)) and (names5_.language=? or (select count(names10_.Task_Names_Id) from I18NText names10_ where task0_.id=names10_.Task_Names_Id)=0) and (subjects3_.language=? or (select count(subjects11_.Task_Subjects_Id) from I18NText subjects11_ where task0_.id=subjects11_.Task_Subjects_Id)=0) and (descriptio4_.language=? or (select count(descriptio12_.Task_Descriptions_Id) from I18NText descriptio12_ where task0_.id=descriptio12_.Task_Descriptions_Id)=0) and (task0_.expirationTime is null)
48332776 26/01 08:27:53,714[http-8082-7] ERROR emirates.sds.wf.error - [CWorkflowDesignerMBean] method : getAssignedTasks:*Timeout : unable to retrieve results trace : java.lang.RuntimeException: Timeout : unable to retrieve results*
1. *java.lang.RuntimeException: Timeout : unable to retrieve results*
at org.jbpm.task.service.responsehandlers.BlockingTaskSummaryResponseHandler.getResults(BlockingTaskSummaryResponseHandler.java:41)
at com.emirates.sds.workflow.mbean.CWorkflowDesignerMBean.getAssignedTasks(CWorkflowDesignerMBean.java:1592)
at com.emirates.sds.workflow.mbean.CWorkflowDesignerMBean.getTasks(CWorkflowDesignerMBean.java:2921)
at sun.reflect.GeneratedMethodAccessor112.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at javax.el.BeanELResolver.getValue(BeanELResolver.java:62)
at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54)
at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:71)
at org.apache.el.parser.AstValue.getValue(AstValue.java:118)
at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:190)
at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:178)
at javax.faces.component.UIData.getValue(UIData.java:554)
at org.ajax4jsf.component.UIDataAdaptorBase.getValue(UIDataAdaptorBase.java:1647)
at org.ajax4jsf.component.SequenceDataAdaptor.getDataModel(SequenceDataAdaptor.java:65)
at org.richfaces.component.UIExtendedDataTable.resetDataModel(UIExtendedDataTable.java:390)
at org.ajax4jsf.component.UIDataAdaptorBase.beforeRenderResponse(UIDataAdaptorBase.java:1656)
at org.richfaces.component.UIExtendedDataTable.beforeRenderResponse(UIExtendedDataTable.java:417)
at org.ajax4jsf.component.RenderPhaseUIDataAdaptorVisitor.beforeComponent(RenderPhaseUIDataAdaptorVisitor.java:44)
at org.richfaces.event.RenderPhaseComponentListener.processComponents(RenderPhaseComponentListener.java:47)
at org.richfaces.event.RenderPhaseComponentListener.processComponents(RenderPhaseComponentListener.java:55)
at org.richfaces.event.RenderPhaseComponentListener.processComponents(RenderPhaseComponentListener.java:55)
at org.richfaces.event.RenderPhaseComponentListener.processComponents(RenderPhaseComponentListener.java:55)
at org.richfaces.event.RenderPhaseComponentListener.beforePhase(RenderPhaseComponentListener.java:71)
at org.ajax4jsf.component.AjaxViewRoot.processPhaseListeners(AjaxViewRoot.java:188)
at org.ajax4jsf.component.AjaxViewRoot.encodeBegin(AjaxViewRoot.java:510)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1641)
at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:117)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:135)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:309)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)
at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:349)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
at java.lang.Thread.run(Thread.java:662)
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/648811#648811]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 2 months
[jBPM] - How to use a custom object as process variable
by Shamal Karunarathne
Shamal Karunarathne [https://community.jboss.org/people/shamalk] created the discussion
"How to use a custom object as process variable"
To view the discussion, visit: https://community.jboss.org/message/744959#744959
--------------------------------------------------------------
Hi,
I want to use me.bpm.test.Application as a variable for a process. I'm fully using the web based guvnor designer to design the process.
package me.bpm.test
public class Application
{
public String firstName;
public String lastName;
public Date dateOfBirth;
public String address;
public boolean isApproved = false;
public int getAge()
{
int age;
// some code to calculate age using dateOfBirth
return age;
}
}
1. How do I add this class to Guvnor and/or JBPM Console so that in the runtime console can use the class.
2. How do I define the Mapping (assignment, DataInputSet, DataOutputSet) from freeform templates (.flt) to the process level object? Can I use firstName_out->Application.firstName ?
Thanks in Advanced.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/744959#744959]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 2 months