3 Replies Latest reply on Aug 8, 2012 12:44 PM by cdsosi

    Process deployment questions


      Hi community,


      I have several questions on process deployment in jBPM 5.


      What are the different options for deploying a process for using it with JAS 7 within jBPM console for instance?

      1- First option is drools-guvnor obsvously

      2- This also can be done manualkly as Tihomir told me in a previous post (https://community.jboss.org/message/751628#751628) :


      "You don't really need guvnor for deployment. You could create the .pkg yourself using drools-ant tasks and push it to your own servers for example and let the client applications consume it. You could also if you are using the jBPM Console place your process definitions and artifacts like process image, task forms, dependency jars (such as service node impls for example) on the console classpath and it will be able to see them"


      Is there any documentation on that 2nd solution or fas or anything else. I really want to understand how things are working and I must say that it is not the case

      Where do you put the pkg once made? Actually I can find where the pkg files are located on server side.


      3- I have install 5.3.0 Full package demo one more time and put some bpmn2 processes in ...\jbpm-installer\sample\evaluation\src\main\resources

      I thought I would have to put them in drools-guvnor and then build binary package so that to make them available in jBPM console but I did not and open the jBPM console directly and all my processes were available, is there anything parameterized in the demo so that jBPM console automatically scans ...\jbpm-installer\sample\evaluation\src\main\resources directory? I can't see anything specifying that?

      In post https://community.jboss.org/thread/159592 Kris told that the installer simply uses the folder where the example process is located:


      Is it hard coded or is there a parameter telling that?


      The jbpm.console.directory is empty in ...\jbpm-installer\jboss-as-7.0.2.Final\standalone\deployments\jbpm-gwt-console-server\WEB-INF\classes\jbpm.console.properties from the jbpm-gwt-console-server.war... Can anyone explain that to me ?


      4- Another question dealing with deployment : If I want to create a new Service Task with custom code Java Code with Domain Specific Service Task running on server, how do i make it available for process runtime engine. Do I need to make a jar and then what is the location to drop it so that it can be used at runtime?

      Many exemples provided in user documentation seems to be eclipse oriented, I need to make things working remotly and I can find my way through documentation.

      a- in file drools.session.conf from jbpm-gwt-console-server.war you specify which conf file to use (e.g. drools.workItemHandlers = CustomWorkItemHandlers.conf), correct?

      b- in file CustomWorkItemHandlers.conf from jbpm-gwt-console-server.war you specify which class to instanciate (e.g. "Log": new org.jbpm.process.instance.impl.demo.SystemOutWorkItemHandler()), correct?

         => this class is located in ...\jbpm-installer\jboss-as-7.0.2.Final\standalone\deployments\jbpm-gwt-console-server\WEB-INF\lib\jbpm-flow-5.3.0.Final.jar

      Do I need to put the jar in the jbpm-installer\jboss-as-7.0.2.Final\standalone\deployments\jbpm-gwt-console-server\WEB-INF\lib directory and then re-package it as a war (jbpm-gwt-console-server.war). Is this the case JAS needs to be re-started ? Or is there another place for JAS so that modifications can be updated without needind JAS restart? => jbpm-installer\jboss-as-7.0.2.Final\standalone\lib ?

      Is there a step by step documentation /post / article describing how I can make a personal Service Task running on server side.


      I must say that this makes a huge amount of questions but any help would be appreciated !!


      Kind Regards



        • 1. Re: Process deployment questions

          Hi Franck,


          Maybe I know about the question number 3.


          the directory \jbpm-installer\sample\evaluation\src\main\resources is passed as an argument for jbpm console when we do the "ant start.jboss"


          you can open the build.xml and look for  <target name="start.jboss7"


          you will get these lines:

          <target name="start.jboss7" depends="check.jboss.version" if="jboss.version.is.7">

              <property name="jboss.full.path.win" location="${jboss.home}/bin/standalone.bat" />

              <exec executable="${jboss.full.path.win}" spawn="yes"


                <env key="JAVA_OPTS" value="-XX:MaxPermSize=256m -Xms256m -Xmx512m" />

                <arg value="-b" />

                <arg value="${jboss.bind.address}" />

                <arg value="-Djbpm.console.directory=${install.home}/sample/evaluation/src/main/resources" />

                <arg value="-Dreporting.needcontext=true" />



          so the ant start.jboss will run start.jboss7 where it execute JBOSS AS 7's standalone.bat and pass this parameter to the standalone.bat



          that is why your jbpm console have all the bpmn process located in ${install.home}/sample/evaluation/src/main/resources directory.



          Thomas Setiabudi

          • 2. Re: Process deployment questions

            Thanks Thomas for replying to 3-,


            I have not thought having a look at this ant script although I launch it a lot of times these past few days !!!


            So ok for question 3- although it brings to me another question by the way : so the jBPM console can retrieve process definitions from jbpm.console.directory parameter but also from packages deployed through drools-guvnor for instance (in jBPM console one can see REST request made for querying : http://localhost:8080/gwt-console-server/rs/process/definitions). If there are two possible locations, what about some eventual process definition conflicts? What is the best practice for process definitions storing?


            Is it possible to have more explanations on possible process definitions location retrieval from jBPM console?





            • 3. Re: Process deployment questions

              Ok let me write some hints for question 4- as I found them on searching through the user forum and so on...

              I follow thread https://community.jboss.org/people/bpmn2user/blog/2011/03/30/jbpm5-example--human-task-forms-with-variables--workitems and get some useful information in it.

              So to summarize :

              4a => yes but it is no use modifying this file since you need to define your custom WorkItemHandler class in file CustomWorkItemHandlers.conf (modification needed only if you want to change the filename...)

              4b => yes, you have to make a mapping between WorkItem Definition Name and which WorkItemHandler class is needed to be instantiated at runtime. The name should a valid WorkItem Definition Name deployed. I use drools-guvnor for defining my CustomWorkItem as stated in 5.3.0 User documentation (http://vimeo.com/26126678 skip to 2')


              Other questions :

              - Is is possible to use an exploded war within JAS 7 ? This question will have interest regarding the next questions coming next !

              - If I have some stable process definitions and I want to only make some code modifications in my WorkItemHandler class, is it possible to update dynamically without need of JAS 7 restarting ? Before answering, let's assume say that there is no process instance running (using or not the Custom Workitem).

              - Same question with process instances running and using the Custom Workitem?