2 Replies Latest reply on Apr 11, 2011 2:47 AM by juris.de

    jBPM 5 User Forms

    juris.de

      Hello!

       

      I am trying to understand the best possible method for working with User Forms in jBPM 5.

       

      1. What is the best way to edit user forms (*.ftl files) in a graphical environment (something like Intalio does)?

      I have managed to open them in Eclipse as html files. Are there better options?

       

      2. Is there an automatic (user-oriented) way of linking together user form fields with corresponding User Task variables?

      Currently it looks to me that all the variables' mappings with form fields (and variables in the ftl form) must be written manually in the code. Is it so or are there any better ways to automate it?

       

      3. How to open, edit and deploy user forms (*.ftl files) in the jBMP engine (on the server) in a user-friendly manner?

      So far I have discovered that in order to have your form running for the particular user task I need to do the following steps:

       

      1) create a process;

      2) create a user task, enter all necessary variables and parameters.

      3) enter TaskName parameter (the name of the form that must be opened; e.g. UserTask1)

      4) create HTML form with special syntax for dynamic contents and input fields so that they map to the task variables.

      5) Name the HTML form file: <TaskName value>.ftl (e.g. UserTask1.ftl)

      6) Add the form to

      ${install.home}/jboss-{version}.GA/server/default/jbpm-gwt-console-server.war -> /deploy/WEB-INF/lib/jbpm-gwt-form-5.1-SNAPSHOT.jar

      7) Make a PNG file of the diagram, name it <processName>.png and add it to

      ${install.home}/jboss-{version}.GA/server/default/jbpm-gwt-console-server.war -> /WEB-INF/lib/jbpm-gwt-graph-5.1-SNAPSHOT.jar

       

      3.1. Is the process correct (at least it works)?

      3.2. Am I right that by default no user form is created in the jBPM project in Eclipse when I create a User Task?

      3.3. Is there a solution, how to create a User Form automatically after a User Task is created?

      3.4. Is there a solution for deploying a user form automatically on the server?

      I think that the process is being installed automatically when I run the application in Eclipse but I have no idea regarding the forms.

       

       

      Thank you in advance and sorry if some of the questions have been raised before; still I have not been able to find the right answers so far.

      In case there are good resources describing these topics, I'll be happy to receive the links!!

        • 1. Re: jBPM 5 User Forms
          bpmn2user

          1. What is the best way to edit user forms (*.ftl files) in a graphical environment (something like Intalio does)?

          I have managed to open them in Eclipse as html files. Are there better options?

           

          You can use various editors including an Eclipse plug-in from FreeMarker (http://freemarker.sourceforge.net/editors.html)

           

          2. Is there an automatic (user-oriented) way of linking together user form fields with corresponding User Task variables?

          Currently it looks to me that all the variables' mappings with form fields (and variables in the ftl form) must be written manually in the code. Is it so or are there any better ways to automate it?

           

          It is true for now.

           

          6) Add the form to

          ${install.home}/jboss-{version}.GA/server/default/jbpm-gwt-console-server.war -> /deploy/WEB-INF/lib/jbpm-gwt-form-5.1-SNAPSHOT.jar

          7) Make a PNG file of the diagram, name it <processName>.png and add it to

          ${install.home}/jboss-{version}.GA/server/default/jbpm-gwt-console-server.war -> /WEB-INF/lib/jbpm-gwt-graph-5.1-SNAPSHOT.jar

           

          You basically need artifacts (ftl and png) in CLASSPATH of the jbpm-gwt-console-server. You can do the above or copy the files into CLASSPATH so that jbpm-gwt-console-server can load. For example you can keep the arfifacts into a jar file

          and copy the jar file into appserver's lib direcory (JBOSS_HOME\server\default\lib for JBOSS or TOMCAT_HOME\lib for TOMCAT)

           

          See the examples:

          http://community.jboss.org/people/bpmn2user/blog/2011/02/27/jbpm5-console--hello-process-example

          http://community.jboss.org/people/bpmn2user/blog/2011/02/21/jbpm5-example-for-forms-with-variables

           

           

          3.1. Is the process correct (at least it works)?

          Yes! It should work

          3.2. Am I right that by default no user form is created in the jBPM project in Eclipse when I create a User Task?

           

          That is true for now (if you are comparing with the feature of auto generating forms in Eclipse in jBPM3/jBPM4)

           

           

          3.4. Is there a solution for deploying a user form automatically on the server?

          You can use this approach http://people.redhat.com/kverlaen/jBPM5-guvnor-integration.swf

          1 of 1 people found this helpful
          • 2. jBPM 5 User Forms
            juris.de

            Thank you very much for the answer!!

             

            According to information in this discussion topic http://community.jboss.org/message/597650?tstart=0

            I have come across the Guvnor web editor (http://localhost:8080/designer/editor?profile=default&uuid=1234) for process design (which actually looks more powerfull than the Eclipse plugin).

             

            Maybe there is anything similar for forms design??! Have not found by myself yet.