Re: Filtering on a send port based on node name

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



1) define a property schema with the property you want to use to route on --
name it something that makes sense to you.
2) create a custom pipeline component that reads the xml file as it is
coming in and promotes the name of the element into the property you
specified in step 1

3) Setup your filters on the send port to route based on this property.

Matt


"Samuel L" <SamuelL@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:743EF6C1-0B78-4E56-B6DE-8E0AA628D68B@xxxxxxxxxxxxxxxx
> Hi Gremlin!
>
> Don't know if it's possible to filter on the node name, but here is an
> alternative strategy using a map on the receive port...
>
> 1) Create a new schema which imports the original document schema and just
> extend it with an attribute called "Operation" in the root node. Promote
> this
> attribute as a promoted property.
>
> 2) Create a map from your original schema to this new schema. Map all the
> elements in the source Choice group to the destinaiton Choice group.
>
> 3) Now add a scripting fucntoid. And configure it to perform the following
> Inline XSLT:
> <xsl:attribute name="operation">
> <xsl:value-of select="local-name(/child::*/child::*)" />
> </xsl:attribute>
> This will set the attribute value to the name of the choice node (i.e. if
> the doc is <Trans> <Billing> ... </Billing> </Trans> then the attribute
> value
> will be 'Billing'.
> If there are too many elements to map between, you could simply code the
> whole transformation as inline xslt.
>
> 4) Now configure your receive port to use this map.
>
> 5) And finally configure your send ports to filter on the promoted
> property
> attribute.
>
> If you want you can create a map that transforms back to the original
> document, and use this map in the send port.
>
> I hope this helps you in some way and please let me know if you don't see
> what I mean! Good luck!
>
>
> "The Gremlin" wrote:
>
>> Hello.
>>
>> I have a document that looks like this:
>>
>> <Transaction>
>> <Billing>
>> ...
>> </Billing>
>> </Transaction>
>>
>> or this:
>>
>> <Transaction>
>> <Record>
>> </Record>
>> </Transaction>
>>
>> And several other similar configurations (the schema has a CHOICE
>> statement). Each Transaction will contain 1 type of operation (eg.
>> Billing,
>> Record, etc).
>>
>> I get this, on my receive port and want to route it through different
>> Send
>> Ports, by using a filter, but I dont have a property I can promote to
>> make
>> the decision, just a node name. I was hoping not to use an orchestration
>> for
>> this.
>>
>> How can this be done?


.



Relevant Pages

  • Re: problem - get the @@identity in MAP
    ... this is my updategram schema structure ... This my input schema structure(i.e Source Schema for Map) ... The adapter failed to transmit message going to send port ...
    (microsoft.public.biztalk.general)
  • Re: problem - get the @@identity in MAP
    ... this is my updategram schema structure(i.e Destination schema for Map) ... The adapter "SQL" raised an error message. ... The adapter failed to transmit message going to send port ...
    (microsoft.public.biztalk.general)
  • Re: Help in sending Biztalk messages to SQL Server 2005
    ... Use the SQL Adapter to generate an insert schema for you, ... From here you will want to create a map from your current schema to ... After that when you deploy it will create the SQL port for you and ...
    (microsoft.public.biztalk.general)
  • Re: Error: The document type XXX does not match any of the given schemas
    ... creating a custom send pipeline and include the flat file assembler ... There is a Send Port configured with the Flat File Assembler ... I have a map defined that converts the XML file to ... the doc schema property of the FF assembler is set to the FF schema. ...
    (microsoft.public.biztalk.general)
  • RE: Handling xml:lang attributes
    ... BizTalk produces the following XSLT code from the map: ... standard one for the "xml" prefix, ... but if the schema is re-saved in VS it ... Then create and use a BizTalk map with the "Custom XSL Path" ...
    (microsoft.public.biztalk.general)