BizTalk Server Orchestration - Fun Orchestration issue

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Orchestration > May 2005 > Fun Orchestration issue





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Fun Orchestration issue
Brian Cesafsky

2005-04-29, 6:06 pm

I am receiving an XML file that looks like this...

<ContentBillingVerisign
xmlns:ns0="http://ourbusiness.com/ContentBillingVerisign">
<VerisignRecord Date="20050323" Time="19:11:54" MDN="9880838180"
Type="SB" Package="1" Description="Content" Category="News, Horoscope"
Amount="0399" BillField="Y" DeliveryMethod="PUSH" />
<VerisignRecord Date="20050323" Time="19:12:57" MDN="9880838181"
Type="SB" Package="1" Description="Content" Category="StockQuote, News,
Horoscope" Amount="0399" BillField="Y" DeliveryMethod="PUSH" />
<VerisignRecord Date="20050323" Time="19:36:15" MDN="9880838189"
Type="SB" Package="1" Description="Content" Category="Horoscope,
SportsScores" Amount="0399" BillField="Y" DeliveryMethod="PUSH" />
</ContentBillingVerisign>





I have an orchestration that processes the file. Our vendor is dropping
this file off several times per day. In case they would drop off a
duplicate file, I am logging the file names to a database to ensure we don't
process a file twice. I wrote a pipeline component that checks for the
duplicate filename, and if a duplicate file is NOT found, then I call a
stored proc to return a new ID for the inserts in my orchestration. This
component fits in the decode stage before the XML disassembler so it appears
like I only have one message (meaning the dis-assmbler has not been invoked
yet to split up my XML messages in the file). I have the Max Occurs
property on your VerisignRecord node to "unbounded" (no quotes), and I
thought that would ensure my orchestration would process the entire file

I have a property schema with a property in it to hold the ID I get back
from SQL. I found that I had to make this property derive from
messageContextPropertyBase (as opposed to messagedatapropertybase). In the
pipeline component I wrote, I used the Context.Promote function to promote
the id I got back from SQL into the message context. Now I'm able to access
this context property from the orchestration and use it for processing my
messages.

So far everything is great... The problem is, that it appears that the
expression in my orchestration (the one that is checking for duplicate file
name) gets called for every record in the XML file. If I have only 1
record, everything works fine, but if I have more, I get this error...

This is the code in my expression... newBillingFileId =
ContentBilling_Message_VerisignInput(MWH
.BTS.ContentBilling.Core.Schema.PropertySchema.new_billing_file_id);




ERROR:
Uncaught exception terminated service
MWH.BTS.ContentBilling.Core.Orchestration.VerisignTextMessaging(b21bbc79-3b52-eb13-cdd0-eacc316a20b7),
instance bd5c65f2-76d8-482a-90b4-d0deb38b347c

The result set for the XPath expression
'/*[local-name()='RequestInsertEventRecordDaily' and
namespace-uri()='http://ourcompany.com/ContentBilling/InsertEventRecordDaily']/*[local-name()='usp_create_event_record'
and
namespace-uri()='http://ourcompany.com/ContentBilling/InsertEventRecordDaily']/@*[local-name()='billing_file_id'
and namespace-uri()='']' contains more than a single node.

Exception type: AmbiguousXPathException
Source: Microsoft.XLANGs.Engine
Target Site: System.String GetXPath(System.String)
Help Link:
Additional error information:



What do I need to do?


Thanks in advance!


ckphua

2005-04-29, 6:06 pm

Brian,

Did you create an envelope to split the input files into separate messages
before they are consumed by orchestration? It seems to me your entire
message (which may contain multiple records) is going into the orchestration
unsplit, which will account for the ambiguous XPath exception.

Regards,
ck.

"Brian Cesafsky" wrote:

> I am receiving an XML file that looks like this...
>
> <ContentBillingVerisign
> xmlns:ns0="http://ourbusiness.com/ContentBillingVerisign">
> <VerisignRecord Date="20050323" Time="19:11:54" MDN="9880838180"
> Type="SB" Package="1" Description="Content" Category="News, Horoscope"
> Amount="0399" BillField="Y" DeliveryMethod="PUSH" />
> <VerisignRecord Date="20050323" Time="19:12:57" MDN="9880838181"
> Type="SB" Package="1" Description="Content" Category="StockQuote, News,
> Horoscope" Amount="0399" BillField="Y" DeliveryMethod="PUSH" />
> <VerisignRecord Date="20050323" Time="19:36:15" MDN="9880838189"
> Type="SB" Package="1" Description="Content" Category="Horoscope,
> SportsScores" Amount="0399" BillField="Y" DeliveryMethod="PUSH" />
> </ContentBillingVerisign>
>
>
>
>
>
> I have an orchestration that processes the file. Our vendor is dropping
> this file off several times per day. In case they would drop off a
> duplicate file, I am logging the file names to a database to ensure we don't
> process a file twice. I wrote a pipeline component that checks for the
> duplicate filename, and if a duplicate file is NOT found, then I call a
> stored proc to return a new ID for the inserts in my orchestration. This
> component fits in the decode stage before the XML disassembler so it appears
> like I only have one message (meaning the dis-assmbler has not been invoked
> yet to split up my XML messages in the file). I have the Max Occurs
> property on your VerisignRecord node to "unbounded" (no quotes), and I
> thought that would ensure my orchestration would process the entire file
>
> I have a property schema with a property in it to hold the ID I get back
> from SQL. I found that I had to make this property derive from
> messageContextPropertyBase (as opposed to messagedatapropertybase). In the
> pipeline component I wrote, I used the Context.Promote function to promote
> the id I got back from SQL into the message context. Now I'm able to access
> this context property from the orchestration and use it for processing my
> messages.
>
> So far everything is great... The problem is, that it appears that the
> expression in my orchestration (the one that is checking for duplicate file
> name) gets called for every record in the XML file. If I have only 1
> record, everything works fine, but if I have more, I get this error...
>
> This is the code in my expression... newBillingFileId =
> ContentBilling_Message_VerisignInput(MWH
.BTS.ContentBilling.Core.Schema.PropertySchema.new_billing_file_id);
>
>
>
>
> ERROR:
> Uncaught exception terminated service
> MWH.BTS.ContentBilling.Core.Orchestration.VerisignTextMessaging(b21bbc79-3b52-eb13-cdd0-eacc316a20b7),
> instance bd5c65f2-76d8-482a-90b4-d0deb38b347c
>
> The result set for the XPath expression
> '/*[local-name()='RequestInsertEventRecordDaily' and
> namespace-uri()='http://ourcompany.com/ContentBilling/InsertEventRecordDaily']/*[local-name()='usp_create_event_record'
> and
> namespace-uri()='http://ourcompany.com/ContentBilling/InsertEventRecordDaily']/@*[local-name()='billing_file_id'
> and namespace-uri()='']' contains more than a single node.
>
> Exception type: AmbiguousXPathException
> Source: Microsoft.XLANGs.Engine
> Target Site: System.String GetXPath(System.String)
> Help Link:
> Additional error information:
>
>
>
> What do I need to do?
>
>
> Thanks in advance!
>
>
>

Brian Cesafsky

2005-04-29, 6:06 pm

no, I did not use an envelope. I've never used an envelope before, so can
you help me out? Would that affect how I perform the filename check in the
pipeline? How do you process the seperate messages (do you use a loop
shape? never done that either)... can you point me in the right direction if
that is how I should approach this...

Thanks again!


"ckphua" <ckphua@pc.jaring.my.(donotspam)> wrote in message
news:A4366BDA-A552-44EE-80DF-79A5D10AEEA3@microsoft.com...[vbcol=seagreen]
> Brian,
>
> Did you create an envelope to split the input files into separate messages
> before they are consumed by orchestration? It seems to me your entire
> message (which may contain multiple records) is going into the
> orchestration
> unsplit, which will account for the ambiguous XPath exception.
>
> Regards,
> ck.
>
> "Brian Cesafsky" wrote:
>


ckphua

2005-05-01, 2:55 am

Brian,

Just need to confirm your question first. Do you want the same SQL id in
all the records in the message, or each record is supposed to have a
different id? What does the pipeline do to the message if it is a duplicate?
Is the checking done in the pipeline or orchestration?

ck.

"Brian Cesafsky" wrote:

> no, I did not use an envelope. I've never used an envelope before, so can
> you help me out? Would that affect how I perform the filename check in the
> pipeline? How do you process the seperate messages (do you use a loop
> shape? never done that either)... can you point me in the right direction if
> that is how I should approach this...
>
> Thanks again!
>
>
> "ckphua" <ckphua@pc.jaring.my.(donotspam)> wrote in message
> news:A4366BDA-A552-44EE-80DF-79A5D10AEEA3@microsoft.com...
>
>
>

Brian Cesafsky

2005-05-06, 5:50 pm

yes, I want the same SQL id. If the messages is a duplicate, the pipeline
will 'promote' the ID and my orchestration will see that the messages is a
duplicate and not process the file.

The pipeline just promotes a SQL id by running a SPROC to see if a file
exists. if it returns/promotes a zero, the file does not exist and I
callanother SPROC to get a new SQL id and then that new SQL id also gets
promoted so I can use it in my orchestration, if it returns/promotes
anything else, I know it is a duplicate file.

I got this feedback from someone else...
If this is a repeating element then promoted and distinguished fields
will not work. You have two options:

1. Create an envelop schema for the message a break them up
2. Change your orchestration to use a loop and XPath.

Does that sound correct to you? I've never use an envelope or looping, can
you point me in the right direction as how to do that?

Thanks!


In the orchestration
"ckphua" <ckphua@pc.jaring.my.(donotspam)> wrote in message
news:C42E3973-0CB5-4930-82BE-7A2874869A3C@microsoft.com...[vbcol=seagreen]
> Brian,
>
> Just need to confirm your question first. Do you want the same SQL id in
> all the records in the message, or each record is supposed to have a
> different id? What does the pipeline do to the message if it is a
> duplicate?
> Is the checking done in the pipeline or orchestration?
>
> ck.
>
> "Brian Cesafsky" wrote:
>


ckphua

2005-05-10, 5:55 pm

Yes that is correct. Even if you don't have issues with the duplicate files,
you will still have to find a way to split the XML file into their individual
messages. You can use either an envelope schema in the pipeline or XPATH and
looping inside your orchestration to split the file.

In your case creating an envelope schema would probably be easier. Your
pipeline component can check the SQL id and discard the entire message if it
has already been processed, otherwise it can proceed to the next step of the
pipeline (disassembly), where the envelope can split the file into their
individual messages.

There are examples in the BTS2004 documentation and SDK for this. You can
also check out this entry:
http://blogs.msdn.com/scottwoo/arch...2/06/68694.aspx

--
Phua Chiu Kiang
MVP (BizTalk Server Systems)
www.pckconsulting.com

"Brian Cesafsky" wrote:

> yes, I want the same SQL id. If the messages is a duplicate, the pipeline
> will 'promote' the ID and my orchestration will see that the messages is a
> duplicate and not process the file.
>
> The pipeline just promotes a SQL id by running a SPROC to see if a file
> exists. if it returns/promotes a zero, the file does not exist and I
> callanother SPROC to get a new SQL id and then that new SQL id also gets
> promoted so I can use it in my orchestration, if it returns/promotes
> anything else, I know it is a duplicate file.
>
> I got this feedback from someone else...
> If this is a repeating element then promoted and distinguished fields
> will not work. You have two options:
>
> 1. Create an envelop schema for the message a break them up
> 2. Change your orchestration to use a loop and XPath.
>
> Does that sound correct to you? I've never use an envelope or looping, can
> you point me in the right direction as how to do that?
>
> Thanks!
>
>
> In the orchestration
> "ckphua" <ckphua@pc.jaring.my.(donotspam)> wrote in message
> news:C42E3973-0CB5-4930-82BE-7A2874869A3C@microsoft.com...
>
>
>

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com