3 Replies Latest reply on Feb 9, 2015 1:00 PM by swiderski.maciej

    Integrating custom webapp with jbpm-console

    vinniman

      Hello guys!

       

      I have a webapp based on Spring. I have a separate module with process definitions and kbase configuration in spring xml config file (there is no kmodule.xml). This module is included as a dependency to my webapp and everything works as a charm.

      But now I want to integrate my webapp with jbpm-console (they both work with same JTA datasource), and use the console to manipulate with processes I have in the webapp.

      And I dont know how to achieve that. My app and jbpm-console are deployed separately on JBoss AS7.

      I found that to achieve that, my webapp should be deployed via jbpm-cosole. But it doesn't want to deploy, because it has no kmodule.xml and is not recognized as a kjar.

      May be I broke some naming conventions (spring config file name) of something?

       

      I need your advice. JBPM version is 6.1.0.Final.

       

      Thank you,

      Vlad

        • 1. Re: Integrating custom webapp with jbpm-console
          salaboy21

          Hi there,

          what are you trying to achieve? what kind of integration?

          You shouldn't deploy a webapp via the console-ng.

          Deploying both apps in the same wildly should do the work. You need to make sure that both apps uses the same database and you will be able to see the same data in both.

           

          Regards

          • 2. Re: Integrating custom webapp with jbpm-console
            vinniman

            Thank you for quick responce, Mauricio!

             

            I want processes from my webapp to be displayed in "Process Management" tab in jbpm-console, and to be able to start those processes from the jbpm-console.

            My app stores only logging info to database. And I don't see any effect when deploying both apps on same server with same datasource. Jbpm-console shows nothing.

            May be i forgot to perform some configuration in my webapp to fully enable persistence?

            Here is the config part from my spring config file:

             

            <kie:kmodule id="kmodule">

                        <kie:kbase name="kbase" packages="bpmn" default="true">

                            <kie:ksession name="ksession" type="stateful" default="true">

                                <kie:processEventListener ref="kieDbLogger" />

                                <kie:configuration>

                                    <kie:jpa-persistence>

                                        <kie:transaction-manager ref="transactionManager"/>

                                        <kie:entity-manager-factory ref="kieEntityManagerFactory"/>

                                    </kie:jpa-persistence>

                                </kie:configuration>

                                <kie:workItemHandlers>

                                    <kie:workItemHandler name="GateEventAction" type="eterra.ca.market.gate.gateeventactions.handler.GateEventActionHandler" />

                                    <kie:workItemHandler name="SkipGateEventAction" type="eterra.ca.market.gate.gateeventactions.handler.SkipGateEventAction" />

                                </kie:workItemHandlers>

                            </kie:ksession>

                        </kie:kbase>

                    </kie:kmodule>

             

             

                    <bean id="kiePostProcessor" class="org.kie.spring.KModuleBeanFactoryPostProcessor" />

             

             

                    <bean id="kieDbLogger" class="org.jbpm.process.audit.JPAWorkingMemoryDbLogger">

                    </bean>

            • 3. Re: Integrating custom webapp with jbpm-console
              swiderski.maciej

              to be able to achieve that integration you need to package all your processes into kjar that can then be deployed to jbpm console and used within your application. The main requirement is that jbpm must be aware of the processes it can operate on. From version 6.2 that's easily achievable thanks to jbpm services that you can read up here. At the end of that article you will find a link to a complete application written with spring that does integrate with jbpm console.

               

              HTH