Error Handler Profile Overview
This sample profile handles connectivity errors that might occur when XEServer is trying to send the result message to the client. To control the process flow and to emulate connectivity errors, XEServer uses a set of XEServer environment properties:
- ${DS_Primary--DS_Good_Enabled_and_DS_Bad_Disabled}
- ${DS_Secondary--DS_Good_Enabled_and_DS_Bad_Disabled}
- ${JMS_Primary--JMS_Good_Enabled_and_JMS_Bad_Disabled}
- ${JMS_Secondary--JMS_Good_Enabled_and_JMS_Bad_Disabled}
These boolean variables allow you to enable and disable the transport (JMS) and storage (Data Storage) modules, and to emulate transport / storage errors.
Scenarios
The sample profile handles six scenarios:
Scenario 1
-
Conditions: No errors on the Primary JMS component.
Result: The client side receives the result file.
Scenario 2
-
Conditions:
- An error occurs on the Primary JMS component.
- No errors on the Primary DS component.
- No errors on the Secondary JMS component.
- The message is "retryable" (a re-delivery is required).
Result: The client receives the result file.
Scenario 3
-
Conditions:
- An error occurs on the Primary JMS component.
- An error occurs on the Primary DS component.
- No errors on the Secondary DS component.
- No errors on the Secondary JMS component.
- The message is "retryable" (a re-delivery is required).
Result: The client receives the result file.
Scenario 4
-
Conditions:
- An error occurs on the Primary JMS component.
- An error occurs on the Primary DS component.
- An error occurs on the Secondary DS component.
Result:
- XEServer stores the original message in the archive (DS Error) for further investigation.
- XEServer does not send any data for the delivery retry.
- The client does not receive the route result file.
Scenario 5
-
Conditions:
- An error occurs on the Primary JMS component.
- No errors on the Primary DS component.
- An error occurs on the Secondary JMS component.
- The message is "retryable" (a re-delivery is needed).
Result:
- The original message is stored in the archive (Retry Error) for further investigation.
- The client side doesn’t receive the route result file.
Scenario 6
-
Conditions:
- An error occurs on the Primary JMS component.
- No errors on the Primary DS component.
- The message is "non-retryable" (a re-delivery is not required).
Result:
- XEServer stores the original message in the archive (Not Specified Error) for further investigation.
- The client does not receive the route result file.
Profile Location
Edifecs Library / Best Practices / Common Tasks / Error Handler
Requirements
- Edifecs XEngine 9.0 or later.
- Edifecs XEServer 9.0 or later.
- Edifecs Application Manager (EAM) 9.0 or later.
- Edifecs SpecBuilder 9.0 or later.
Prerequisites
- In Edifecs Application Manager, add the profile Error Handler from the Edifecs Library to Edifecs Application Manager. For more information, see Edifecs Library Help Center.
- Register the crosswalk file ErrorsActionCrosswalk.crsw before you use the crosswalk.
Click to see how to register the crosswalk
- Open SpecBuilder.
- Go to the Advanced tab, and then click Crosswalk Browser.
- In the Crosswalk Browser, click Register. The Register Existing Crosswalk map wizard opens.
- Click Next.
- Specify the path to the file ErrorsActionCrosswalk.crsw and then click Next.
- Click Next in the next few screens, till the crosswalk registration is complete.
Profile Execution
To test the scenarios 1 - 5, select the JMS component Primary Bad on the route 2 Sample Route and make sure that the selected Service Name is "JMS Connection_Bad_1" or "JMS Connection_Bad_3".
Scenario 1
-
Set the following XEServer environment properties:
- Copy the file 837.dat from the directory ${XESProfileConfig}/samples to the directory ${XESWorkspace}/test-data/Inbound/Data.
Expected Results
The response file appears in the directory ${XESWorkspace}/test-data/outbound/ResponseToClient.
Scenario 2
-
Set the following XEServer environment properties:
- ${JMS_Primary--JMS_Good_Enabled_and_JMS_Bad_Disabled} = false
- ${DS_Primary--DS_Good_Enabled_and_DS_Bad_Disabled} = true
- ${JMS_Secondary--JMS_Good_Enabled_and_JMS_Bad_Disabled} = true
- Copy the file 837.dat from the directory ${XESProfileConfig}/samples to the directory ${XESWorkspace}/test-data/Inbound/Data.
Expected Results
The response file appears in the directory ${XESWorkspace}/test-data/outbound/ResponseToClient.
Scenario 3
- Set the following XEServer environment properties:
- ${MS_Primary--JMS_Good_Enabled_and_JMS_Bad_Disabled} = false
- ${DS_Primary--DS_Good_Enabled_and_DS_Bad_Disabled} = false
- ${DS_Secondary--DS_Good_Enabled_and_DS_Bad_Disabled} = true
- ${JMS_Secondary--JMS_Good_Enabled_and_JMS_Bad_Disabled} = true
- Copy the file 837.dat from the directory ${XESProfileConfig}/samples to the directory ${XESWorkspace}/test-data/Inbound/Data.
Expected Results
The response file appears in the directory ${XESWorkspace}/test-data/outbound/ResponseToClient.
Scenario 4
- Set the following XEServer environment properties:
- ${JMS_Primary--JMS_Good_Enabled_and_JMS_Bad_Disabled} = false
- ${DS_Primary--DS_Good_Enabled_and_DS_Bad_Disabled} = false
- ${DS_Secondary--DS_Good_Enabled_and_DS_Bad_Disabled} = false
- ${JMS_Secondary--JMS_Good_Enabled_and_JMS_Bad_Disabled} = false / true (both true and false are acceptable)
- Copy the file 837.dat from the directory ${XESProfileConfig}/samples to the directory ${XESWorkspace}/test-data/Inbound/Data.
Expected Results
The response file appears in the directory ${XESWorkspace}/test-data/outbound/Archive/DS_Error.
Scenario 5
- Set the following XEServer environment properties:
- ${JMS_Primary--JMS_Good_Enabled_and_JMS_Bad_Disabled} = false
- ${DS_Primary--DS_Good_Enabled_and_DS_Bad_Disabled} = true
- ${DS_Secondary--DS_Good_Enabled_and_DS_Bad_Disabled} = false / true (both true and false are acceptable)
- ${JMS_Secondary--JMS_Good_Enabled_and_JMS_Bad_Disabled} = false
- Copy the file 837.dat from the directory ${XESProfileConfig}/samples to the directory ${XESWorkspace}/test-data/Inbound/Data.
Expected Results
The response file appears in the directory ${XESWorkspace}/test-data/outbound/Archive/Retry_Error.
Scenario 6
- Set the following XEServer environment properties:
- ${JMS_Primary--JMS_Good_Enabled_and_JMS_Bad_Disabled} = false
- ${DS_Primary--DS_Good_Enabled_and_DS_Bad_Disabled} = true
- ${DS_Secondary--DS_Good_Enabled_and_DS_Bad_Disabled} = false / true (both true and false are acceptable)
- ${JMS_Secondary--JMS_Good_Enabled_and_JMS_Bad_Disabled} = false / true (both true and false are acceptable)
- ${DS_Primary--DS_Good_Enabled_and_DS_Bad_Disabled} = true
- Select the JMS component Primary Bad on the route 2 Sample Route and in the Service Name field, select "JMS Connection_Bad_2" for this JMS component.
- Copy the file 837.dat from the directory ${XESProfileConfig}/samples to the directory ${XESWorkspace}/test-data/outbound/Archive/NotSpecified_Error.
Expected Results
The response file appears in the directory ${XESWorkspace}/test-data/outbound/Archive/NotSpecified_Error.