It could can be useful to stop the Submitting Submit process , in case when you find some a problem with data (e.g. on you discover an error in Quote inputs, etc).
When you hit the Submit button, it executes the Workflow workflow logic. But if you raise an exception in the WKF workflow logic, it will stop the submitting , and go back to Draft.
Code Block | ||
---|---|---|
| ||
api.throwException("There is somean error in the Quote, please fix it before submitsubmitting.") |
If this is in Workflow a workflow logic for Quotea quote, then the message will appear in the Message portlet window of the Quotequote.