[jBPM] - Re: JBPM 3.2.5, MSSQL 2005 - blocking in JBPM_JOB table
by Alejandro Guizar
Alejandro Guizar [http://community.jboss.org/people/alex.guizar%40jboss.com] created the discussion
"Re: JBPM 3.2.5,MSSQL 2005 - blocking in JBPM_JOB table"
To view the discussion, visit: http://community.jboss.org/message/563437#563437
--------------------------------------------------------------
> Looking at how the jbpm_job table is utilized, yes, I think these specific indexes can be removed. Just to clarify. From what I have seen in *our use-case*, under normal circumstances the jbpm_job table has very few entries at any point in time. Seems like entries are added and removed constantly. That being the case, I'm not sure I can see a benefit of spending the extra time/resources maintaining indexes which are never utilized.
I'm going to explore the possibility of removing the job indexes. Can you please https://jira.jboss.org/browse/JBPM create a JIRA issue for this?
> By the way, this is as good a time to explain the use-case that is failing for us. We have a workflow with three steps synchronous steps. The first step takes a couple to a few hundred milliseconds to complete, the second step can take anywhere from 5 to 30 seconds to complete and then the last step usually takes a half a second. When I mentioned jobs earlier, I was referring to workflows contained the three steps just mentioned.
If possible, could you attach your workflow and test harness to the JIRA issue? Please remove any sensitive information you would not like to see published.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/563437#563437]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years
[jBPM] - jBPM5 Console Integration with Tomcat6
by bpmn2 user
bpmn2user [http://community.jboss.org/people/bpmn2user] created the discussion
"jBPM5 Console Integration with Tomcat6"
To view the discussion, visit: http://community.jboss.org/message/578103#578103
--------------------------------------------------------------
Here are the required steps to get the jBPM5 console running in Tomcat6
1.) Copy the console war files provided in JBPM_INSTALLER/lib into Tomcat’s webapps directory
These war files can also be downloaded from ( http://sourceforge.net/projects/jbpm/files/jBPM%205/jbpm-5.0-CR1/jbpm-5.0... http://sourceforge.net/projects/jbpm/files/jBPM%205/jbpm-5.0-CR1/jbpm-5.0...). This download has two war files jbpm-gwt-console-5.0-CR1.war and jbpm-gwt-console-server-5.0-CR1.war. Rename them to jbpm-console.war and gwt-console-server.war and copy them to TOMCAT_HOME/webapps
2.) Create users and roles in TOMCAT_HOME/conf/tomcat-users.xml.
Here is an example
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
<role rolename="tomcat"/>
<role rolename="role1"/>
<role rolename="manager"/>
<role rolename="admin"/>
<role rolename="user"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="role1" password="tomcat" roles="role1"/>
<user username="manager" password="manager" roles="manager"/>
<user username="krisv" password="krisv" roles="manager,admin,user"/>
<user username="john" password="john" roles="manager,admin,user"/>
<user username="mary" password="mary" roles="manager,admin,user"/>
</tomcat-users>
3.) Set the jbpm.console.directory in Catalina.bat (.sh)
Here is an example.
.. -Djbpm.console.directory=C:/jbpm5/CR1/jbpm-installer/sample/evaluation/src/main/resources ..
4.) Copy JBPM_INSTALLER\jboss-4.2.3.GA server\default\data\birt into TOMCAT_HOME\birt. This will provide the reporting functionality
5.) Copy the database driver (e.g., h2.jar) and all the dependant jar files into TOMCAT_HOME/lib.
Here are the required libraries:
jbpm-persistence-jpa-5.0-CR1.jar
h2-1.2.124.jar
persistence-api-1.0.jar
geronimo-jta_1.0.1B_spec-1.0.1.jar
javassist-3.4.GA.jar
hibernate-entitymanager-3.4.0.GA.jar
hibernate-core-3.3.0.SP1.jar
hibernate-commons-annotations-3.1.0.GA.jar
hibernate-annotations-3.4.0.GA.jar
ejb3-persistence-1.0.2.GA.jar
dom4j-1.6.1.jar
commons-collections-3.1.jar
antlr-2.7.6.jar
6.) Start database:
e.g, run ‘ant h2.start’ from JBPM_INSTALLER directory
7.) Start human task, e.g., run ‘ant start.human.task’ from JBPM_INSTALLER directory
This assumes that a datasource JNDI (jdbc/testDS1) is configured in Tomcat and a transaction manager (such as Bitronix or JOTM or Atomikos etc) is configured on Tomcat.
Refer to http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html for JNDI configuration on Tomcat6.
Login to console http://localhost:8080/jbpm-console http://localhost:8080/jbpm-console (krisv/krisv)
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/578103#578103]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years
[EJB3] - How to reconcile CMPC and SMPC?
by Bojan Dolinar
Bojan Dolinar [http://community.jboss.org/people/bodzolca] created the discussion
"How to reconcile CMPC and SMPC?"
To view the discussion, visit: http://community.jboss.org/message/611536#611536
--------------------------------------------------------------
When using EJB and Seam, it's probably inevitable to end up with lots of EJBs that are components at the same time, some with container-managed persistent context, some with SMPC. Because it was easier to do (mostly since it precludes any kind of LazyInitializationException) our codebase ended up with lots of EJBs/components with SMPC, even the ones that are part of the data engine and are not always part of the JSF lifecycle (triggered jobs, WS, other services, etc.). The absence of this lifecycle is probably the reason for some strange behaviour since it's not clear what the session is scoped to. For example, sometimes the actionqueue just doesn't get cleaned up after commit, so performance of a job degrades quickly (every flush "flushes" every preceding change), not to mention the memory leak. Migration from Seam 2.0.1 to 2.2.1 was the start of a whole new problem: org.hibernate.StaleStateException because optimistic locking failed. Looks like actionqueue again is keeping some stale objects and decides to commit them, quite sporadically, for all I could find out.
I guess that in the absence of conversation the session doesn't get closed. The situation is alleviated by superseding SMPC with @PersistenceContext. But due to convoluted and numerous execution paths, I'm not allowed to even dream that I'm aware of all the side effects. LIE is just on the top of the list, because all the entities loaded by PC are detached sooner or later.
All this leads to two questions. First, what would be the best way to handle this situation? Is mocking the approapriate JSF life cycle phases safe? Is it possible to scope SMPC to transaction programmatically?
Second, what is the best way to handle this situation from the scratch, when you have that luxury? I didn't find anything addressing this exact problem and I'm sure I'm not the only one experiencing it. My personal approach would be to keep the seam layer as thin as possible. When I was not restricted by legacy code, it worked quite well, although I had to think carefully about LIE all over again. However, every book I've read so far advocates the exact opposite approach. Their samples are usually pure web applications, but I was more than welcome to the real world.
Any thoughts or pointers to further reading on this would be appreciated.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/611536#611536]
Start a new discussion in EJB3 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years
[jBPM] - Re: Persisting Human Task, letting user to complete after server restart.
by Mauricio Salatino
Mauricio Salatino [http://community.jboss.org/people/salaboy21] created the discussion
"Re: Persisting Human Task, letting user to complete after server restart."
To view the discussion, visit: http://community.jboss.org/message/601635#601635
--------------------------------------------------------------
Hi Adam,
I think that you are mixing a lot of concepts here. Don't get me wrong, it usually happens. The concept of save point also includes Human Tasks. Human interactions are considered as long living activities. For that reason the engine need to wait until the task is completed. As you mention all this waiting happens in a database, so you don't need to be worried about the application is running or not. Obviously the task server needs to be up when the user cames back and want's to interact, but it doesn't mean that needs to be up all time. Right now in jBPM5, we keep two different things persisted.
1) A knowledge runtime snapshot (SessionInfo in the database)
2) The status of each particular task inside the task server.
The task server is configured to use persistence by default, but as far as I remember, it's configured to use an in memory database. You should go and change that to a real database like MySQL/Postgres.
For having persistence of your processes status, that you will need if you are using human tasks interactions you need to use JPAKnowledgeService helpers to keep your sessions persisted in a database.
Greetings.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/601635#601635]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years