Mapping Form Field Values to Workflow Process Variables
Mapping Form Field Values
In our March 2nd blog we used the workflow process to route a form for data entry. Let’s revisit that “TestFormDef” workflow definition and look at mapping a form field value to a workflow process variable.
Next, let’s define another workflow process string variable called “lastName”. Select the “start” step and click in the “Variables” link at the bottom of its properties pane. Type “lastName” in the Add Variable field, select “String” for Type, and click the Add button.
Click the Save button to save and close Variables page.
Click on the new “getformfieldvalues” step and configure the following properties:
Enter “variable.formID1” for the Variable that holds the form instance ID. In the Select form definition dropdown, select the form definition used in the instantiateform step. Now click the Mapping of fields to variables button:
Select “txtLastName” in the Form Field dropdown and enter “lastName” in the Variable Name field. Click the Save button on the popup and click the Save button in the step properties pane. When the Workflow Instance executes, the value in the “txtLastName” form field will be written to the process variable “lastName”. Let’s save the Definition and re-execute the Workflow Instance.
The rendered view of the task containing the form is shown above. For this example we will select Joe Simpson from the Name Lookup and then complete the task.
You may also be interested in reading more on the subject of Configuring a Custom Workflow Step.
A small sampling of the Workflow Technology for BPM Solutions contained within our cDevWorkflow product offering can be found here: Workflow Technology That Works.