Friday, January 20, 2012

jBPM Form Builder roadmap

Greetings from Argentina. This post will try to cover a general view of where the form builder is right now and where it is going to be in the near future. You can get a current status view from the video below:



On this video you can see a great deal of how the form builder works today. It doesn't cover the jBPM console integration part or the automatic form generation option, but it allows you to see how users will experience working with the form builder. To download the project, you can find it in the following locations

Nightly builds
In the next few days, I'll start keeping a stable release on this other address as well:
Feel free to download, comment or join. That pretty much covers where the form builder is right now. As to where it is heading, here's an initial roadmap

jBPM Form Builder Roadmap


  1. Adding HTML5 templates: Current items work with pure GWT and HTML4 for Freemarker. The idea is to build a new renderer that will allow users to export to Freemarker as well, but allowing them to export using HTML5 instead of HTML4 to create the forms. The idea as well is to create as many menu options to properly cover HTML5 capabilities, such as audio and video tags, menus, fieldsets and so on.
  2. Adding new validations: Current validations cover basic concepts, like number or email validation. The idea is to expand and improve validation definitions, in order to allow both client side and server side validation to any level of complexity. Among new validations that are thought to be added, there will be regular expression validation, multi-field validations (applied directly to the form), and rules-based validation (in order to define a ruleflow-group specially to validate the correctness of input data)
  3. Adding script helpers to add dynamic ui components on client side: Script helpers are shown in the video above. They allow a user with very little knowledge of javascript to create scripting solutions for UI component's event handling. The idea is to create a new script helper to allow javascript to add a new visual component on a particular layout and layout position when an event happens.
  4. Cleaning up effects and form items library: Current implementations of form items (the UI components you drop on your form) and form effects (the actions available when you right click on a form item) are done in a way that could be made configurable with a proper refactor. The whole idea is to make it more easily extensible, minimizing the amount of code to be added to create a right click action for UI components, or a UI component itself.
  5. Adding tests for effects and form items library: Along with the previous item, some refactoring will be made to allow a better separation of display logic from actions logic, in order to create better test prepareness on the code side. Along with that, proper tests will be implemented for the form items and effects library.
  6. Adding server validation to the generated form's API: Extension of the form utility API used from jBPM console, to handle validations on server side. 
  7. Adding server interpretation of complex objects to the generated form's API: Currently, all form submit responses are treated like a map of simple data. The idea is to create complex object associations to particular paths in the form definition, in order to create the proper objects on submit time. This will benefit both user task definitions and rule-based form validations.
  8. Adding template management for complex objects for the generated form's inputs: The previous item covers submit to server rendering of request data, from simple data types to complex data types. This item covers the other way around, for when a user task is given a complex type and needs to decompose it to make it available for form input data. It will allow the user to define paths within an object when defining form inputs.
  9. Improvement of properties edition panel to add better coverage of properties for form items: This comes in hand with item 4. Once a proper management of form item properties is done, there will be a need for a better way of editing such properties.
  10. Improvement on tree and edition panel visualization: Bug fixing and visual highlighting in the current form are two of the main things to be tackled by this bullet.
  11. Allow switching layouts once they're filled without losing content: Currently, once you define a layout and start adding content to it, the only way to change layouts is to create a new one and move all the content manually. This item is thought to be able to do that automatically.
  12. Adding script helpers to allow onEvent simple validations on client side: Along with validation library expansion and server validation API, this item is thought to allow some validations to happen on the client side, to be handled on particular events (i.e. like on the change of value of an input field)
  13. Pagination items: Create UI components that would allow to create very large forms within several pages, all part of the same form.
  14. Definition of a standard page layout for a given user or role: Most companies have a template structure for most of their forms (wether it has a logo on a particular place, a standard stylesheet, etc). The idea is to allow designers to define such page layout and force its use to either some people or a group of people within the company.
  15. Definition of standard UI visualization strategies for particular types of data: This is to aid the automatic form generation. The idea is to allow users to define, for example, the standard way to create visual content for Strings, Integers, Booleans and so on. It should cover complex data types as well.
  16. New translators and renderers for JSF, XUL, Android, IPhone and Swing: Among other technologies, this would be a nice subset to cover. The order of the technologies and the omission of any don't express any priority whatsoever.
  17. Adding effects to allow loading contents from an ajax script or from an array variable: This way, content from a form could be loaded from an external source from the client side.
  18. Importing of inputs from other external sources: Right now the only way to import inputs on the IO Data tab is to have them defined inside a BPMN2 process. The idea is to be able to take them from a server invocation, a user file, or any other way. This will also allow to define forms for other platforms different than the BPM engine.

Cheers,
Mariano

35 comments:

  1. Looking good Mariano :)

    I did notice when you'd added the example form to your library and added it back some of the attributes were missing - the image had reverted to its default size and the containing table lacked border-width... just a small observation.

    It'd be good to show how the form can be used in a process at some date too - for example when running a process one of the designed forms is used.

    ReplyDelete
  2. I'm working on fixing those issues with the saved menu option right now.
    I honestly wanted to show the jBPM console as well, but the video was going to be rather long. I thought it would be better to make it a part 2 kind of thing :D

    ReplyDelete
  3. Hey,
    I don't know how to integrate you code into guvnor. Is there an install/help file? I haven't worked with pom's so far...if that is required...?

    PS: I've been waiting since august 2011 for a release on form builder.

    Thanks,

    ReplyDelete
    Replies
    1. For the moment, the only way early adopters have of getting the integrated guvnor is downloading the source code and running this line:

      "mvn clean install -DskipTests=true -PfullProfile"

      Afterwards, follow these steps:

      1- Go to jbpm-installer in the jbpm source and run "ant install.demo"
      2- Copy the file at guvnor-distribution-wars/target/guvnor-{VERSION}-jboss-as-7.0.war in the guvnor source to the jbpm-installer/lib folder in the jbpm source
      3- Go to jbpm-installer and run "ant install.demo" again. This time it won't download anything and should be a lot faster

      Hope this helps. Cheers!
      Mariano

      Delete
    2. Thanks a lot Marian, both for your reply, and also for your work.
      I'll give it a try, and let you know if it worked.

      Delete
    3. Try to run "ant install.demo". I got the following error

      BUILD FAILED
      /opt/development/formbuilder/jbpm/jbpm-installer/build.xml:345: The following error occurred while executing this line:
      /opt/development/formbuilder/jbpm/jbpm-installer/build.xml:352: Error while expanding /opt/development/formbuilder/jbpm/jbpm-installer/lib/jbpm-5.3.0-SNAPSHOT-gwt-console.zip
      java.io.IOException: Negative seek offset

      Any idea?

      Delete
    4. I had the same error a couple of times. It happens when for some reason the file jbpm-5.3.0-SNAPSHOT-gwt-console.zip doesn't finish downloading correctly, and when trying to unzip it, it is corrupted.
      The best way for now to correct this is deleting the file from the jbpm-installer/lib folder and running "ant install.demo" again

      Delete
    5. Thanks , Mariano.

      Tried multiple time , getting the same error. I copied console.zip from previous install and solved "seek offset" problem. When I ran "ant start.demo", formbuilder.war not deployed , got the following from "jbpm-form-builder.war.failed"

      {"Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"Services with missing/unavailable dependencies" => ["jboss.web.deployment.default-host./jbpm-form-builder.realm missing [ jboss.security.security-domain.jbpm-form-builder ]"]}}}

      Delete
    6. I made a few modifications to standalone.xml that had forgot to include to the installer. They're uploaded now, please rebase and run "ant install.demo" again. When the form builder asks you for a user, use user "admin" and password "admin"

      Delete
    7. Thanks, Mariano,

      already I updated standalone and added users.properties and roles.properties to the config folder. Trying now. will let you know.

      Delete
    8. sorry, but i am really a nook on this...where from can i download sources? i have downloaded the distribution, and it contains a "sources" folder with jars...if this is it, where should i copy these files before running maven ?

      Delete
    9. guys, a little help, please
      i can't know anything, but i know for sure that this is a marvelous development

      Delete
    10. ok, so, after successfully compiling the guvnor sources from "https://github.com/marianbuenosayres/guvnor", i went to the next steps, as written above....and found out that there is no "jbpm-installer" folder....
      ...

      Delete
    11. the jbpm-installer folder is in https://github.com/marianbuenosayres/jbpm

      I don't check this comments too often. I'm at IRC in irc.codehaus.org, channel #drools, #droolsdev, #jbpm and #guvnor most of the time. My nick there is "mariano", maybe we could chat there?

      Delete
  4. @Marian: Use -Dfull instead of -PfullProfile (the latter will deactivate default profiles that need to be active for a proper build)

    ReplyDelete
  5. ok - so...as i'm not an expert...which option works ?

    ReplyDelete
    Replies
    1. Use "mvn clean install -DskipTests=true -Dfull"

      Delete
    2. Thanks Mariano,

      Finally, I am able to run forms builder integrated with Guvnor. added user and roles properties to the config folder , didn't work. then added to form-builder/web-inf/classes/ folder. after that it worked. I going try what you showed on the video.

      Delete
    3. Hello Mariano,

      I am having issue with opening process definition from guvnor. imported the process definition from eclipse to guvnor and can see the process from assets, but when click on assest, it opens blank space.
      I use the guvnor from source target after ran script "mvn clean install -DskipTests=true -Dfull" . Is any configuration, I need change to see the process definition in guvnor.

      Delete
    4. Mariano,

      I got form builder and brms integrated. but am not able to see the bpmn process task variable from the builer i/o data search page. Is any config need to changed to see the process task variable on the i/o data tab.

      Please advise me on this

      Delete
  6. hi,

    I downloaded "marianbuenosayres2-jbpm-4415d1d" and tried:
    "mvn clean install -DskipTests=true -Dfull"

    But it didnt work for me. Can someone help me? Mariano, any idea?
    See the log below:
    http://pastebin.com/DCqKYdXX

    Best regards!

    ReplyDelete
    Replies
    1. mjat, I'm not sure why that happened. As far as I know, you can access other instances of your same class' private fields. Can you tell me what JVM are you using to compile it?

      Delete
    2. hi,

      mvn --version
      Apache Maven 3.0.3 (r1075438; 2011-02-28 18:31:09+0100)
      Maven home: C:\SERVER_ADDS\apache-maven-3.0.3
      Java version: 1.7.0_02, vendor: Oracle Corporation
      Java home: C:\Program Files\Java\jdk1.7.0_02\jre

      Thanks for help in advance...

      Delete
    3. When trying to build just "jbpm-gwt-form-builder", i'm getting some errors like following:

      [ERROR] Failed to execute goal on project jbpm-gwt-form-builder: Could not resolve dependencies for project org.jbpm:jbp
      m-gwt-form-builder:war:5.2.0.Final: The following artifacts could not be resolved: org.jbpm:jbpm-gwt-form-api:jar:5.2.0.
      Final, org.jbpm:jbpm-gwt-form-exporter-freemarker:jar:5.2.0.Final, org.jbpm:jbpm-gwt-form-exporter-gwt:jar:5.2.0.Final:
      Could not find artifact org.jbpm:jbpm-gwt-form-api:jar:5.2.0.Final in jboss-public-repository-group (http://repository.j
      boss.org/nexus/content/groups/public/) -> [Help 1]


      seems like there are some dependencies missing?
      best regards

      Delete
    4. The dependencies are the rest of the projects in the jbpm-gwt folder. Perhaps building from there? I'll download JVM 1.7.0_02 and check if I get the same error as you. Meanwhile, if you get the same error, check installing jdk1.6.0 to compile it for the moment.

      Delete
    5. when trying to build from "jbpm-gwt", I´m getting same errors as here (http://pastebin.com/DCqKYdXX)

      know i tried to compile it using jdk1.6.0_30 but it didn´t work.

      I´m getting desperate :/

      Delete
    6. finally it`s working for me. I had to take maven version 3.0.4... i was not aware of an update and as it was able to compile the guvnor package with the old verison, i thought thats no problem at all.

      Marian, thanks for help!

      Delete
  7. hey, its me again ,)

    now i´m facing another problem. First I had the seek offset issue. After taking the last #1240 build from hudson, the issue disapeared.

    Now im getting this errors:

    [get] Error opening connection java.io.FileNotFoundException: http://repos
    itory-plugtree-org.forge.cloudbees.com/snapshot/org/jbpm/jbpm-gwt-form-builder/5
    .2.0.Final/jbpm-gwt-form-builder-5.2.0.Final.war
    [get] Can't get http://repository-plugtree-org.forge.cloudbees.com/snapsho
    t/org/jbpm/jbpm-gwt-form-builder/5.2.0.Final/jbpm-gwt-form-builder-5.2.0.Final.w
    ar to C:\SERVER_ADDS\marianbuenosayres2-jbpm-2921796\jbpm-installer\lib\jbpm-for
    m-builder.war

    BUILD FAILED
    C:\SERVER_ADDS\marianbuenosayres2-jbpm-2921796\jbpm-installer\build.xml:309: Can
    't get http://repository-plugtree-org.forge.cloudbees.com/snapshot/org/jbpm/jbpm
    -gwt-form-builder/5.2.0.Final/jbpm-gwt-form-builder-5.2.0.Final.war to C:\SERVER
    _ADDS\marianbuenosayres2-jbpm-2921796\jbpm-installer\lib\jbpm-form-builder.war


    :/

    ReplyDelete
    Replies
    1. Yeah I know. Sorry for that one, had to take the files away from there because that server has severe limitations on download capacity :S What you have to do is take the compiled version from jbpm-gwt/jbpm-gwt-form-builder/target/jbpm-form-builder.war and paste it on the jbpm-installer/lib folder with the name jbpm-form-builder.war
      Once it is merged on the main branch, that won't be necessary, since we will update the URL to point to nexus. Until then, I hope this works as a workaround

      Delete
    2. Hi,

      THANKS for help! After I copied/downloaded some .wars and .zips,renamed them, installation worked.

      With Chrome I´m getting this when logging in to /jbpm-form-builder/:
      "ERROR: Possible problem with your *.gwt.xml module file.
      The compile time user.agent value (gecko1_8) does not match the runtime user.agent value (safari). Expect more errors."

      No components are visible...but with Firefox, everything is good!

      Last thing I would like to know is, how to integrate Form Builder into Guvnor? Right now, when clicking in the "Knowledge Bases" menu on "Create new", nothing regarding "Create new Form" appears.
      Any idea on this?

      Best regards

      Delete
    3. found out that changing

      to

      in
      jbpm-form-builder.war\WEB-INF\classes\org\jbpm\formbuilder\FormBuilder.gwt.xml makes it work in both Chrome and Firefox without the error I posted above

      Delete
    4. something went wrong :>

      change:
      "set-property name="user.agent" value="gecko1_8"/"
      to
      "set-property name="user.agent" value="gecko1_8,safari"/"
      ...

      Delete
    5. Thanks! Will add these on a future push

      Delete
  8. Hello Marian,
    How are you doing?

    I was wondering if we are going to see form builder integrated in guvnor - do you think that this will be possible on the following releases?

    ReplyDelete
  9. I am also looking forward to the form builder integrated in guvnor. Also a User form for process configuration in jBPM.

    ReplyDelete