6 Replies Latest reply on Mar 6, 2013 2:59 PM by Mauricio Salatino

    Deployment of bpmn and related artifacts WITHOUT guvnor -- is it possible?

    Yarr P. Newbie

      I want to create an ant task that will take the bpmn and related artifacts from an eclipse jbpm project and deploy it directly to JBOSS without using Guvnor.  Is this possible?  If so, can you point me to an example or tell me how to do it? 

       

      Thanks

        • 1. Re: Deployment of bpmn and related artifacts WITHOUT guvnor -- is it possible?
          Yarr P. Newbie

          So far the only thing that I've been able to get to work is putting the bpmn file into the "jbpm.console.directory".  However, I can't get it to recognize my ftl or png files from this directory.  I've tried putting them at various spots (including inside the jbpm-gtw-console-server war) and so far have had no luck. For all the good documentation JBoss has, the deployment docs are severly lacking. And guvnor has been unreliable and problematic- I want to avoid that component all together.

           

          I was able to get my user service deployed by editing the jbpm-gwt-console-server\WEB-INF\classes\META-INF\CustomWorkItemHandlers.conf file and add the class files to a jar in the jbpm-gwt-console-server\WEB-INF\lib directory, and then restart the JBoss server.  Is there no way to dynamically deploy these so it doesn't require a server restart, or a hack to the war file?

          • 2. Re: Deployment of bpmn and related artifacts WITHOUT guvnor -- is it possible?
            Maciej Swiderski Master

            by default jbpm-console fetches assets from guvnor but that is not the only way that can be used. From version 5.4 there are possibilities to define custom managers for building KnowledgeBase and KnowledgeSession. Take a look at documentation that can be found here. By implementing custom KnowledgeBaseManager class you can build the KnowledgeBase in whatever you like way, meaning get assets from any place you like. Then you need to enable it when starting JBoss and that should be all.

             

            HTH

            • 3. Re: Deployment of bpmn and related artifacts WITHOUT guvnor -- is it possible?
              Yarr P. Newbie

              Thanks, that looks interesting.  The default Evaluation workflow uses it's image & ftl files from a jar file rather than from guvnor- there must already be something configured that allows this to happen?

               

              Also, Is there a way to turn on debug/trace logging for the gwt-console-server app?  I don't see much in the logs except a stack trace here or there and I can't really tell what's going on.

              • 4. Re: Deployment of bpmn and related artifacts WITHOUT guvnor -- is it possible?
                Yarr P. Newbie

                For anyone else in the same boat- it turns out the default knowledge builders already account for this (hence how the Evaluation demo is able to work). The png file needs to be {process.id}.png instead of {process.id}-image.png.

                 

                So, to depoy a bpmn process without using Guvnor from Eclipse:

                 

                -Put the bpmn file into the "jbpm.console.directory", which by default with the demo is ${install.home}/sample/evaluation/src/main/resources

                -Create a PNG using the 'export png' option from the eclipse plugin, and name it {process.id}.png - i.e. com.sample.bpmn.hello.png

                -Create FTL files by hand or by using the "generate jBPM forms" option within eclipse

                -Put the PNG and FTL files inside the classes folder of the gwt console server (i.e. jboss-as-7.1.1.Final\standalone\deployments\jbpm-gwt-console-server.war\WEB-INF\classes\ ) - although anywhere on the gwt-console-server classpath should work

                 

                -Restart jboss and you are good to go.

                 

                For how extremely simple this process is, it sure took a long time to muddle through and figure out how to do it.

                • 5. Re: Deployment of bpmn and related artifacts WITHOUT guvnor -- is it possible?
                  Yarr P. Newbie

                  So, I have a follow up question:  For standalone workflow deployments, do people normally use jbpm-gwt-console-server?  Or is it more common to create one's own application around the jbpm libraries? Is there anything in the user guide or a forum discussion somewhere that talks about pros/cons of these two approaches?

                  • 6. Re: Deployment of bpmn and related artifacts WITHOUT guvnor -- is it possible?
                    Mauricio Salatino Master

                    It sounds like you already answered your own question. jBPM can be embeded in your application or you can create your own application that wrap JBPM for your business. In such cases you will not need to use the jbpm-gwt-console-server. The Pros and the Cons are the same for any other component that you want to reuse or re write, you gain more flexibility to use your own technology stack to expose the services and you will be able to add all the configuration options that you need for your architecture if you write your own. If you decide to reuse the gwt-console-server you get a lot already done but you will need to learn how to use it and how it was designed.

                     

                    Cheers