Update a process definition diagram in jBPM 7.7.0

395 views
Skip to first unread message

Chicois Maxime

unread,
Jun 5, 2018, 3:10:00 AM6/5/18
to jBPM Usage
Hello,

My question is about the workbench in jBPM 7.7.0, this is the first version of KIE I'm using.


I created a process and then saved the related process definition, then generating instances of it. Then, I struggled finding the correct way to update the process in a way it is reflected in the process definition generated. Here is all what I tried (with a combinaison of those things too) : 

The build is done without error and with the condition that I upgrade the version of the project in the settings, I won't have a pop-up saying the version is already taken. However, when I access the generated process definition, the diagram will always show the former business process, it will never be updated. Also, when I execute a business instance from it, it won't reflect the new Business Process.

Can you tell me where I did wrong, and how to properly update a process definition ? All the tutorials I found only showed how to create your first process definition and generate instances, not how to update it properly.

Thanks by advance,

Abhijit Humbe

unread,
Jun 5, 2018, 11:24:34 PM6/5/18
to Chicois Maxime, jBPM Usage
You have to deploy  latest version of project, I guess you are missing this step. If you want to upgrade process at runtime(without deploying new version) then you have to use processMigrationAPI's. I will recommend you to go through http://mswiderski.blogspot.com/2014/11/process-instance-migration-made-easy.html 

Abhijit Humbe

--
You received this message because you are subscribed to the Google Groups "jBPM Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jbpm-usage+unsubscribe@googlegroups.com.
To post to this group, send email to jbpm-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jbpm-usage/c49ca2ef-9732-4cf1-8cba-588ea3abc3b2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Chicois Maxime

unread,
Jun 7, 2018, 8:54:43 AM6/7/18
to jBPM Usage
Thanks for your response, I am currently reading this link. I understood however that I also should be able to generate instances of the updated process definition as long as I deploy my project with a new version ? I think that is exactly what I tried to do, and my problem is that all the process definitions generated (and their instances of course) keep a former version of the business process (which can be seen in the Diagram tab).

Here are the illustred steps I went through in order to update the project.

First I update my BPMN and modify its version. Note that the version was initially V1.0 and now is V1.1


Then I update the version of the project (here in V1.3), and then click on "Deploy". The build and the deploy are green and everything is working correctly.

Then I call programmatically the REST API to create an instance of the newly created process definition. The result would have been the same if generated from the jbpm-console : 

The URL called is http://localhost:8080/kie-server/services/rest/server/containers/project-name-jbpm_1.0.3/processes/src.ValidationCustomerProcess/instances/ where project-name-jbpm_1.0.3 is the name of the process definition and src.ValidationCustomerProcess is the name of the business process of the project.


We can see that the BPMN shown in the diagram tab of the process instance does not reflect the modifications occured in the version 1.3. All the instances have this diagram (and when it is executed, the modifications are really not taken into account) and it seems fair because it only copies the diagram of the diagram definition from it's generated. But how am I supposed to create a new process definition that owns the latest modification, which step did I miss ?


Or is it not possible from the jbpm-console to do it at all ? That would be a huge restraint imho.

 

Chicois Maxime

unread,
Jun 7, 2018, 9:29:10 AM6/7/18
to jBPM Usage
The first video of your link gave me the solution: what was missing in my process was that I did not update the ID of the BPM inside my project. After updating it, it worked well, thanks !

Maxime Chicois
Reply all
Reply to author
Forward
0 new messages