Re: BizTalk 2004 :: Fact retriever :: more than 1 data connection? How?
- From: "BA" <biztalk.architect@xxxxxxxxx>
- Date: Tue, 17 May 2005 18:29:10 +0200
Matt,
Ha ha, I wrote out the very same code you mentioned below and scrubbed it.
I thought "no way its just the assert statement that the engine cares about"
So, in truth, it then is the assert statement which activates the facts
Thanks for the other options. I'm quite new to this so I want to sample a
few things so I can test performance.
BA
"Matt Milner" <matt.milner@m3technologypartners dot com> wrote in message
news:uL9TG9uWFHA.3320@xxxxxxxxxxxxxxxxxxxxxxx
> Simply create and assert more than one dataconnection. If you are using
> the same database, you can reuse the SqlConnection like so:
>
> DataConnection dc1 =
>> new DataConnection("foo", "fum", con1);
>> Dataconnection dc2 = new DataConnection("bar", "bum", con1);
>> engine.Assert(dc1);
> engine.Assert(dc2);
>
> It is not the return value that gets entered intot the engine for
> execution, the factsHandleOut is your handle to know whether to refresh
> the facts. This is a little confusing, I know and it is a shame that most
> samples show the connection being handed back.
>
> You can also create another sql connection, wrap it with the second data
> connection and assert that. Similarly, if you are asserting
> datatable/datarow facts, you can use the sql connection to retrieve those
> and assert them.
>
> Matt
>
>
>
> "BA" <biztalk.architect@xxxxxxxxx> wrote in message
> news:1116329399.521056.291710@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>> Hello,
>>
>> In the code below you set a single data connection for a single DB
>> table.
>>
>> I have many data connections to add, how do you extend this sample to
>> add more than 1 data connection?
>> public class DbFactRetriever : IFactRetriever
>> {
>>
>> public object UpdateFacts(RuleSetInfo rulesetInfo,
>> Microsoft.RuleEngine.RuleEngine engine,
>> object factsHandleIn)
>>
>> {
>> object factsHandleOut;
>>
>> SqlConnection con1 = new
>> SqlConnection("Initial Catalog=foo;
>> Data Source=(local);Integrated Security=SSPI;");
>>
>> DataConnection dc1 =
>> new DataConnection("foo", "fum", con1);
>>
>> engine.Assert(dc1);
>> factsHandleOut = dc1;
>> }
>> return factsHandleOut;
>> }
>>
>>
>> I'm still learning C# so any help would be greatly appreciated.
>>
>> Thanks!
>>
>> BA
>>
>
>
.
- References:
- Prev by Date: Re: BizTalk 2004 :: Business Rules Engine :: best way to pass data sets in?
- Next by Date: Re: BizTalk 2004 :: Business Rules Engine :: best way to pass data sets in?
- Previous by thread: Re: BizTalk 2004 :: Fact retriever :: more than 1 data connection? How?
- Next by thread: Re: BizTalk 2004 :: Fact retriever :: more than 1 data connection?
- Index(es):
Relevant Pages
|