Salesforce

How Do I Trap Messaging Errors? (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

How Do I Trap Messaging Errors? (Magic xpa 3.x)

Whenever you use one of the MSMQ programs, there is the possibility that it will raise an error. Each of the programs has a return code that you can query, however, you can also use an Event handler to automatically trap MSMQ errors. To add this event:

  1. Open the task you want to handle the MSMQ error. This can be in three different locations:

    • In the Main Program, with a Scope of Global.

    • In the top task of the task tree, with a Scope of Subtree.

    • In the task that is calling the MSMQ program, with a Scope of Task.

  2. Click on the Logic tab.

  3. Press Ctrl+H (Edit->Create Header Line) to create a new Logic header line.

  4. Type E to create an Event. The Event dialog box will appear.

  5. Choose Event type of User.

  6. Zoom from the Event field to choose MSMQ.Public error.

  7. Click OK. You will get a dialog box that says “Create Parameter variables to match parameters in the event?”. Select Yes.

  8. The Event handler will be created, complete with parameters.

  9. Choose the Scope that applies in this case.

  10. Use the parameter variables as needed to handle the error. In our example we used the message text to create a user error message.

The Event has four parameters:

Parameter

Description

pO.Messaging system

  • M - MSMQ

  • J - JMS

  • W - WebSphere MQ

pO.Error code

The error code.

pO.Validation Error?

TRUE if the error is from the MSMQ component’s validation check.

FALSE if there was an error during execution.

pO.Error message

The error text.

Note: While you can trap all the error messages here, remember that they are also written to the message error log. The location of this log is specified under MessagingComponentDir in the Logical Names section.

Reference
Attachment 
Attachment