When you design a process, one of your goals should be that no participant should need to enter data which the system can obtain automatically. In this task you will modify the Expense Report process to preset user attributes and provide a reasonable default for the date attribute.
The ExpenseReport process requires participants to input their name. Yet the process engine already knows the name of any participant because they had to log in, so this step should not be required.
In this task you will modify the ExpenseReport process so that the submittedBy participant is preset. You will also set up the process so that the submitDate attribute has a default value.
You will add an automatic activity to the Submit Report screenflow. In this activity, you will create a method to set the default values.
Your screenflow should now look like the following:
You can follow these steps to in the Review Report screenflow, to preset the reviewedBy attribute.
To prevent the user from editing these preset values, you can also set the submittedBy field (which should have been named text0) to read-only in the SubmitReport presentation. To do this, set its Editable property to No. Do the same with the reviewedBy text field in the ReviewReport presentation.