Functoids
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > BizTalk Server > BizTalk Server General > Functoids




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Functoids  
Guru


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-24-04 12:34 PM

All

I understand from MSDN documentation that functoids can be used in a mapper 
when we have a well defined destination schema.

I have a situation like this. I would get repeated number of times a record 
or node in my XML schema.
The corresponding node in my destination schema has to occur only once but w
ith all the values . Say for
example, I have a node called Name in source schmea which is appearing 10 ti
mes. My requirement is that
I need to have only one NAME node in my destination schema but with all the 
10 values separated by a SPACE.

Also if any of the value is NULL, then I need to do a DB lookup and fetch de
fault name and add it to my
destination schema.

I know I can use of index functoids, but this may not be useful in above sce
nario. Am I right?

I think only scripting functoid is useful here. Any suggestions pls

Thanks





[ Post a follow-up to this message ]



    Re: Functoids  
Matt Milner


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-25-04 03:35 AM

Take a look at the custom functoid sample in the updated SDK.  The
"cumulative multiply" sample shows how you can do a cumulative functoid to
build up your output.

you might be able to do some other things with conditional functoids and the
db lookup functoid but I can't picture it in my head.

matt


"Guru" <anonymous@discussions.microsoft.com> wrote in message
news:BC1D1A7B-806B-4F99-962F-7D7AAAEFED69@microsoft.com...
> All
>
> I understand from MSDN documentation that functoids can be used in a
mapper when we have a well defined destination schema.
>
> I have a situation like this. I would get repeated number of times a
record or node in my XML schema.
> The corresponding node in my destination schema has to occur only once but
with all the values . Say for
> example, I have a node called Name in source schmea which is appearing 10
times. My requirement is that
> I need to have only one NAME node in my destination schema but with all
the 10 values separated by a SPACE.
>
> Also if any of the value is NULL, then I need to do a DB lookup and fetch
default name and add it to my
> destination schema.
>
> I know I can use of index functoids, but this may not be useful in above
scenario. Am I right?
>
> I think only scripting functoid is useful here. Any suggestions pls
>
> Thanks







[ Post a follow-up to this message ]



    Re: Functoids  
Guru


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-25-04 07:34 AM

Hi Matt

Thanks for your inputs.

But how will I run the sameple. I am able to follow till adding it as a cust
om functoid in the mapper toolbox. AFter that how would I use the same to ge
t the result and see it.

Well I have one more question.

As I said in my post, suppose if I have 10 nodes on my souce schema say Name
 node coming as 10 times, how to make all the 10 Name noded appearing on the
 destination schema. For example

Source Schmea                                 Destination Schema

<Name>Guru1</Name>                    Name[0].value = Guru
<Name>Sample1</Name>                Name[1].value = Sample1
<Name>Sample2</Name>                Name[2].value = Sample2

The above example shows that depending on number of Name nodes in my source 
schme, that many number of Name nodes with index have to be created in my de
stination schema.

1) First of all how will I create such a destination schemain BTS 2004? Utmo
st I can make Name node to appear as unbound. But how will I add index as sh
own above in my destination schema?






[ Post a follow-up to this message ]



    Re: Functoids  
Guru


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-25-04 08:35 AM

Matt

How will I distribute my Custom Functoids when I deploy my project or soluti
on at my client's location?






[ Post a follow-up to this message ]



    Re: Functoids  
Guru


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-25-04 11:34 AM

Matt

I think the cumlative multiple custom functoid would retun a single output, 
which I do not want.
I need all the values but under a single tag separated by a SPACE.

Thanks in advance





[ Post a follow-up to this message ]



    Re: Functoids  
Matt Milner


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-26-04 02:36 AM

Sorry, I thought you were trying to put all the names into one output.

Not sure how you are going to define your destination schema so that you can
have those nodes, unless you use some "xmlany elements", then you'll be able
to add the nodes you want.  You could probably just use the scripting
functoid and do some simple XSLT that uses the index to output the element
you want.

In terms of deployment if your functoid exposes code that is not inline,
then you will need to deploy it into the GAC, otherwise, I believe
everything that is needed is included in the map so unless you need design
time experience, you wouldn't need to deploy it to the server, just
developer machines.


Matt



"Guru" <anonymous@discussions.microsoft.com> wrote in message
news:D2C79331-C66B-426E-BA9B-6B4992B0D70F@microsoft.com...
> Hi Matt
>
> Thanks for your inputs.
>
> But how will I run the sameple. I am able to follow till adding it as a
custom functoid in the mapper toolbox. AFter that how would I use the same
to get the result and see it.
>
> Well I have one more question.
>
> As I said in my post, suppose if I have 10 nodes on my souce schema say
Name node coming as 10 times, how to make all the 10 Name noded appearing on
the destination schema. For example
>
> Source Schmea                                 Destination Schema
>
> <Name>Guru1</Name>                    Name[0].value = Guru
> <Name>Sample1</Name>                Name[1].value = Sample1
> <Name>Sample2</Name>                Name[2].value = Sample2
>
> The above example shows that depending on number of Name nodes in my
source schme, that many number of Name nodes with index have to be created
in my destination schema.
>
> 1) First of all how will I create such a destination schemain BTS 2004?
Utmost I can make Name node to appear as unbound. But how will I add index
as shown above in my destination schema?
>







[ Post a follow-up to this message ]



    Re: Functoids  
Guru


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-26-04 01:35 PM

Matt

Thanks for your response.
As you said, I need the output in both the formats. Depending on a condition
, I need to have my destination containing elements as a single output and a
lso as a separate as shown in the example.

Is it best to go for a scripting functoid to achieve this?

Matt, is it possible to write a generic scripting functoid, to which I will 
pass a condition, depending on which it has to select the correct destinatio
n schema and convert that into a flat file?

Otherwise I need to write a script for each condition. Am I right?

Thanks in advance





[ Post a follow-up to this message ]



    Re: Functoids  
Matt Milner


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-27-04 04:35 AM

I'd say you CAN write a funcoid scripting component that would do this type
of work, but you'd need to have specified your message schema to support it.
you don't need to create a flat file in a map, you just need to map schema
to schema.  When the file is serialized out biztalk will handle converting
it from XML to a flat file (you might need to use the flat file assembler
for this to happen).

It sounds like you could easily use a decide shape in your orchestration and
then on each branch put a different map to get the output you want and send
it out.  Maybe I am missing the high points of your situation.

matt


"Guru" <anonymous@discussions.microsoft.com> wrote in message
news:66D5091C-9B77-45B6-8F05-FCC5E62286AF@microsoft.com...
> Matt
>
> Thanks for your response.
> As you said, I need the output in both the formats. Depending on a
condition, I need to have my destination containing elements as a single
output and also as a separate as shown in the example.
>
> Is it best to go for a scripting functoid to achieve this?
>
> Matt, is it possible to write a generic scripting functoid, to which I
will pass a condition, depending on which it has to select the correct
destination schema and convert that into a flat file?
>
> Otherwise I need to write a script for each condition. Am I right?
>
> Thanks in advance







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 02:58 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register