Neuron ESB User Network

The Service Bus for the Connected Business

Hello,

   Is the below a Neuron fail message procedure?  Looks like the new one expects a ROW parameter and I was checking to see how I set this value.  I have a C# step where I set the exception message, then call a process that will call the stored procedure.  I've attached a screenshot.

 

Before Upgrade

ALTER PROCEDURE [dbo].[GetFailedMessagesForProcessing]

AS

BEGIN

      SET NOCOUNT ON;

      SET XACT_ABORT ON

      SET TRANSACTION ISOLATION LEVEL READ COMMITTED

     

      DECLARE @AuditTable table (

                  Sequence int NOT NULL,

                  Topic nvarchar(355) NULL,

                  MessageId nvarchar(36) NOT NULL,

                  Party nvarchar(100) NOT NULL,

                  Created datetime NOT NULL,

                  Machine nvarchar(15) NOT NULL,

                  Upn nvarchar(255) NULL,

                  failure_type nvarchar(100) NOT NULL,

                  failure_detail nvarchar(500) NOT NULL,

                  failure_date datetime NOT NULL,

                  MessageBody nvarchar(max) NOT NULL,

                  BodyType nvarchar (100) NULL);

 

      INSERT @AuditTable

      SELECT Sequence,  'Topic'=

 

After Upgrade

ALTER PROCEDURE [dbo].[GetFailedMessagesForProcessing]

      @Rows int

AS

BEGIN

      SET NOCOUNT ON;

      SET XACT_ABORT ON

      SET TRANSACTION ISOLATION LEVEL READ COMMITTED

     

      IF(@Rows < 1)

            BEGIN

                  SET @Rows = 1

            END

           

      DECLARE @AuditTable table (

                  Sequence int NOT NULL,

                  Topic nvarchar(355) NULL,

                  MessageId nvarchar(36) NOT NULL,

                  Party nvarchar(100) NOT NULL,

                  Created datetime NOT NULL,

                  Machine nvarchar(15) NOT NULL,

                  Upn nvarchar(255) NULL,

                  failure_type nvarchar(100) NOT NULL,

                  failure_detail nvarchar(500) NOT NULL,

                  failure_date datetime NOT NULL,

                  MessageBody nvarchar(max) NOT NULL,

                  BodyType nvarchar (100) NULL);

 

      INSERT @AuditTable

      SELECT TOP (@Rows) Sequence,  'Topic'=

            CASE

 

EXCEPTION CODE

//get the pipeline exception

Exception ex = (PipelineException)context.Properties["PipelineException"];

string

msg = "Exception: ";

if

(ex.InnerException != null)

{

msg += ex.InnerException.Message;

}

else

{

msg += ex.Message;

}

//trace to designer window

context.Instance.TraceError(msg);

Thanks,

Views: 147

Attachments:

Replies are closed for this discussion.

Replies to This Discussion

Hi Carlos,

Why are you calling this stored procedure directly?  This returns N number of rows of failed messages to display in our Failed messages screen within the Neuron ESB Explorer

We received the code from Joe or Jereme, I cannot recall, but we needed a way to capture the message and receive an email alert.  We do not receive many errors, but when we do of course we get several.

Do you have another way so we can receive email alerts when an failed error message occurs?

Marty,

  Can you look at the SqlAdapterProcedure screen shot I attached?  You can call a procedure within the adapater but how do I pass a parameter in this adapter?

Attachments:

RSS

Neuron ESB Product Support Forums and Communities

Latest Activity

Anupama Nair posted a discussion

Marketo Adapter Invalid Token

Hi,We are using the Marketo adapter to push account updates to Marketo. It works well for some time then starts failing with Invalid Token unless restarted. Is there a configuration that can be done so it can auto refresh the token when required?Thanks!See More
Nov 6, 2023
Sayantini Basak posted a discussion

Maximum payload size(REST API) for requests interfacing to NeuronESB

I am new to Neuron ESB and in our current scenario,We need to process batch transactions comprising of ~1000 records and send them to Neuron ESB for further processing. I would like to understand what is the maximum size of payload that can be transferred using REST interface to Neuron ESB.See More
Jul 22, 2022
Profile IconRobert E Dunie and Sayantini Basak joined Neuron ESB User Network
Apr 28, 2022
Profile IconDayanand, Frederic C, Steffen Greve-Oksfeldt and 1 more joined Neuron ESB User Network
Mar 16, 2022
Profile IconCam Vong and Mitja Luznar joined Neuron ESB User Network
Jan 27, 2022
Profile IconWill Hitzges, Chad Parsons, michael larsen and 4 more joined Neuron ESB User Network
Jun 11, 2021
Anupama Nair posted a discussion

ODBC stored proc polling with temporary tables

We have set up an ODBC adapter to poll a stored proc.We found that if the stored proc has a temporary table defined the rows returned are always 0.Any idea why this would be and what we can do to get around it?See More
Dec 14, 2020
Prasanth Kharade is now a member of Neuron ESB User Network
Dec 30, 2019

Badge

Loading…

© 2024   Created by Neuron Admin.   Powered by

Badges  |  Report an Issue  |  Terms of Service