Red Hat JBoss BPM Suite -Reusing a BPM process as a subprocess inside another BPM process which is in a different repository

rpm-vs-yum

In this video, under 5 minutes, I am demonstrating how to use a process (process2) as a subprocess in another process (process1) which is actually in a separate repository (repo1). I placed the BPM Suite console and 2 folders (“.niogit” and “example”) so that you can get a clear picture of what is going on.

Steps for proj2 (the project that includes the sub-process “process2”)

1- Create repo2 (when you create a repository, related repository folder is created under “bin\.niogit”)

2- Create proj2

3- Create process2

4- Open Project Editor — Knowledge bases and sessions

5- Add “kiebase2-nondefault”, add all packages with * notation

6- Add “kiesession2-nondefault” (don’t check “default” checkbox and make it stateful)

7- Save

8- Build&Deploy — This will fail to deploy the project on Business-Central but it will still deploy it inside maven repository and create example.proj2:1.0.jar file so that it can be included as a dependency in proj1.

Check the Deployments section in Business-Central. You won’t see any deployments there. Go to “bin\repositories\kie\example\proj2\1.0” and you will see that the jar for this project has actually been deployed.

Steps for proj1 (the project that includes the parent process “process1” that uses process2 as a sub-process)

1- Create repo1

2- Create proj1

3- Create process1. Add “proj2.process2” as a subprocess (reusable)

4- Open Project Editor — Knowledge bases and sessions

5- Add kiebase1, set as default, add all packages with * notation. Include “kiebase2-nondefault”

6- Add kiesession1, set as default and select as stateful

7- Open “Dependencies”. Add “example.proj2:1.0”

8- Save

9- Build&Deploy

Note1: Steps may not be exactly in the same order as the video since I wrote them down later without checking the video.

Note2: I have not verbally annotated the video but tried to explain what I am doing, here in the description section, as textual annotation as much as possible.

Note3: At the end of the video (after deploying proj1), you will see that there are 2 process definitions with the same name under Process Management — Process Definitions. That is just a naming error. One of them is in fact process2 not process1 as displayed on the screen. I clearly confirm this by showing the output of the Red Hat JBoss BPM Suite console. It can be very briefly seen on 30th second that although ID of the process is “proj2.process2”, “Process Name” is displayed as “process1” and I have no idea why. Could be due to some errors/inconsistencies in the web interface.

The version of this Red Hat JBoss BPM Suite is 6.4.0.GA.

 

Hope this helps.
Good Luck,
Serdar