# What is the proper way to do exception handling in IBM BPM?

In our project we did exception handling in process using error event handling but when error occurred at any service error event is capturing that error but when we have to resume that process instance from failed service.how we can achieve this?

##### Post Metadata
- Posted at: over 6 years ago
- Net upvotes: 1


## Comments
### Comment 1

Catching errors using error intermediate events
For BPDs, you can attach an error intermediate event to an activity and connect that event to an error handling flow or activity. The attached error event is known as a error boundary event.

To determine whether to use error immediate events, consider the following points:

If an error occurs while a process is running an activity with an attached error event at the boundary, the process flows along the sequence line that is attached to the error event. Errors are handled in the flow and then proceed with the normal processing.
Error intermediate events must be attached to an activity.
You can have multiple error events for an activity, but only one catches the error.
Consider specifying the error data to catch specific errors, filtering on the error code for the types of errors that are caught, and mapping to a variable after the errors are caught. When all errors are caught, or if only an error code is specified, the error data is captured in an XMLElement in the tw.system.step.error variable.
To handle validation errors in a save service for shared business objects, catch the error BPMBOSaveFailedError that is available in the list of specific errors. This error is only available on nodes that save the execution context, either automatically (for example, coaches) or explicitly by enabling the Save execution context option


Catching errors using error event subprocesses
An event subprocess is a specialized type of subprocess that is not part of the normal sequence flow of its parent process. An error event subprocess is an event subprocess that contains an error start event. The event subprocess is not connected by sequence flow and runs only if the start event in the event subprocess is triggered. You can use error event subprocesses to handle errors in your BPD.

To determine whether to use error event subprocesses, consider the following points:
Define a readable process by locating the error event in the event subprocess instead of defining it in the process.
To reuse the error-handling flow for multiple tasks in your process, use event subprocesses. To reuse an error-handling flow using attached events, you must attach an intermediate event for each of the tasks and then connect those events to the error-handling flow.
Define data objects that you can access only from within the event subprocess. You can define only those data objects that belong to a subprocess. The parent process is not cluttered with unnecessary variables.

##### Comment Metadata
- Posted at: over 6 years ago
- Author title: Senior Technical lead  at Virtusa Polaris India Private Limited



### Comment 2

There are options available. When you open process admin console. In that you can check your processes in process inspector tab. According to date time you can search the failed tasks.  And when it appears you can click on retry failed steps, the failed task will be active again. 

##### Comment Metadata
- Posted at: over 6 years ago
- Author title: IBM Business process management admin, WAS admin at RBL BANK... support engineer at Kyzer Software India Pvt Ltd.




## Related Product
[IBM Business Process Manager](https://www.g2.com/products/ibm-business-process-manager/reviews)

## Related Category
[Business Process Management](https://www.g2.com/categories/business-process-management)

## Related discussions
- [How well does Trello scale into a larger team?](https://www.g2.com/discussions/1-how-well-does-trello-scale-into-a-larger-team)
  - Posted at: about 13 years ago
  - Comments: 6
- [Can we please add a new section](https://www.g2.com/discussions/2-can-we-please-add-a-new-section)
  - Posted at: about 13 years ago
  - Comments: 0
- [Quantifiable benefits from implementing your CRM](https://www.g2.com/discussions/quantifiable-benefits-from-implementing-your-crm)
  - Posted at: about 13 years ago
  - Comments: 4


