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

  1. In the Payroll Checklist work area, select the Manage Payroll Flow Patterns task.

  2. Search for and select the row for Transfer Batch, and then click Copy.

  3. Enter the name of the new flow pattern, such as Transfer Batch with Error Report.

  4. Enter a description, such as "Transfer a batch and view any batch line errors that occurred." and then click Save and Close.

  5. Search for and select the Transfer Batch with Error Report flow pattern, and then click Edit.

  6. Here's the list of tasks to add the parameter that derives batch name from the batch ID.

    1. On the Parameters tab, click Add.

    2. Select the added row and click Edit.

    3. 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

  7. Click Save.

Add the Report to the Parent Flow

  1. On the Tasks tab, click Select and Add.

  2. In the Search window, search for and select Submit Another Flow, and then click Done.

  3. 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.

  4. Edit task parameters as follows:

    1. In the row for Run Batch Lines Report, click Edit Task.

    2. 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

    3. Click Next, and optionally complete the owner and checklist information.

    4. Click Next, and optionally complete the duration and notification information.

    5. Click Submit.

  5. Perform these steps to edit the task sequence:

    1. 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

    2. Click Submit.

Test the Flow

  1. 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';
  2. On the Submit a Process or Report page, select a legislative data group.

  3. Select the Transfer Batch with Error Report task, and then click Next.

  4. Enter a unique name for the current flow instance.

  5. Enter the name of the batch with errors that you saved or queried, and then click Submit.

  6. Click OK and View Checklist, and then click the Refresh icon until the Transfer Batch task shows as in progress with error.

  7. View the report in the flow as follows:

    1. Select the row with the Transfer Batch task, and then select Skip Task in the Actions menu.

    2. In the row for Run Batch Lines Report, click Go to Task.

    3. In the Processes and Results section, click the name of the report.

    4. In the row for Run BI Publisher Report, click Go to Task.

    5. On the Process and Reports tab, click View Results.

    6. Click the PDF file name to open the report.