BizTalk Server General - Distinguished Property

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > April 2004 > Distinguished Property





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 Distinguished Property
Shyamalal

2004-04-22, 7:41 am

All

I am a new to BTS 2004. First of all I need to know the difference between Distinguised Property and a Promoted Property.

My requirement are:

I have an XML file which will have an attribute called actionTobePerformed. The values could be Add/DeleteAll/DeleteOnly
In my orchestration, after receiving the XML file, I have an expression shape that would assign these values into variables. After that I have a decide shape that would decide on calling a sub orchestration based on the actionTobePerformed values. To achi
eve this, I made this actionTobePerformed attribute to be a distinguisehd property.

Each action can be performed in different combinations of locations. For example Add can be done in C:\ or D:\ or both C:\ and D:\. Each location is represented as a separate TAG i my XML file with attribute name whose value could be C:\ or D:
Now to decide on the location I ned to promote this name attribute. But this name attribute is getting repeated for different locations in the XML aschema.

How will I promote / make name attribute as a distinguised property under each node so that I would decide on the location.


Matt Milner

2004-04-23, 11:36 am

You can't promote a repeating property, but here is what you can do:

Take the small part of your message that you are interested in working with
(your repeating record) and define that as a schema unto itself.
Mark the item you are interested in as a distinguished property.
Now pull out the part of your message that matches the schema above (in your
orchestration) and then use this message to get the distinguished property.

I'm not 100% sure htis will work without testing it. The distinguished
property might not get promoted the way it needs to since there is no
pipeline involved. So, the other option would be to make the smaller part
you are interested in a message within an envelope. Then your orchestration
gets called for each repeating element and you can work with the
distinguished property that way.

Another thing to think about would be avoiding your main orchestration all
together. Your sub orchestrations can all have receives on them and put a
filter on the receive so that your "add" orchestration gets the add message.
Now you can do some looping in your orchestration. You can use the XPath
function in your expression shapes or assighment shapes to get out the
values you want. See the link below in your help for more information.

ms-help://BTS_2004/SDK/htm/ebiz_prog_orch_doho.htm

Enough rambling from me, hopefully one of these or a combination help you
out.

Matt

"Shyamalal" <anonymous@discussions.microsoft.com> wrote in message
news:329E3F29-70B8-44FF-9EE7-C41C36625D9E@microsoft.com...
> All
>
> I am a new to BTS 2004. First of all I need to know the difference between

Distinguised Property and a Promoted Property.
>
> My requirement are:
>
> I have an XML file which will have an attribute called

actionTobePerformed. The values could be Add/DeleteAll/DeleteOnly
> In my orchestration, after receiving the XML file, I have an expression

shape that would assign these values into variables. After that I have a
decide shape that would decide on calling a sub orchestration based on the
actionTobePerformed values. To achieve this, I made this actionTobePerformed
attribute to be a distinguisehd property.
>
> Each action can be performed in different combinations of locations. For

example Add can be done in C:\ or D:\ or both C:\ and D:\. Each location is
represented as a separate TAG i my XML file with attribute name whose value
could be C:\ or D:
> Now to decide on the location I ned to promote this name attribute. But

this name attribute is getting repeated for different locations in the XML
aschema.
>
> How will I promote / make name attribute as a distinguised property under

each node so that I would decide on the location.
>
>



Christof

2004-04-24, 12:34 pm

Perhaps the most easy solution to this is building a little "helper" .NET
component that suits your needs.

further: see inline please

Kind regards,
Christof

"Matt Milner" <matt.milner@m3technologypartners dot com> wrote in message
news:Ousw2QUKEHA.1348@TK2MSFTNGP12.phx.gbl...
> You can't promote a repeating property, but here is what you can do:
>
> Take the small part of your message that you are interested in working

with
> (your repeating record) and define that as a schema unto itself.
> Mark the item you are interested in as a distinguished property.
> Now pull out the part of your message that matches the schema above (in

your
> orchestration) and then use this message to get the distinguished

property.
>
> I'm not 100% sure htis will work without testing it. The distinguished
> property might not get promoted the way it needs to since there is no
> pipeline involved.


I believe, as soon as your orchestration has a reference to that "smaller"
schema, the assign message shape will do the job for you. (Not sure
however, please post results back.)

So, the other option would be to make the smaller part
> you are interested in a message within an envelope. Then your

orchestration
> gets called for each repeating element and you can work with the
> distinguished property that way.
>
> Another thing to think about would be avoiding your main orchestration all
> together. Your sub orchestrations can all have receives on them and put a
> filter on the receive so that your "add" orchestration gets the add

message.
> Now you can do some looping in your orchestration. You can use the XPath
> function in your expression shapes or assighment shapes to get out the
> values you want. See the link below in your help for more information.
>
> ms-help://BTS_2004/SDK/htm/ebiz_prog_orch_doho.htm
>
> Enough rambling from me, hopefully one of these or a combination help you
> out.
>
> Matt
>
> "Shyamalal" <anonymous@discussions.microsoft.com> wrote in message
> news:329E3F29-70B8-44FF-9EE7-C41C36625D9E@microsoft.com...
between[vbcol=seagreen]
> Distinguised Property and a Promoted Property.
> actionTobePerformed. The values could be Add/DeleteAll/DeleteOnly
> shape that would assign these values into variables. After that I have a
> decide shape that would decide on calling a sub orchestration based on the
> actionTobePerformed values. To achieve this, I made this

actionTobePerformed
> attribute to be a distinguisehd property.
> example Add can be done in C:\ or D:\ or both C:\ and D:\. Each location

is
> represented as a separate TAG i my XML file with attribute name whose

value
> could be C:\ or D:
> this name attribute is getting repeated for different locations in the XML
> aschema.
under[vbcol=seagreen]
> each node so that I would decide on the location.
>
>



Shyamalal

2004-04-25, 12:35 am

Hi Matt and Christof

Thanks for your responses. I would try that smaller fragment and get back toy ASAP. Logicaslly seems to work. But
I have a quick question here.

I have a big schema in which these smaller schemas are going to be part.

Now when I input, I would give only a XML file that resembles my bigger schema rather main schema.
In that case how referring smaller schema in my orchestration would get the values?

Am I clear?

Thanks in advance
Shyamalal

2004-04-25, 6:34 am

Christof

You were saying we can use a .Net Helper class here.

You mean to say that calling a .Net method from an orchestration?
How it would be useful for making the decision?

Also Matt

I cannot use Filter condition as you had suggested because, how will I handle other scenarios like DELETE. Update etc.,

Thanks in advance
Christof

2004-04-25, 10:35 am

The .NET component has access to each and every data/context that is part of
your message. The component could easily load it into a DOM and do some
XPath expressions for example to tell the orchestration what to do.

Regards,
Christof


"Shyamalal" <anonymous@discussions.microsoft.com> wrote in message
news:EE020C93-B366-426C-AF47-D06392CD16C3@microsoft.com...
> Christof
>
> You were saying we can use a .Net Helper class here.
>
> You mean to say that calling a .Net method from an orchestration?
> How it would be useful for making the decision?
>
> Also Matt
>
> I cannot use Filter condition as you had suggested because, how will I

handle other scenarios like DELETE. Update etc.,
>
> Thanks in advance



Matt Milner

2004-04-25, 9:36 pm

Inline
"Shyamalal" <anonymous@discussions.microsoft.com> wrote in message
news:EE020C93-B366-426C-AF47-D06392CD16C3@microsoft.com...
> Christof
>
> You were saying we can use a .Net Helper class here.
>
> You mean to say that calling a .Net method from an orchestration?
> How it would be useful for making the decision?
>
> Also Matt
>
> I cannot use Filter condition as you had suggested because, how will I

handle other scenarios like DELETE. Update etc.,

Each scenario has its own orchestration as I understood your original post.
You were splitting the message out with an expression and decide shapes. If
you get rid of the main orchestration, you can put a filter on the
individual orchestrations so they get the appropriate message. So the "add"
orchestration gets "add" messages and the "delete" orchestration gets
"delete" messages.




>
> Thanks in advance



Matt Milner

2004-04-25, 9:36 pm

If you use envelopes then your orchestration only gets the smaller message.

If you get the whole message and then want to pull it apart in your
orchestration, you can use XPath to get out the part you want or use a
component, as Christof mentioned to get out the smaller part. If the
envelope way works for you, then it might be easier to deal with.

Matt


"Shyamalal" <anonymous@discussions.microsoft.com> wrote in message
news:584827E1-DFDA-40B8-90BF-629CAF5F14A4@microsoft.com...
> Hi Matt and Christof
>
> Thanks for your responses. I would try that smaller fragment and get back

toy ASAP. Logicaslly seems to work. But
> I have a quick question here.
>
> I have a big schema in which these smaller schemas are going to be part.
>
> Now when I input, I would give only a XML file that resembles my bigger

schema rather main schema.
> In that case how referring smaller schema in my orchestration would get

the values?
>
> Am I clear?
>
> Thanks in advance



Shyamalal

2004-04-26, 11:38 am

Matt

Thanks. You are right, I do use an expression and decide shapes to call each sub action oriented
sub orchestrations using Call Orchestration shape. Each of these call shapes reside in the main orchestration.

How will I get rid of this main orchestration?

Do you mean that I need to do Direct binding from receive port - this will inject messages into MsgBox and then I should have a separate orchestrations with receive shape and filtering property enabled individually for each action


If I understabnd correctly I should have 3 sub orchestrations with a receive shape and each of receive shape's
filter property set to each sub action. Am I right?


Shyamalal

2004-04-26, 11:38 am

Christof / Matt

Any XPath Expression sample available for reference?


Shyamalal

2004-04-26, 11:38 am

Matt
Sorry, you had given me a link for XPath already. Will look into that
Matt Milner

2004-04-26, 11:35 pm

You have only three orchestrations. Each has a receive port with its
activate property set to true and filter expression to only get messages
with the action it is interested in. Then there is no need for what is now
your main orchestration.

so yes, I think you are right.

Matt


"Shyamalal" <anonymous@discussions.microsoft.com> wrote in message
news:318938C8-1646-4205-8876-A5B1E78AF55D@microsoft.com...
> Matt
>
> Thanks. You are right, I do use an expression and decide shapes to call

each sub action oriented
> sub orchestrations using Call Orchestration shape. Each of these call

shapes reside in the main orchestration.
>
> How will I get rid of this main orchestration?
>
> Do you mean that I need to do Direct binding from receive port - this will

inject messages into MsgBox and then I should have a separate orchestrations
with receive shape and filtering property enabled individually for each
action
>
>
> If I understabnd correctly I should have 3 sub orchestrations with a

receive shape and each of receive shape's
> filter property set to each sub action. Am I right?
>
>



Shyamalal

2004-04-27, 9:36 am

Christof

I successfully created a .Net helper component and load the XML schema and got the required values and it would return
the string as an array (array would contain a max of 3 values).

Now I have a problem in my expression shape that how will I assign each content into 3 distinct BizTalk variables, so that
I can use these in my decide shape for further processing.

Thanks in advance
Christof

2004-04-27, 3:35 pm

Can you use a loop for this? Return a custom enumerator from your function
call for example.

Regard,s
Christof
"Shyamalal" <anonymous@discussions.microsoft.com> wrote in message
news:6852896E-427F-4C69-B59A-BEECCEF9640C@microsoft.com...
> Christof
>
> I successfully created a .Net helper component and load the XML schema and

got the required values and it would return
> the string as an array (array would contain a max of 3 values).
>
> Now I have a problem in my expression shape that how will I assign each

content into 3 distinct BizTalk variables, so that
> I can use these in my decide shape for further processing.
>
> Thanks in advance



Shyamalal

2004-04-29, 8:36 am

Matt

I have a quick doubt. There is a possibility that my input message may contain all the 3 actions. In that case all of my 3 orchestrations has to start and work fine parallely.

Will that happen?

Thanks in advance
Matt Milner

2004-04-29, 11:36 am

No, in that case, you do probably need to have a main orchestration that
would pull those actions out and send them. The other option is to setup an
envelope and have each of those action nodes be a message. Then you can
have a pipeline component that would pull them apart and send each one into
the messagebox as an independent message. Then you could have your
independent orchestrations and not need a parent.

Matt


"Shyamalal" <anonymous@discussions.microsoft.com> wrote in message
news:C8BA5341-76D1-4432-BCE8-D7FDB0969711@microsoft.com...
> Matt
>
> I have a quick doubt. There is a possibility that my input message may

contain all the 3 actions. In that case all of my 3 orchestrations has to
start and work fine parallely.
>
> Will that happen?
>
> Thanks in advance



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com