bpm Posts

Reusing Your Workflow and Assets on Red Hat Process Automation Manager

Sometimes you want to reuse the assets which you are already creating, and “import” it on multiple other projects. We can use that on RHPAM (or its opensource version, which is jBPM) because the output of it is actually a kjar (knowledge jar) file, which is just a jar library where you can import it by using a simple maven.

For this example im creating two different project, Project 01 and Project 02. Where Project 01 have a workflow that will import a Decision Table which is created on Project 02. It is basically a simple calculator to measure how wealthy someone is, based on one’s salary.

Lets start with Project02 first, and as always we start with a simple Java bean

And a Decision Table,

We will use that decision table in a very simple workflow,

Next is the unique part, where we need to create a KIE base for Project02

And a KIE session,

“Default” option should be un-check for KIE bases and KIE session on Project02.

The last step for Project02 is to build, and install it.


Next is how to import Project02 into Project01. First thing that we need to do is to import Project02 on Project01’s dependency.

Create a workflow, and put a “Reusable Sub-Process” referring to our Project02 workflow.

And finally, create a KIE base for Project01

and a KIE session,

Make sure you check “Default” option for KIE bases and KIE session on Project01.

Build, Install and Deploy Project01 to KIE server, and we can test by using a simple CURL REST API command or by using Postman

For complete code, can be accessed here.

https://github.com/edwin/Project01

https://github.com/edwin/Project02
Google+

Downloading Red Hat Process Automation Manager Workflow Project to Your Local or to Github

Basically it is quite simple, you can see “Settings” tab on your project page,

There’s a url field there, and we can do a git clone to that corresponding url.

After cloned, we can push to github. This is the example git repository,

https://github.com/edwin/rhpam-hello-world-example
Google+