Time for action – passing parameters to a task flow
Let us see how to
pass a parameter to createDepartmentFlow
from the createEmployeeFlow
bounded task flow:
Go inside
createDepartmentFlow
in theViewController
project ofEmpDirectoryApplication
.Click on the Overview tab and select the Parameters section from the left-hand side.
Click on the + icon to add a parameter in the Input Parameter Definitions section.
Provide the Name as
deptIdParam
and tab out of the Name column. The Value section will be auto populated with #{pageFlowScope. deptIdParam}.Provide
java.lang.String
in the Class column to define that the parameter that we are passing will be of aString
type.Select the Required option to make the parameter as the required value for the task flow. The task flow will expect the parameter to be populated or user to provide a value when the task flow is used as a region in a page fragment.
Now go back to
createEmployeeFlow
and select thecreateDepartmentFlow
task flow call.In the Parameter...