Errors
The Errors node allows you to Add, Edit and Delete Error Profiles to view Workflow instances in Error status. You can then go to these Profiles and Retry Workflow instances in error state (see the topic Retrying workflow errors for more information and background on repairing failed workflows with the Retry command).
K2 workflows can encounter unexpected errors from time to time. The very nature of K2 solutions (where K2 acts like an intermediary between different systems and may depend on other systems like Active Directory) means that K2 processes can sometimes fail if there is a problem with a supporting system. If the workflow developer has not specifically handled errors in the workflow design, any processes that encounter unexpected errors will be put into Error status and K2 will suspend further execution of the workflow. These processes will appear in the Error Profiles section, and the K2 administrator can then Retry failed instances of the workflow when the root cause of the error is resolved.
You can create separate Error Profiles to filter errors based in various selections. For example, perhaps you have a workflow that often fails because of an unreliable third-party system. You can create a separate profile for only this workflow, so that you can easily select all the errors in that Error profile and retry all the errors at once. Alternatively, you could create an Error Profile to list only specific types of errors (for example Destination errors) so that you can easily list and manage workflows that failed due to that particular type of error, e.g. when K2 is unable to assign tasks to users.
Error Profiles
The All Error Profile is created by default and will be listed in this view. This profile lists all Workflow instances in error status. The Error Profiles view is used to Add, Edit and Delete profiles. See Working with Error Profiles to learn how to retry Workflow instances in error state.
Adding your own Error Profile is useful when you want to view errors on Workflows by a certain grouping. Follow these steps to add an Error Profile:
- Click the New button from the Error Profiles view.
- Enter values for the Error Profile. Use the image and table below as a guideline for the configuration.
- Click OK after completing the Error Profile configuration.
- The new Error Profile will be listed in the Error Profiles view.
- To show the new Error Profile in the Tree View, right-click the Errors node in the K2 Management tree view and click Refresh Menu.
- The new Error Profile will now display in the tree view.
Field Name | Description |
---|---|
Name | The name for the Profile being created. Type a value in the field provided. |
Use From Date | Select this check box if you want this profile to list Workflow instances from a specific date. Use the calendar button to select the date. |
Use To Date | Select this check box if you want this profile to list Workflow instances up to a specific date. Use the calendar button to select the date. |
Process Set Name | Use the drop down to select a Workflow or select the All option from the drop down to include all Workflows for this Profile. |
Process Errors | All the Process Error options are selected by default. Check or uncheck the check boxes to include or exclude the available options for this Profile. |
Activity Errors | All the Activity Error options are selected by default. Check or uncheck the check boxes to include or exclude the available options for this Profile. |
Event Errors | All the Event Error options are selected by default. Check or uncheck the check boxes to include or exclude the available options for this Profile. |
OK Button | Click OK after you've completed the Error Profile configuration. This will take you back to the Error Profiles view and the new Profile will be listed. |
Cancel Button | Click Cancel if you do not want to complete the Error Profile configuration. Click OK on the confirmation message. This will take you back to the Error Profiles view and the Profile will not be created. |
Follow these steps to edit an Error Profile:
- Select the Error Profile you want to edit. Click Edit.
- Change the values that require editing. Use the table provided in the Add section as a guideline for configuring the fields.
- Click OK to save the changes made to the Profile.
Follow these steps to delete an Error Profile:
- Select the Error Profile you want to delete by clicking the check box in front of the Profile. You can also click the top check box if you want to delete all the Profiles. Click Delete.
- Click OK on the confirmation message.
Use the Refresh button to refresh the list of Error Profiles. After clicking Refresh, Error Profiles created, edited and deleted will be updated.
Use the available Error Profiles to view Workflow Instances in Error state. Use the All profile to see all workflows in Error state, or select a profile from the list to see only workflows in error that match the filters applied for the profile. You can use the Retry function to attempt to repair a workflow that is in Error state.
- Expand the Errors node and click on the Error Profile you want to use.
- This opens the Error Logs view listing the Workflow Instances in Error state.
- Find the workflow instance you want to view and read the Description of the error. The description will indicate the error and may help you determine what caused the error.
- To view the detail of the error, select the Workflow Instance and click Show Details.
- If necessary, investigate and resolve the underlying cause of the error.
- To Retry the instance, select the instance from the Error Logs view. The Retry button becomes available.
- Click Retry.When selecting multiple instances to Retry, we recommend selecting instances in batches of at most 10 instances at a time, and then issuing the Retry command. This will help to reduce the load on the K2 sever when processing the Retry command for multiple instances at the same time, and can help to mitigate subsequent issues that may arise when multiple instances are retrying the same event, for example overloading a target system with multiple requests.
- The Error Logs view will refresh. If the error was resolved by the Retry command, the Workflow Instance will be removed from the list. Some errors may not clear immediately, and because of the way K2 works, if you issue a Retry command it is possible that the workflow could go into Error status again after a few seconds, once K2 has processed the failed code. When you Retry a failed workflow, wait a few seconds and then use the Refresh button to refresh the list of failed workflows, just to verify that the workflow error was indeed resolved by the Retry command.
- To select multiple errors to retry at the same time, hold down the Shift key, click on the errors you want to retry, and then click the Retry button.
- The Errors list displays twenty errors on each page. Use the paging arrows to navigate to other pages if necessary.
- By default, errors are ordered by ID in descending order. The latest errors display at the top of the list. You can also sort the errors by clicking on the column headers.