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:
- Add an interactive component call (
) to the screenflow diagram, between the Begin and
End activities.
The
Activity dialog box appears.
- In the
Name field, enter
Input Report, and click
OK.
The Input Report interactive component call activity is
added to the diagram.
- Right-click on the Input Report activity icon and click
The
Main Task dialog box appears.
- In the
Implementation Type drop-down list, select
BPM Object Interactive Call.
- In the
Select BPM Object Variable drop-down list,
select
reportSf.
- Select the
Use BPM Object Presentation option, and select
SubmitReport from the drop-down list.
- Select the
Input option.
- You need to specify the output arguments, so click
Argument Mappings.
The
Argument Mapping dialog box appears.
- From the
Argument Set Names list, select
InputReportOut.
- Click the Add icon (
) to add an Instance variable.
- 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.
- Click
OK, then click
OK again in the
Main Task dialog box.
The interactive component call is added and mapped.
- Save your changes with
Save All (
).
Your screenflow should now look like the following:
Figure 1. Input Report Screenflow
- Close the screenflow editor.
- 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
.
The
Main Task dialog box opens.
- Click Argument Mapping.
The
Argument Mapping dialog box appears.
- 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.
- 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.
- 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.