Designing a Screenflow

You design a screenflow in a manner similar to a process, by adding activities and defining their properties. There are no roles in a screenflow.

To design the Submit Report screenflow:

  1. Add an interactive component call (Interactive Component Call icon 
				) to the screenflow diagram, between the Begin and End activities. The Activity dialog box appears.
  2. In the Name field, enter Input Report, and click OK. The Input Report interactive component call activity is added to the diagram.
  3. Right-click on the Input Report activity icon and click Main Task The Main Task dialog box appears.
  4. In the Implementation Type drop-down list, select BPM Object Interactive Call.
  5. In the Select BPM Object Variable drop-down list, select reportSf.
  6. Select the Use BPM Object Presentation option, and select SubmitReport from the drop-down list.
  7. Select the Input option.
  8. You need to specify the output arguments, so click Argument Mappings. The Argument Mapping dialog box appears.
  9. From the Argument Set Names list, select InputReportOut.
  10. Click the Add icon (Add icon 
				) to add an Instance variable.
  11. Enter the following two values to the table:
    Instance Variable Argument
    action selectedButton == "submit" ? OK : CANCEL
    result selectedButton

    Both action and result are predefined instance variables. The action argument is an IF which will cancel the activity if the user clicks any button except the submit button to exit the submission form.

  12. Click OK, then click OK again in the Main Task dialog box. The interactive component call is added and mapped.
  13. Save your changes with Save All (Save All icon
				).

    Your screenflow should now look like the following:

    Figure 1. Input Report Screenflow
  14. Close the screenflow editor.
  15. You need to specify the argument mapping in the Create Expense Report activity. In the process design editor, right-click on this activity and click Main Task. The Main Task dialog box opens.
  16. Click Argument Mapping. The Argument Mapping dialog box appears.
  17. Add an entry to the Submit Report In page exactly as follows:
    Submit Report's input arguments Value
    reportSfArg = ExpenseReport()

    Here, reportSfArg is the incoming argument to the screenflow's Begin activity, while ExpenseReport() is the Expense Report object's constructor.

    We use a constructor explicitly because the Submit Report screenflow has incoming as well as outgoing arguments. You would not need this if the screenflow had no incoming argument. We designed the screenflow with an incoming argument so we can also use it in the Edit Report activity.

  18. Add an entry to the Submit Report Out page exactly as follows:
    Expense Report's input arguments Submit Report's output arguments
    reportArg = ReportSfArg
    Here, reportArg is the incoming argument to the Expense Report process Begin activity, while ReportSfArg is outgoing argument from the screenflow.
  19. Click OK and then click OK again in the Main Task dialog box.

With the screenflow, all the components are now in place so that users with the Employee role can enter and submit the expense report. You will test this in the next and final task of this activity.