BizTalk Server Tools - Cumulative Condtional Functoid

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Tools > March 2004 > Cumulative Condtional Functoid





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 Cumulative Condtional Functoid
Adam

2004-02-08, 8:43 am

Here is a sample XML instance
<Availability_V1>
<Identification PurchaserIDNumber="1008" UserName="RICKMOLICA"
FromOrgID="C" DateCreated="20031022">
<Item ItemIDNo="1199" ItemDescription="x" PurchaserItemIDNo="253510"
PurchaserItemDescription="0">
<ShipWeek ShipWeek="200404" StartWeek="200340" HoldWeeks="5">
<RecordType RecordType="AA" UnitsAvailable="1" QtyAvailable="10"
OrderNumber="0" />
<RecordType RecordType="BA" UnitsAvailable="2" QtyAvailable="20"
OrderNumber="" />
<RecordType RecordType="PR" UnitsAvailable="3" QtyAvailable="30"
OrderNumber="" />
</ShipWeek>
<ShipWeek ShipWeek="200404" StartWeek="200352" HoldWeeks="">
<RecordType RecordType="AA" UnitsAvailable="1" QtyAvailable="11"
OrderNumber="" />
<RecordType RecordType="BA" UnitsAvailable="2" QtyAvailable="21"
OrderNumber="" />
<RecordType RecordType="PR" UnitsAvailable="3" QtyAvailable="31"
OrderNumber="" />
</ShipWeek>
<ShipWeek ShipWeek="200406" StartWeek="200401" HoldWeeks="">
<RecordType RecordType="AA" UnitsAvailable="1" QtyAvailable="12"
OrderNumber="" />
<RecordType RecordType="BA" UnitsAvailable="2" QtyAvailable="22"
OrderNumber="" />
<RecordType RecordType="PR" UnitsAvailable="3" QtyAvailable="32"
OrderNumber="" />
</ShipWeek>
</Item>
<Item ItemIDNo="2284" ItemDescription="y" PurchaserItemIDNo="0"
PurchaserItemDescription="Unable to map">
<ShipWeek ShipWeek="200414" StartWeek="200404" HoldWeeks="5">
<RecordType RecordType="AA" UnitsAvailable="2" QtyAvailable="20"
OrderNumber="0" />
<RecordType RecordType="BA" UnitsAvailable="3" QtyAvailable="30"
OrderNumber="" />
<RecordType RecordType="PR" UnitsAvailable="4" QtyAvailable="40"
OrderNumber="" />
</ShipWeek>
</Item>
</Identification>
</Availability_V1>

Here is what I want to do:

Within each ItemIDNo loop


While Shipweek <= Current Week
If RecordType = AA cumulate the value for Qty as AAQTY

If RecordType = BA cumulate the value for Qty as BRQTY

If RecordType = PR cumulate the value for Qty as PRQTY

Wend


Map AAQTY to GeneralAvailabilityQty (found in dest. doc)

Map BRQTY to BlanketQty (found in dest. doc)

Map PRQTY to PurchaserReserveQty (found in dest. doc)

I can calculate the current week, but how can I map the AAQTY and
BRQTY and PRQTY to the dest doc? I am having difficutly
conceptualizing how to distinguish 3 seperate sums and map them
accordingly.

The relevant section of the destination doc look like this:
....
<Item GeneralAvailabiltiyQty="" BlanketQty="" PurchaserReserveQty = ""
/>
....

Thoughts and advice are appreciated.


Adam
Jan Eliasen

2004-02-08, 8:43 am

On 26 Jan 2004 10:45:53 -0800, akarchm01_nospam@yahoo.com (Adam)
wrote:

Can't you have three logical-equals functoid that each has RecordType
as input and then also a constant (AA, BA, PR). Connect the output to
three value mappening functoids and let the value
mappening-second-input be the sum you have counted. Let the output
from the valuemappening functoids be the correct field in the output.

>Here is a sample XML instance
> <Availability_V1>
> <Identification PurchaserIDNumber="1008" UserName="RICKMOLICA"
>FromOrgID="C" DateCreated="20031022">
> <Item ItemIDNo="1199" ItemDescription="x" PurchaserItemIDNo="253510"
>PurchaserItemDescription="0">
> <ShipWeek ShipWeek="200404" StartWeek="200340" HoldWeeks="5">
> <RecordType RecordType="AA" UnitsAvailable="1" QtyAvailable="10"
>OrderNumber="0" />
> <RecordType RecordType="BA" UnitsAvailable="2" QtyAvailable="20"
>OrderNumber="" />
> <RecordType RecordType="PR" UnitsAvailable="3" QtyAvailable="30"
>OrderNumber="" />
> </ShipWeek>
> <ShipWeek ShipWeek="200404" StartWeek="200352" HoldWeeks="">
> <RecordType RecordType="AA" UnitsAvailable="1" QtyAvailable="11"
>OrderNumber="" />
> <RecordType RecordType="BA" UnitsAvailable="2" QtyAvailable="21"
>OrderNumber="" />
> <RecordType RecordType="PR" UnitsAvailable="3" QtyAvailable="31"
>OrderNumber="" />
> </ShipWeek>
> <ShipWeek ShipWeek="200406" StartWeek="200401" HoldWeeks="">
> <RecordType RecordType="AA" UnitsAvailable="1" QtyAvailable="12"
>OrderNumber="" />
> <RecordType RecordType="BA" UnitsAvailable="2" QtyAvailable="22"
>OrderNumber="" />
> <RecordType RecordType="PR" UnitsAvailable="3" QtyAvailable="32"
>OrderNumber="" />
> </ShipWeek>
> </Item>
> <Item ItemIDNo="2284" ItemDescription="y" PurchaserItemIDNo="0"
>PurchaserItemDescription="Unable to map">
> <ShipWeek ShipWeek="200414" StartWeek="200404" HoldWeeks="5">
> <RecordType RecordType="AA" UnitsAvailable="2" QtyAvailable="20"
>OrderNumber="0" />
> <RecordType RecordType="BA" UnitsAvailable="3" QtyAvailable="30"
>OrderNumber="" />
> <RecordType RecordType="PR" UnitsAvailable="4" QtyAvailable="40"
>OrderNumber="" />
> </ShipWeek>
> </Item>
> </Identification>
> </Availability_V1>
>
>Here is what I want to do:
>
>Within each ItemIDNo loop
>
>
>While Shipweek <= Current Week
> If RecordType = AA cumulate the value for Qty as AAQTY
>
> If RecordType = BA cumulate the value for Qty as BRQTY
>
> If RecordType = PR cumulate the value for Qty as PRQTY
>
>Wend
>
>
>Map AAQTY to GeneralAvailabilityQty (found in dest. doc)
>
>Map BRQTY to BlanketQty (found in dest. doc)
>
>Map PRQTY to PurchaserReserveQty (found in dest. doc)
>
>I can calculate the current week, but how can I map the AAQTY and
>BRQTY and PRQTY to the dest doc? I am having difficutly
>conceptualizing how to distinguish 3 seperate sums and map them
>accordingly.
>
>The relevant section of the destination doc look like this:
>...
><Item GeneralAvailabiltiyQty="" BlanketQty="" PurchaserReserveQty = ""
>/>
>...
>
>Thoughts and advice are appreciated.
>
>
>Adam


--
Jan Eliasen, representing himself and not the company he works for.
MCP in Microsoft BizTalk Server
Tan Bao Nguyen

2004-03-26, 2:14 pm

Adam,

Could you include your schemas, map, and an instance input file?

Thanks,
Tan Nguyen
Microsoft BizTalk Server

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------[color=darkred]
18:45:53 GMT)[color=darkred]
cpmsftngxa07.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.su
l.t-online.de!t-online.de!newsfeed.icl.net!newsfeed.fjserv.net!news.maxwell.
syr.edu!postnews1.google.com!not-for-mail[color=darkred]

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com