Error Codes and Process Interfaces
The following example shows how a "get balance" example could be implemented as a sub-process.
The process flow is as follows:
- The process is started upon receipt of a start event that contains an account.
- The REST service task looks up the account in the database to verify if it is valid.
- If the account is valid, another REST service task gets the balance, and the balance and account number are sent as output.
If the account is not valid, an error code is generated.
In this case, the sub-process generates an error, and in the calling process the error is resolved.
The catch error event is configured to detect the error thrown from the sub-process.