Because we don't know the number of items in an expense report beforehand, we need to code a loop to check the status of each receipt.
You could place this loop in the conditional transition itself, but it is better to add a method to the BPM Object. In this way, you can use the method elsewhere, and, if you make any changes to the way this information is stored in the BPM object, you need to update only one piece of code.
Also, the conditional expression in the transition itself is 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 uses it.
To add the areReceiptsChecked method and the Not Confirmed transition:
After completing this task, your process design diagram looks like this: