JBPM console – edit default form template (DefaultTask.ftl)

My first coal was create own form template to my process.

But I managed to change defaultTask template and demo process’ task (Performance Evaluation.ftl)  template.

Make backup from original jbpm-gwt-console-server.war – otherwise if you mess up your war file you have to install all the jboss server again.

* copy jbpm-gwt-console-server.war somewhere you can play with it. in my example iI put it /Users/margusja/Downloads/jbpm-installer/jboss-as-7.1.1.Final/standalone/dev_war

* unpack your war – jar xvf jbpm-gwt-console-server.war

* You will find WEB-INF/lib/jbpm-gwt-form-5.4.0.Final.jar

* copy it somewhere where you can play with it – in my case I created a new directory : dev_jar and copied it there

* cd into your new directory and unpack jar – jar xvf jbpm-gwt-form-5.4.0.Final.jar

* You will find form templates like DefaultTask.ftl, Performance Evaluation.ftl and com.sample.evaluation.ftl

* modify them like you wish fish – Do not change Form action

* pack the stuff again to the jar:

margusja@IRack:~/Downloads/jbpm-installer/jboss-as-7.1.1.Final/standalone/dev_war/dev_jar/dev_jbpm-gwt-form$ jar cvf jbpm-gwt-form-5.4.0.Final.jar .
added manifest
adding: classlist.mf(in = 282) (out= 101)(deflated 64%)
adding: com.sample.evaluation.ftl(in = 346) (out= 231)(deflated 33%)
adding: DefaultTask.ftl(in = 281) (out= 197)(deflated 29%)
adding: FormBuilder.properties(in = 61) (out= 54)(deflated 11%)
ignoring entry META-INF/
ignoring entry META-INF/MANIFEST.MF
adding: META-INF/maven/(in = 0) (out= 0)(stored 0%)
adding: META-INF/maven/org.jbpm/(in = 0) (out= 0)(stored 0%)
adding: META-INF/maven/org.jbpm/jbpm-gwt-form/(in = 0) (out= 0)(stored 0%)
adding: META-INF/maven/org.jbpm/jbpm-gwt-form/pom.properties(in = 112) (out= 108)(deflated 3%)
adding: META-INF/maven/org.jbpm/jbpm-gwt-form/pom.xml(in = 1319) (out= 422)(deflated 68%)
adding: META-INF/services/(in = 0) (out= 0)(stored 0%)
adding: META-INF/services/org.jboss.bpm.console.server.plugin.FormDispatcherPlugin(in = 58) (out= 56)(deflated 3%)
adding: org/(in = 0) (out= 0)(stored 0%)
adding: org/jbpm/(in = 0) (out= 0)(stored 0%)
adding: org/jbpm/integration/(in = 0) (out= 0)(stored 0%)
adding: org/jbpm/integration/console/(in = 0) (out= 0)(stored 0%)
adding: org/jbpm/integration/console/forms/(in = 0) (out= 0)(stored 0%)
adding: org/jbpm/integration/console/forms/AbstractFormDispatcher$1.class(in = 1700) (out= 782)(deflated 54%)
adding: org/jbpm/integration/console/forms/AbstractFormDispatcher.class(in = 6061) (out= 2703)(deflated 55%)
adding: org/jbpm/integration/console/forms/ConfigurationUtils.class(in = 3788) (out= 1906)(deflated 49%)
adding: org/jbpm/integration/console/forms/FormDispatcherComposite$1.class(in = 982) (out= 527)(deflated 46%)
adding: org/jbpm/integration/console/forms/FormDispatcherComposite.class(in = 2073) (out= 872)(deflated 57%)
adding: org/jbpm/integration/console/forms/ProcessFormDispatcher.class(in = 1250) (out= 584)(deflated 53%)
adding: org/jbpm/integration/console/forms/TaskFormDispatcher.class(in = 4070) (out= 2002)(deflated 50%)
adding: Performance Evaluation.ftl(in = 1461) (out= 500)(deflated 65%)

* go back where did you unpacked your war file

* copy new jar file to the right place – cp ./dev_jar/dev_jbpm-gwt-form/jbpm-gwt-form-5.4.0.Final.jar ./WEB-INF/lib/jbpm-gwt-form-5.4.0.Final.jar

* update your original war – jar uvf jbpm-gwt-console-server.war WEB-INF/lib/jbpm-gwt-form-5.4.0.Final.jar

* put a updated war to jboss deployments/ directory – cp jbpm-gwt-console-server.war ../deployments/

In my case I restarted jboss and after it started up I logged to jbpm_console: http://localhost:8080/jbpm-console/ and opened user task I saw that my changes I made are deployed :

Screen Shot 2013-02-10 at 3.20.21 PM Screen Shot 2013-02-10 at 3.20.37 PM

Leave a Reply