If you are playing with jbpm_cosole like I am then the of of the first question will be – how can I attach my own form template (ftl).
Why I did not use guvnor? The reasone was that it did not work on my environment – Mac Os X and I also tried on Centos 6.x. I was getting all the time I started Jboss server to log:
14:08:30,328 INFO [org.drools.repository.RulesRepositoryConfigurator] (http-localhost-127.0.0.1-8080-12) Creating an instance of the RulesRepositoryConfigurator.
14:08:33,202 INFO [stdout] (http-localhost-127.0.0.1-8080-12) =============== session-admin-4
14:08:33,826 ERROR [org.jbpm.integration.console.shared.GuvnorConnectionUtils] (http-localhost-127.0.0.1-8080-8) Error retriving packages from guvnor: Invalid argument
So I discovered where jbpm_console looking for form templates and the place was – WEB-INF/lib/ on the deployed jbpm-gwt-console-server.war
* I created form template for my task – DemoHumanTask.ftl (DemoHumanTask – taskname in bpmn), process start form template – com.sample.demo.bpmn.ftl (com.sample.demo.bpmn is process id)
* make jar :
margusja@IRack:~/Downloads/jbpm-installer/jboss-as-7.1.1.Final/standalone/dev_war/dev_jar/margusja$ jar cvf MargusjademoProcess.jar .
added manifest
adding: com.sample.demo.bpmn.ftl(in = 317) (out= 212)(deflated 33%)
adding: DemoHumanTask.ftl(in = 1418) (out= 487)(deflated 65%)
* go back to the place where did you unpack your jbpm-gwt-console-server.war and copy created jar file to the right place:
cp ./dev_jar/margusja/MargusjademoProcess.jar ./WEB-INF/lib/
* update jbpm-gwt-console-server.war file
margusja@IRack:~/Downloads/jbpm-installer/jboss-as-7.1.1.Final/standalone/dev_war$ jar uvf jbpm-gwt-console-server.war WEB-INF/lib/MargusjademoProcess.jar
adding: WEB-INF/lib/MargusjademoProcess.jar(in = 7722) (out= 7396)(deflated 4%)
* copy updated war file to the jboss deployments directory
* restart jboss server (they say that jboss should handle on the fly new deployed wars but in my case I got errors)
* after restart I managed to see new forms generated from my form templates:
2 Comments