[jboss-user] [JBoss jBPM] - upload file in a task ?

secmask do-not-reply at jboss.com
Wed Jun 11 00:11:43 EDT 2008


hi all !
i have trouble when try to modify jbpm-console and task form define.
at first, i want to upload a file at a task and it' will show at the next task, i've searched this forum and many many in the google but not found any solution that can use.

all of my work as follow:
1- modify task.xhtml of jbpm-console, add attribute 'enctype="multipart/form-data".
2- in task form, add a file filed input as :


  | <jbpm:datacell>
  | 	<f:facet name="header">
  | 		<h:outputText value="File:"/>
  | 	</f:facet>
  | 	<gd:inputFile target="#{stream}" maxSize="104857600"/>
  |   </jbpm:datacell>
  |   <jbpm:datacell>
  |     <f:facet name="header">
  |       <h:outputText value="Actions:"/>
  |     </f:facet>
  |   <tf:saveButton value="Save">
  |   </tf:saveButton>
  |     <h:commandButton value="upload">
  |     	<j4j:doUploadFile archive="#{stream}" target="link" />
  |     	<n:nav outcome="success" redirect="true" storeMessages="true"/>
  |     	<n:nav outcome="error" redirect="true" storeMessages="true"/>
  |     </h:commandButton>
  |     </jbpm:datacell>
  | 

<j4j:doUploadFile archive="#{stream}" target="link" /> is my custom tag, it's similar to <j4j:deployProcess>

the problem that when i use "Save" button, it's only save other user input to process variables, upload file action listener is not called. Use "upload" button will only upload the file (it's good) but it does not save process variables. I want it do both of work (save process variables and upload the file) but don't know how to do it. i've try


  |    <tf:saveButton value="Save">
  |       <j4j:doUploadFile archive="#{stream}" target="link" />
  |     	<n:nav outcome="success" redirect="true" storeMessages="true"/>
  |     	<n:nav outcome="error" redirect="true" storeMessages="true"/>
  |   </tf:saveButton>
  | 

but is raise an exception (UITaskFormButtonBase:getEnclosingForm() catch NULL).

please help me ! any suggest.
thank very much.

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

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4157208



More information about the jboss-user mailing list