Denzil Pinto 的个人资料TheBuzz照片日志列表 工具 帮助

日志


5月12日

Adding Functoid to a Map

This should be pretty interesting !. We are going to get started by creating a new BizTalk project file in Visual studio. Then we are going to create two new schemas
 
OrderItems
---------------
 
1. Right click on your project file and click on Add > Add New Item . Select Schema from the Templates provided and enter the name OrderItems.xsd and click on Open.
2. In the Schema Editor Right click on the Root Node and select Rename from the list and enter the name Order and press Enter.
3. Right Click on Order and select Insert Schema Node and select Child Field Element. Enter the name OrderID and press Enter. Again Right click on order and select Insert Schema node and select Child Field Element. Enter the name Description and press Enter.
4. Now we are going to add a new Child Record. Again Right click on Order and select Insert Schema Node and select Child Record, enter the name Unit and press Enter.
5. Follow the 3 step and create new Child Field Elements called UnitID, Description,TotalUnits,Price.
6. Now click on TotalUnits and right click and select properties, goto the DataType and select xs:int. Follow the same steps for the Price and select xs:int for the datatype.
7. We have now created our first schema
 
Now lets create our second schema called Purchase.xsd
 
Purchase
------------
 
1. Right Click on your project file and click on Add > Add New Item. Select Schema from the templates provided and enter the name Purchase.xsd and click on Open.
2. In the Schema Editor Right click on the Root Node and select Rename from the list and enter the name Purchase and press Enter.
3. Right Click on Purchase and select Insert Schema Node and select Child Field Element. Enter the name OrderID. Follow the same step and create another Child Field Element called Description.
4. Now add a new Child Record called Unit. To do that right click on Purchase node and select Insert Schema Node and select Child Record, enter the name Unit and press Enter.
5. Follow the 3 step and create new child field elements called Description, Units, Price and Total.
6. We have now created our second schema. The Total in this schema will be (Price X Units).
 
Map
-----
 
1. Now lets create a new Map call it OrderItemsToPurchasemap.btm. For that you need to right click on the project file and select Add > Add New Items and from the templates select map, enter the name "OrderItemsToPurchasemap.btm" and select open.
 
2. In the Mapper tool, click on open source schema and drilldown Schema and select Order Items and then click on Open Destination Schema and drilldown Schema and select Purchase.
 
3. Now click on OrderID in the Source Schema and then drag it across the grid to the destination field " OrderID" in the destination schema. Do the same for Description.
 
4. Click on Description the child field element from Unit and drag it across the grid to the destination field "Description" in the destination schema.
 
5. Click on TotalUnits and drag it acroos the grid to the destination field Units in the destination schema. Click on Price and drag it across the grid to the destination field Price in the destination schema.
 
Now we are going to add a functoid.
 
1.  If you dont have the Toolbox open Click on View > ToolBox.
 
2. Click on Mathematical Functoids and click on multiplication, drag and drop it on the grid portion of the mapper.
 
3. Click on TotalUnits in your source schema and drag and drop it to the multiplication functoid, do the same for Price.
 
4. Now right click on the multiplication functoid and select properties.
 
5. Enter a label for the functoid. If you click on Input Parameter and click on the ellipsis, you will see the two input parameters you have just selected ie Total Units and Price.
 
6. From the Toolbox select Advanced Functoids and click on Scripting functoid, drag and drop it to the grid.
 
7. Click on the multiplication functoid and drag and drop it to the Scripting Functoid.
 
Well just lets step back and see why we need a scripting functoid. The TotalUnits and Price have their datatypes set to xs:int or integer and Total in the destination Schema is a string. Total in the destination schema is the value of (TotalUnits X Price) in the source schema and that is what we accomplished by adding the multiplication functoid. Now we are adding the scripting functoid to convert the integer to a string.
 
8. Right Click on the Scripting functoid and select properties if you click on input parameters and click on the ellipsis you will find the multiplication functoid as the input parameter which means that the result of multiplying TotalUnits and Price is the input for the scripting functoid.
 
9. Now click on Script and click on the ellipsis again. From the Script type, select Inline C# and in the box provided below, type in the following function.
 
public string IntToString(int param1)
{
              return param1.ToString();
}
 
10. Click on OK.
 
11. Click on the Scripting Functoid and drag it to the Total in the destination Schema.
 
So thats it
 
 

评论 (1)

请稍候...
很抱歉,您输入的评论太长。请缩短您的评论。
您没有输入任何内容,请重试。
很抱歉,我们当前无法添加您的评论。请稍后重试。
若要添加评论,需要您的家长授予您相应权限。请求权限
您的家长禁用了评论功能。
很抱歉,我们当前无法删除您的评论。请稍后重试。
您已超过了一天之内允许提供的评论数上限。请在 24 小时后重试。
因为我们的系统表明您可能在向其他用户提供垃圾评论,您的帐户已禁用了评论功能。如果您认为我们错误地禁用了您的帐户,请联系 Windows Live 支持部门
完成下面的安全检查,您提供评论的过程才能完成。
您在安全检查中键入的字符必须与图片或音频中的字符一致。

若要添加评论,请使用您的 Windows Live ID 登录(如果您使用过 Hotmail、Messenger 或 Xbox LIVE,您就拥有 Windows Live ID)。登录


还没有 Windows Live ID 吗?请注册

没有名字发表:
wow gold!All wow gold US Server 24.99$/1000G on sell! Cheap wow gold,wow gold,wow gold,Buy Cheapest/Safe/Fast WoW US EU wow gold Power leveling wow gold from the time you World of Warcraft gold ordered! wow power leveling wow power leveling power leveling wow power leveling wow powerleveling wow power levelingcheap wow power leveling wow power leveling buy wow power leveling wow power leveling buy power leveling wow power leveling cheap power leveling wow power leveling wow power leveling wow power leveling wow powerleveling wow power leveling power leveling wow power leveling wow powerleveling wow power leveling buy rolex cheap rolex wow gold wow gold wow gold wow gold wow gold wow gold wow gold wow gold wow gold wow gold wow gold wow gold wow gold wow gold wow gold wow gold wow gold wow gold wow gold wow gold wow gold wow gold wow gold wow gold wow gold wow gold wow gold wow gold wow gold wow gold wow gold wow gold wow gold wow gold wow gold wow gold wow gold wow gold wow gold wow gold wow gold wow gold wow gold wow power leveling wow power leveling wow power leveling wow power leveling wow power leveling wow power leveling wow power leveling wow power leveling wow power leveling wow power leveling wow power leveling wow power leveling wow power leveling wow power leveling wow power leveling wow power leveling wow power leveling wow power leveling wow power leveling wow power leveling wow power leveling wow power leveling wow power leveling wow power leveling wow power leveling wow power leveling wow power leveling wow power leveling wow power leveling wow power leveling wow power leveling wow power leveling wow power leveling wow power leveling wow power leveling wow power leveling wow power leveling wow power leveling wow power leveling -103193341938408
6 月 19 日

引用通告

此日志的引用通告 URL 是:
http://denzilpinto.spaces.live.com/blog/cns!A2256C53CD2EC18E!188.trak
引用此项的网络日志