Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Business Rule Composer – custom .NET component
- This topic has 2 replies, 1 voice, and was last updated 9 years, 5 months ago by
community-content.
-
AuthorPosts
-
-
April 9, 2008 at 3:51 AM #19291
Hi.
I added a custom .net component so that it is available in the facts explorer. To test this I drag a test method (that only returns a string) on to the test panel, setting a db value to “test”. But this rule will not “fire”. When I remove the test method, the rule fires.
So the question is: How to develop and use a custom .NET component in a business rule?
-
April 9, 2008 at 12:33 PM #19295
i tried your scenario and faced the same issue. Could not figure out how it works. googled a lot, but no use. No help even in MSDN. let me know if you resolve it.
-
April 10, 2008 at 12:49 AM #19297
Hi.
This is good information:http://www.webservertalk.com/archive178-2004-10-440225.html
http://msdn2.microsoft.com/en-us/library/ms946833.aspx
http://www.cubido.at/Blog/tabid/176/EntryID/142/Default.aspx
Most of this is BT2004, but I think that also apply to BT2006.
I tried to develop my custom .net component the way it is described:
namespace Communicate.TimeDifference
{
//[Serializable]
public class TimeDifference : IFactCreator
{
public TimeDifference()
{}
public string PrintTestString()
{
return “Testing a custom .net component”;
}//Then we are supposed to add this code (thay say…), in the same class
public object[] CreateFacts(RuleSetInfo ruleSetInfo)
{
object[] o = new object[1];
o[0] = new Communicate.TimeDifference.TimeDifference();//your custom class here
return o;
}public Type[] GetFactTypes(RuleSetInfo ruleSetInfo)
{
Type[] t = new Type[1];
t[0] = new Communicate.TimeDifference.TimeDifference().GetType();
return t;
}}
}I compile, put it in the gac, anf then using the PrintTestString() in a rule. But it will not fire.
I think I am into something here. Are we suppose to use Assert in the rule?
I am going to do more research on this now, and will provide any useful info!
-
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.