Salesforce

.NET Service Errors (Magic xpi 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

.NET Service Errors (Magic xpi 3.x)

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

  1. From the Project menu, select Errors. The Errors Repository opens.

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

  3. Click New.

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 service errors predefined in the Magic xpi Errors repository. In this repository you can filter for .NET service errors by selecting the .NET option from the Components drop-down list.

In the Flow Errors 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