[JBoss jBPM] - jBPM 4.0 instance creation results in single task
by holla2040
FYI, I've poked around for about 6 hours looking for an answer before posting.
----
I'm evaluating 4.0 for a handheld project where a user's current task list is downloaded for the day (ie. all their tasks are viewable). I've modified Jeff Yu's jpbm-helloworld process to include 5 tasks. It deploys and functions correctly, ie I can step through the tasks in the jbpm-console. The task tab only shows a single current task not the 5 from my process.
I further investigated the API and found these TaskQuery methods.
TaskQuery processDefinitionId(java.lang.String processDefinitionId) - only select tasks that are associated to the given process definition
TaskQuery processInstanceId(java.lang.String processInstanceId) - only select tasks that are associated to the given process instance
TaskService TaskQuery.list() execution returns a single task (the current task) for both TaskQuery configurations.
So I opened the jbpm database and saw that a single row exists in JBPM_TASK table (the current task). So it appears that startProcessInstance doesn't create all process tasks, the engine only creates one at a time.
So my question is, can I start process instances where all tasks are created (ie inserted into JBPM_TASK table)?
If not, can this be done in jBPM 3.x?
Thanks for your time,
Craig
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4245708#4245708
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4245708
16 years, 8 months
[JBoss jBPM] - Advices needed on process definitions deployment strategies
by RonanKER
Hello,
I'm facing a problem of process definitions deployment strategies in our production environment.
This environment is not accessible using an IDE or ant. The prod team is only awaiting for an ear and sql scripts.
I'm not sure it's possible to generate SQL scripts to deploy processes. So, I thought process definitions could deployed programmatically after the ear is deployed.
We already have some initialisation codes that could call all the .
deployment.deploy();
But...
I notice if we don't set the version of the process, it is re-deployed (and the version upgraded) each time our application is deployed even if the definition does not change. I don't think it's a good things to have bunch of deployment of the same process definition in our JBPM database.
So I tried to put a version number for each process (which seems a good thing to do btw). But in this case, jBPM4 throw an exception because the process is already deployed. And I did not find any API to check if a jpdl.xml file has already been deployed.
I could just catch and ignore the exception... But I would be pleased to have any advice on how do you have solved this problem.
I found a solution that seems a little tricky for me. But the idea seems good. => http://seamframework.org/Documentation/JBPMDeploymentInProductionEnvironm...
Thanks for any comment.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4245647#4245647
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4245647
16 years, 8 months