How to insert or delete rows directly from BRE Rules in BizTalk RFID 2009
-
Thursday, May 28, 2009 6:04 AMHello,
We are trying to insert or delete rows in database table directly from BRE Rules in BizTalk RFID 2009 Business Rule Composer tool.
We do not want to use a custom DLL and use its custom methods inside the Policy Rule to insert or delete data in Database. Also we do not want to use the VendorSpecificField and pass the data to the next Event Handler in the process pipeline which will be responsible for the data insertion or deletion.
Instead we directly want to assert a SQL connection and insert or delete rows by passing SQL query and SQl commands which will be written in the "THEN" section of a Rule inside the BizTalk Business Rule Composer tool. We need to know the required DBfacts as well which need to be passed through while calling the Policy.
Thanks & Regards,
Satya Subhajit Ghoshal
Cognizant
Answers
-
Thursday, May 28, 2009 12:59 PM
You can't directly execute SQL query in BRE's "THEN" section , instead you have to call some function with some argument which basically execute the query and update the row/column whatever you want .
So you need to pass one SQLConnection db fact, one .net object in which you have implemented CreateRow(...) , DeleteRow(...)...etc whatever functionality you want and XML fact if you are picking row name( which you want to add/delete) at runtime from XML file.
Saurabh Sharda- Marked As Answer by Satya.Ghoshal Monday, June 01, 2009 9:13 AM
All Replies
-
Thursday, May 28, 2009 12:59 PM
You can't directly execute SQL query in BRE's "THEN" section , instead you have to call some function with some argument which basically execute the query and update the row/column whatever you want .
So you need to pass one SQLConnection db fact, one .net object in which you have implemented CreateRow(...) , DeleteRow(...)...etc whatever functionality you want and XML fact if you are picking row name( which you want to add/delete) at runtime from XML file.
Saurabh Sharda- Marked As Answer by Satya.Ghoshal Monday, June 01, 2009 9:13 AM
-
Thursday, May 28, 2009 1:44 PM
Thanks Saurabh for your reply.
It would be of great help if you could provide us an example. If we create a rule in the Business Rule Composer and drag the custom methods from custom DLL in the facts explorer, how should we create an object of the class inside the rule in "THEN" section? If we need to use an "Assert" command, is there any sample rule which uses similar functionalities. Thanks in advance!
Thanks & Regards,
Satya Subhajit Ghoshal
Cognizant -
Tuesday, February 09, 2010 7:09 AMHey,
I am also looking for this info. If you have solved this or got some clue on how to proceed please share the same.
I am trying to insert the data into a DB where i will have around 4 columns through Biztalk BRE.
Thanks in advance for the help. -
Saturday, June 05, 2010 8:52 AM
Thanks Saurabh for your reply.
It would be of great help if you could provide an example. If we create a rule in the Business Rule Composer and drag the custom methods from custom DLL in the facts explorer, how should we create an object of the class inside the rule in "THEN" section? If we need to use an "Assert" command, is there any sample rule which uses similar functionalities. Thanks in advance!
Thanks & Regards,
Satya Subhajit Ghoshal
Cognizant
The same with Satya. It would be of great help if you could provide us an example.