ErrorReport - Can it be Assigned to?

932 views
Skip to first unread message

Steve Harclerode

unread,
Feb 12, 2007, 8:55:52 PM2/12/07
to
Is it okay to use the ErrorReport.Description property for my own purposes?

I'm trying to set up a generic orchestration to catch "bad" messages that I
have purposely stuck into the message box, usually inside of an exception
handler for a scope shape.

My plan has been to use direct binding in the orchestration that "catches"
the messages, with a filter that accepts any message that has the property
ErrorReport.Description.

Then in the orchestration with the exception block, I am using code like
this:
MessageToSuspend(ErrorReport.Description) =
"Send pipeline execution failed " +
"while assembling outbound batch that included this message.\r\n" +
"Error details: " + except.Message;
And the send port connected to the send shape also uses direct binding.

In testing, I do not see the ErrorReport.Description property in the message
that I am trying to send to the generic orchestration.

As you may imagine, I am also receiving the following in the Application
Event Log:
=========

Event Type: Error
Event Source: XLANG/s
Event Category: None
Event ID: 10008
Date: 2/12/2007
Time: 5:13:59 PM
User: N/A
Computer: EBI-W2003E-02
Description:
Uncaught exception (see the 'inner exception' below) has suspended an
instance of service
'XX.B2B.ProductReports.Resale.SendResaleReport(44cdfaed-b950-d354-208b-42333775ed7c)'.
The service instance will remain suspended until administratively resumed or
terminated.
If resumed the instance will continue from its last persisted state and may
re-throw the same unexpected exception.
InstanceId: 1b40a98f-78ba-419f-8732-5b6c0b87730d
Shape name: Send Msg to Suspend
ShapeId: bfaec742-4f30-44e2-9dd2-d5198c7a2af1
Exception thrown from: segment 3, progress 14
Inner exception: Exception occurred when persisting state to the database.

Exception type: PersistenceException
Source: Microsoft.XLANGs.BizTalk.Engine
Target Site: Void Commit()
The following is a stack trace that identifies the location where the
exception occured

at Microsoft.BizTalk.XLANGs.BTXEngine.BTXXlangStore.Commit()
at Microsoft.XLANGs.Core.Service.Persist(Boolean dehydrate, Context ctx,
Boolean idleRequired, Boolean finalPersist, Boolean bypassCommit, Boolean
terminate)
at Microsoft.XLANGs.Core.ServiceContext.PendingCommit(Boolean ignore,
XMessage msg)
at Microsoft.XLANGs.Core.ExceptionHandlingContext.PendingCommit(Boolean
ignoreCommit, XMessage msg)
at Microsoft.XLANGs.Core.ExceptionHandlingContext.PendingCommit(Boolean
ignoreCommit, XMessage msg)
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXPortBase.SendMessage(Int32
iOperation, XLANGMessage msg, Correlation[] initCorrelations, Correlation[]
followCorrelations, Context cxt, Segment seg, ActivityFlags flags)
at FFF.B2B.ProductReports.Resale.SendResaleReport.segment3(StopConditions
stopOn)
at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s,
StopConditions stopCond, Exception& exp)
Additional error information:

A batch item failed persistence Item-ID
2e919712-c3e0-48dd-ba06-2cbe561d6f63 OperationType MAIO_CommitBatch
Status -1061151998 ErrorInfo The published message could not be routed
because no subscribers were found. .

Exception type: PersistenceItemException
Additional error information:

Failed to publish (send) a message in the batch. This is usually
because there is no one expecting to receive this message. The error was
The published message could not be routed because no subscribers were found.
with status -1061151998.

Exception type: PublishMessageException

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.


Tomas Restrepo [MVP]

unread,
Feb 12, 2007, 10:28:56 PM2/12/07
to
Steve,

> Is it okay to use the ErrorReport.Description property for my own
> purposes?

I'm not sure how OK it is. It might be, though I don't see in this case why
you couldn't use your own custom property instead as well.

>
> I'm trying to set up a generic orchestration to catch "bad" messages that
> I have purposely stuck into the message box, usually inside of an
> exception handler for a scope shape.
>
> My plan has been to use direct binding in the orchestration that "catches"
> the messages, with a filter that accepts any message that has the property
> ErrorReport.Description.
>
> Then in the orchestration with the exception block, I am using code like
> this:
> MessageToSuspend(ErrorReport.Description) =
> "Send pipeline execution failed " +
> "while assembling outbound batch that included this message.\r\n" +
> "Error details: " + except.Message;
> And the send port connected to the send shape also uses direct binding.
>
> In testing, I do not see the ErrorReport.Description property in the
> message that I am trying to send to the generic orchestration.

<snip/>

The problem is likely that you're writing the property into the message
context but it's not getting promoted. To get it promoted you need to make
it part of a correlation set and initialize it when you send the message
through the direct bound port.


--
Tomas Restrepo
tom...@mvps.org
http://www.winterdom.com/weblog/

Steve Harclerode

unread,
Feb 13, 2007, 2:10:12 PM2/13/07
to
Hi Tomas,

Thanks for your answer, that got me a lot further. Let me explain the issue
I'm having now...
I am using the Aggregator pattern, which uses an explicit call to a send
pipeline in order to collect all of the messages together. Therefore when
there is an exception, what I wish to do is to send the entire collection of
messages to the "catching" orchestration, which I do one at a time inside of
a loop shape.

Unfortunately, you can only initialize a correlation set once, so I can't
use this promote properties for more than the 1st message. (Compile time
error msg: "a correlation may be initialized only once").

Is there another way to cause the property promotion? Do I need to make
another explicit call to a pipeline?

Thanks,
Steve

"Tomas Restrepo [MVP]" <tom...@mvps.org> wrote in message
news:210C0E92-C752-484E...@microsoft.com...

Tomas Restrepo [MVP]

unread,
Feb 13, 2007, 4:15:24 PM2/13/07
to
Steve,

> Thanks for your answer, that got me a lot further. Let me explain the
> issue I'm having now...
> I am using the Aggregator pattern, which uses an explicit call to a send
> pipeline in order to collect all of the messages together. Therefore when
> there is an exception, what I wish to do is to send the entire collection
> of messages to the "catching" orchestration, which I do one at a time
> inside of a loop shape.
>
> Unfortunately, you can only initialize a correlation set once, so I can't
> use this promote properties for more than the 1st message. (Compile time
> error msg: "a correlation may be initialized only once").

You can get around this pretty easy by putting a scope inside your while
loop and declaring the correlation set *inside* the scope instead of at the
global orchestration level.

Steve Harclerode

unread,
Feb 13, 2007, 7:44:06 PM2/13/07
to
That worked, thanks very much.
- Steve

"Tomas Restrepo [MVP]" <tom...@mvps.org> wrote in message

news:F7B29BB0-AC7F-4BE2...@microsoft.com...

Reply all
Reply to author
Forward
0 new messages