Reusable subprocess to call workflows from other project

265 views
Skip to first unread message

Anton Reema Joselin

unread,
Sep 11, 2019, 12:14:06 AM9/11/19
to jBPM Usage
Hi All,


I have a requirement to call different processes in my workflow which may reside in different projects, Currently I'm able to call workflows only within the same project using Reusable SubProcess. Inorder to make it work with different projects what configuration should I make?

I'm using 7.23.0.Final version kindly let me know if the above requirement is possible or not.



Thanks & Regards,
Anton Reema.

Abhijit Humbe

unread,
Sep 11, 2019, 12:32:37 AM9/11/19
to Anton Reema Joselin, jBPM Usage
1. Create Reusable Project, which will include Reusable sub process.Make sure that the kbase and ksession configured for this project will not be default.
=============kmodule.xml=============
<kmodule xmlns="http://jboss.org/kie/6.0.0/kmodule"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">;
<kbase name="kbase" default="false" eventProcessingMode="stream" equalsBehavior="identity" packages="*">
<ksession name="ksession" type="stateful" default="false" clockType="realtime"/>
</kbase>
</kmodule>
=======================================
2. Create Parent Project, which will include Parent process, make sure that the kbase and ksession configured for this project will be default.

=============kmodule.xml=============
<kmodule xmlns="http://jboss.org/kie/6.0.0/kmodule"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">;
<kbase name="kbase-top" default="true" eventProcessingMode="stream" equalsBehavior="identity" packages="*" includes="kbase">
<ksession name="ksession-top" type="stateful" default="true" clockType="realtime"/>
</kbase>
</kmodule>
======================================
3. Edit pom.xml of this Parent project and add dependency of the ReUsable project.
4. Alter kmodule.xml of Parent project so it includes the knowledge base of the ReUsable project - please notice the keyword "includes" in the  above kmodule.xml

Hope this helps..
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jbpm-usage/5ebe5d97-d7b1-4599-9df0-4bbbd6d3ec15%40googlegroups.com.

Ioanna Mpilili

unread,
May 17, 2022, 10:18:14 AM5/17/22
to jBPM Usage
Hi, 
I want to do the same thing, call different processes in my workflow which may reside in different project by using the reusable subprocess. I work with jbpm-server-7.64.0.Final and I use business Central. 

I have 2 projects, project A - which contains a workflow which is the subprocess and project B which is the caller and contains a workflow with a reusable process which has as called element the subprocess of project A. The projects are in the same space. Project B (the caller) has as dependency project A (the subprocess). In order to do this I go to project B settings -> dependencies -> add from Repository -> I select the latest jar of project A. 

The problem is that when I run project B, when the subprocess is called I receive an error saying " Could not commit session: org.jbpm.workflow.instance.WorkflowRuntimeException: [ParentProcess.ParentProcessExample:373 - Sub-process:2] -- Could not find process Subprocesses.testSubProcess".

I tried to make new kie bases as it is advised in the previous response and add kbase and kbase-top and the correspondent ksessions. But when I add a kiebase at a project it has to be default, the UI of Business Central doesn't allow me to uncheck the "default" circle. Then, when I deploy the project with the new kiebase/kiesession, I cannot find the workflows at the process definitions list in Business Central. So, I cannot start a new instance.

I really haven't understand why we need new kie-bases since all the assets are in the default kie base and projectB has as dependency projectA. Am I doing something wrong and cannot find the process definitions when I create new kiebases? 

I would really appreciate your help!

Thank you in advance,
Bilili Ioanna
Reply all
Reply to author
Forward
0 new messages