Create a Flow within a Flow
In this example you copy the Transfer Batch flow and modify it to include a predefined report flow pattern you created earlier. The predefined flow you add submits a report to check for any batch line errors during the Transfer Batch process.
If the transfer fails, you can skip the transfer process or mark it as complete, and then view the report for error details.
Create the Parent Flow Pattern
-
In the Payroll Checklist work area, select the Manage Payroll Flow Patterns task.
-
Search for and select the row for Transfer Batch, and then click Copy.
-
Enter the name of the new flow pattern, such as Transfer Batch with Error Report.
-
Enter a description, such as "Transfer a batch and view any batch line errors that occurred." and then click Save and Close.
-
Search for and select the Transfer Batch with Error Report flow pattern, and then click Edit.
-
Here's the list of tasks to add the parameter that derives batch name from the batch ID.
-
On the Parameters tab, click Add.
-
Select the added row and click Edit.
-
Add these values.
Field
Value
Flow Parameter
Batch Name
Use for Searches
No
Display
No
Display Format
Text
Sequence
3
Usage
Input parameter
Parameter Basis
Post SQL Bind
Basis Value
select batch_name from pay_batch_headers where batch_id = :BATCH
-
-
Click Save.
Add the Report to the Parent Flow
-
On the Tasks tab, click Select and Add.
-
In the Search window, search for and select Submit Another Flow, and then click Done.
-
In the row for Submit Another Flow, click Edit on the menu bar and set these values to define the task you have added to generate the batch lines error report.
Field
Value
Task
Run Batch Lines Report
Activity
Statutory
Task Group
Reporting
Description
Submit the batch lines error report for the specified batch.
-
Edit task parameters as follows:
-
In the row for Run Batch Lines Report, click Edit Task.
-
Configure these predefined task parameters. Select a parameter and the corresponding parameter basis and basis value.
Parameter
Parameter Basis
Basis Value
Flow Name
Constant Bind
The name of the flow, for example Batch Lines Report. This value is case-sensitive. Enter the name exactly.
From Flow Instance ID
Context Binding
Payroll flow
From Flow Task Instance ID
Context Binding
Payroll task
Use to Calculate Results
Constant Bind
Y
Parameter Name 1
Constant Bind
Batch Name
Parameter Value 1
Bind To Flow
Batch Name
-
Click Next, and optionally complete the owner and checklist information.
-
Click Next, and optionally complete the duration and notification information.
-
Click Submit.
-
-
Perform these steps to edit the task sequence:
-
On the Task Sequence tab, edit these two rows to enter the flow tasks and sequence in the flow.
Start Flow
Following Task
Transfer Batch
Run Batch Lines Report
Run Batch Lines Report
End Flow
-
Click Submit.
-
Test the Flow
-
Create and save a test batch that should cause an error.
Alternatively, you can search for an existing batch that was transferred with errors using this SQL query:select * from pay_batch_headers where batch_status = 'E';
-
On the Submit a Process or Report page, select a legislative data group.
-
Select the Transfer Batch with Error Report task, and then click Next.
-
Enter a unique name for the current flow instance.
-
Enter the name of the batch with errors that you saved or queried, and then click Submit.
-
Click OK and View Checklist, and then click the Refresh icon until the Transfer Batch task shows as in progress with error.
-
View the report in the flow as follows:
-
Select the row with the Transfer Batch task, and then select Skip Task in the Actions menu.
-
In the row for Run Batch Lines Report, click Go to Task.
-
In the Processes and Results section, click the name of the report.
-
In the row for Run BI Publisher Report, click Go to Task.
-
On the Process and Reports tab, click View Results.
-
Click the PDF file name to open the report.
-