4 Replies Latest reply on Nov 25, 2014 4:27 PM by jbpm 6

    bpmn - error calling a process from another project

    jbpm 6 Newbie

      Hi,

       

      I have project A and B.

       

      From project A process, I want to call the project B process as a "Reusable Subprocess".

       

      When I ran the task, it said process B is not found. Is it not possible to call a sub process from another project?

        • 1. Re: bpmn - error calling a process from another project
          Maciej Swiderski Master

          to be able to use reusable process it must be in the same kbase so you need to either define that in same project or refer one project from another one as dependency then both project assets will be merged into same kbase.

           

          As an alternative way you can use REST work item to start second process via rest interface of kie-wd though it will not wait for the second process completion.

           

          HTH

          • 2. Re: bpmn - error calling a process from another project
            jbpm 6 Newbie

            Hi Maciej,

             

            Thanks for the response.

             

            I added testProcessB as a dependency to testProcessA. When I deployed testProcessA, I could see both ProcessA and ProcessB process definition showed up. but when I ran the test I was still getting the same error.

             

            Unexpected error encountered : [testProcessA.ProcessA:190 - Call Process B:2] -- Could not find process testProcessB.ProcessB

             

            processA.jpg

            testProcessA/pom.xml

            <?xml version="1.0" encoding="UTF-8"?>
            <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
              <modelVersion>4.0.0</modelVersion>
              <groupId>com.sample</groupId>
              <artifactId>testProcessA</artifactId>
              <version>1.0</version>
              <packaging>kjar</packaging>
              <name>testProcessA</name>
              <dependencies>
                <dependency>
                  <groupId>com.sample</groupId>
                  <artifactId>testProcessB</artifactId>
                  <version>1.0</version>
                </dependency>
              </dependencies>
              <repositories>
                <repository>
                  <id>guvnor-m2-repo</id>
                  <name>Guvnor M2 Repo</name>
                  <url>http://localhost:8080/jbpm-console/maven2/</url>
                </repository>
              </repositories>
              <build>
                <plugins>
                  <plugin>
                    <groupId>org.kie</groupId>
                    <artifactId>kie-maven-plugin</artifactId>
                    <version>6.1.0.Final</version>
                    <extensions>true</extensions>
                  </plugin>
                </plugins>
              </build>
            </project>
            
            • 3. Re: bpmn - error calling a process from another project
              Maciej Swiderski Master

              you might be missing kbase include on your kmodule.xml. Take a look at this article that might be helpful.

               

              HTH

              • 4. Re: bpmn - error calling a process from another project
                jbpm 6 Newbie

                Hi Maciej,

                 

                Following the instruction from the article work. Thanks very much.