[jboss-user] [jBPM] New message: "Re: Accessing process variables in task form"

Raji n do-not-reply at jboss.com
Thu Feb 4 03:44:40 EST 2010


User development,

A new message was posted in the thread "Accessing process variables in task form":

http://community.jboss.org/message/524086#524086

Author  : Raji n
Profile : http://community.jboss.org/people/raji_126

Message:
--------------------------------------------------------------
Apologies for not providing the code details. Here is the code snippet...
 
I don't see any errors printed in the console or log files..When i view the source of the task form displayed in the console, the table cell comes up as an empty cell.
 
*Process Defintion - Loan Approval*
 
<process-definition  xmlns="urn:jbpm.org:jpdl-3.2"  name="loanapproval">
 
<start-state name="Start">
 <transition to="Document Verification"></transition>
 </start-state>
 
 <process-state name="Document Verification">
 <sub-process name="document_verification"  binding="late"/>
 <variable access="read,write" name="loanApplication" mapped-name="loanApplication"></variable>
 <transition to="Underwriting"></transition>
 </process-state>
...................
.................
<end-state name="End"></end-state>
 
<event type="process-start">
 <action class="sample.test.InitializationActionHandler" name="InitializationActionHandler"></action>
 </event>
 
</process-definition>
 
 
 
 
*Process Defintion - Subprocess*
<process-definition  xmlns="urn:jbpm.org:jpdl-3.2"  name="document_verification">
<swimlane name="loan-executive">
 <assignment actor-id="manager"></assignment>
 </swimlane>
 
<swimlane name="loan-officer">
 <assignment actor-id="user"></assignment>
 </swimlane>
 
 <start-state name="start">
 <transition to="Verify Application"></transition>
 </start-state>
 
<task-node name="Verify Application Details">
 <task name="Verify Loan Details" duedate="5 business days" swimlane="loan-executive,loan-officer">
 <controller>
 <variable access="read,write" name="loanApproval" mapped-name="loanApproval"></variable>
 <variable access="read,write,required" name="docVerificationRemarks" mapped-name="docVerificationRemarks"></variable>
 </controller>
 </task>
 <transition name="Approved" to="Perform Risk Analysis &amp; Pricing"></transition>
 <transition to="Update Status - Doc Incomplete" name="Documents Incomplete"></transition>
 </task-node>
 
..........
...........
.............
</process-definition>
 
 
*Value Objects*
public class LoanApplication implements Serializable {
     private String applicationId;
     private ArrayList<Borrower> borrowerList;   //borrower and co-borrower info
 
     // getter and setter methods
}
 
public class Borrower implements Serializable {
     private String firstName;
     private String lastName;
     private ArrayList<Employment>;  //history of present and past employment
 
     //getter and setter methods
     .........
}
 
 
When the main process is started, I am calling "InitializationActionHandler" to set the loanApplication object as a process variable.
The loanApplication object contains borrower information.
 
In the task form attached to the "Verify Loan Details" screen, I want to display the application details like borrower name, mortgage value etc.
I used the following syntax, 
  <h:outputText value="#{var['loanApplication.applicationID']}"/>
<h:outputText value="#{var['loanApplication. borrowerList[0].firstName']}"/>
 
but nothing gets printed.  But i can see the data being populated in the process variable through the InitializationHandler.
So looks like either the variable is not getting passed to the task form or i am using wrong syntax.

--------------------------------------------------------------

To reply to this message visit the message page: http://community.jboss.org/message/524086#524086




More information about the jboss-user mailing list