Hi,

I'm new to JBoss and jBPM, so I apologize if my question is improperly phrased. 
I'm attempting to get a new process working using the 3.1.3 starter kit, the 
Eclipse graphical process designer and the supplied webapp. I am attempting to 
use a custom TaskControllerHandler implementation to handle form input, but 
have had little success. My intuition is that I should create a custom xhtml 
file to use with the task that uses the task variables, and supply the link to 
it in the forms.xml file. However, no matter what I do, the webapp loads an 
empty form on the start state. I'd appreciate any help you can give.

 Here are what I think are the relevant code snippets:

ProcessDefinition.xml:

  | ...
  |       <task name="Input Top-level task" swimlane="initiator">
  |          <controller 
class="<package_name_concealed.ProcessCreatorTaskControllerHandler" 
config-type="bean"></controller>
  |       </task>
  | ...
  | 

ProcessCreatorTaskControllerHandler.java:

  | ...
  | public class ProcessCreatorTaskControllerHandler implements 
TaskControllerHandler 
  | {
  |     private static final long serialVersionUID = -8342109418315801711L;
  |     
  |     public void initializeTaskVariables(TaskInstance taskInstance, 
ContextInstance contextInstance, Token token)
  |     {
  |             taskInstance.addVariableInstance(
  |                     VariableInstance.create(token, "processName", ""));
  |     }
  |     
  |     public void submitTaskVariables(TaskInstance taskInstance, 
ContextInstance contextInstance, Token token)
  |     {
  |                           ...
  |     }
  | }
  | 

forms.xml:

  | <?xml version="1.0" encoding="UTF-8"?>
  | 
  | <forms>
  |   <form task="Input Top-level task" form="ProcessInput.xhtml"/>
  |   <form task="Input Task Info" form="InputTask.xhtml"/>
  | </forms>
  | 

ProcessInput.xhtml

  | ...
  |   <!-- TASKFORM ROWS -->
  |   <tr>
  |     <td>processName</td>
  |     <td>
  |       <input jsfc="h:input" value="#{taskBean.variables['processName']} />
  |     </td>
  |   </tr>
  | ...
  | 

Here is the HTML from the webapp, missing any reference to processName:

  | ...
  |   <h2>Input Top-level task</h2>
  | 
  |   <hr />
  | 
  |   
  | <table>
  | <tbody id="taskform:_id2:tbody_element"></tbody></table>
  | 
  | 
  |   <hr />
  | 
  |   
  |     
  |     
  |       <input id="taskform:transitionButton" 
name="taskform:transitionButton" type="submit" value="Save and Close Task" 
onclick="clear_taskform();"/> 
  |     
  |   
  | 
  |   <hr />
  |   
  |   <input id="taskform:_id9" name="taskform:_id9" type="submit" value="Save" 
onclick="clear_taskform();"/> 
  |   <input id="taskform:_id10" name="taskform:_id10" type="submit" 
value="Cancel" onclick="clear_taskform();"/>   
  | ...
  | 




View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4004679#4004679

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4004679
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to