In this task you add the last conditional transition of the Expense Report process. This transition is to be used when the treasurer has not confirmed one or more receipts.
Because we don't know the number of items in an expense report beforehand, we need to code a loop that will check the status of each receipt.
You could place this loop in the conditional transition itself, but it's better if you define a method. In this way, you will be able to use the method elsewhere. If any changes are made to the way this information is stored in the BPM object, you will need to update only one piece of code.
Finally, the conditional expression in the transition itself will be simpler, and thus easier to read and maintain. It is good practice to use simple expressions within conditional transitions.
You will define the areReceiptsChecked method and then add the Not Confirmed transition, which will use it.
To add the areReceiptsChecked method and the Not Confirmed transition:
After completing this task, your process design diagram should look like this: