Salesforce

.NET Utility Errors (Magic xpi 4.5)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

.NET Utility Errors (Magic xpi 4.5)

You can add new .NET utility error codes to Magic xpi as follows:

  1. From the Solution Explorer's Repositories section, select Errors. The Errors Repository opens.

  2. From the Components drop-down list at the top of the repository, select User Error.

  3. Click Add.

Throwing the errors is done by setting the ErrorCode and ErrorMessage properties of the IBFlowContext object in the Invoke method of the .NET class. The ErrorCode property value should be one of the .NET utility errors predefined in the Magic xpi Errors Repository. In this repository you can filter for .NET utility errors by selecting the .NET option from the Components drop-down list.

In the Error Policies repository, you can define the error behavior for the errors that the .NET step can throw.

The C.sys.ErrorCode and C.sys.ErrorDescription context variables will be updated in the following ways:

  1. If you update both the ErrorCode and ErrorMessage in .NET, then Magic xpi updates the above context variables with the value updated in the .NET code.

  2. If you update the ErrorCode in .NET and not the ErrorMessage, then Magic xpi updates the C.sys.ErrorCode variable with the ErrorCode defined in the .NET code, maps to the Errors Repository with the ErrorCode, and updates the C.sys.ErrorDescription variable with the value defined in the Errors Repository.

  3. If an exception is thrown, then Magic xpi updates the C.sys.ErrorCode variable with 777 and updates the C.sys.ErrorDescription variable with the exception thrown from the .NET code.

  4. If you update the ErrorCode that is not defined in the User Error list, then the Error Code does not exist for the selected component error appears.

Reference
Attachment 
Attachment