I had seen that issue before. Actually the problem is that I haven't deployed the examples because I am using tomcat and not jboss(and I couldn't configure the jbpm examples to run on tomcat). I just ran the junit test cases in eclipse.
I have built a simple process and I want to manage the states/variables associated with the process instance through a web interface (the web project is to be deployed on tomcat and not jboss).
The task form example shows how to access the process variables in the ftl file and how to associate an ftl file with a task. But I need to know how to use this ftl file (associated with a task) to render on the UI when the process is executing that task.
That is in the jbpm4 console source (the form plugin interface and the form plugin)
Thanks kukeltje for pointing that out. I tried implementing it but I am getting the error "Task form resource 'task1.ftl' does not exists. The ftl file (task1.ftl) is in the same package as process definition file.
I tried importing the file in 2 different ways :
- <task g="338,58,177,52" name="...." swimlane="..." form="task1.ftl"> ...
- <task g="338,58,177,52" name="...." swimlane="..." form="com/test/jbpm/process/task1.ftl"> ...
but I am getting the same error in both the cases.
I believe that the process definition and the content of the ftl file are stored in the jbpm4_lob table (at the time of the deployment of the process) in the form of a blob. But in my case only the process definition is getting stored in the jbpm4_lob table.
Do you have any idea on what could be the reason behind the form resource file not getting loaded?
I figured out the reason why the ftl file was not getting loaded.
I was under the impression that RepositoryService would load the task form resources on its own when it encounters them in the process definition. But the fact is that every resource has to be explicitly loaded using the NewDeployment#addResourceFromClassPath() method.
My mistake. Sorry for that question.