BizTalk Server General - BizTalk 2004 Rule Engine Fact Retriever Problem

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > June 2005 > BizTalk 2004 Rule Engine Fact Retriever Problem





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 BizTalk 2004 Rule Engine Fact Retriever Problem
BlueDolphin

2005-05-31, 7:47 am

Hello To all BizTalk Gurus,
I'm new to BizTalk, any help is greatly appreciated for the question below.

I'm trying to run the rules policy from my biztalk orchestration. But the
rules policy requires lookup from more than 1 tables.
Hence, I tried executing the assert statement twice so that my rules policy
can go to different tables in the database to grab the data, but I
encountered the error:

Microsoft.RuleEngine.PolicyExecutionException: An exception occurred inside
the rule engine instance executing policy
"EMRXServiceInterchangeEngineRulesPolicy". --->
Microsoft.RuleEngine.RuleEngineArgumentNullException: The value of argument
"newXml" cannot be null.
at Microsoft.RuleEngine.Rete.Rete.ProcessException(Exception ex)
at Microsoft.RuleEngine.Rete.Rete.ExecuteInternal(Object facts, Object
data)
at Microsoft.RuleEngine.Rete.Rete.ProcessingLoop(Operation operation,
Object facts, Object data, EngineState nextState)
at Microsoft.RuleEngine.Rete.Rete.Execute(Object facts)
at Microsoft.RuleEngine.Policy.ExecuteInternal(Object facts)
--- End of inner exception stack trace ---
at Microsoft.RuleEngine.Policy.ExecuteInternal(Object facts)
at Microsoft.RuleEngine.Policy.Execute(Object facts)
at Microsoft.RuleEngine.Policy.Execute(Object[] facts)
at
EMRX.Orchestration.ServiceInterchangeEngine.EMRXServiceInterchangeOrchestration.segment3(StopConditions stopOn)
at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s,
StopConditions stopCond, Exception& exp)
Microsoft.RuleEngine.PolicyExecutionException

Below is the updatefact method from my fact retriever class that I try to
get the rules policy to look up from different tables.

public object UpdateFacts (RuleSetInfo ruleSetInfo, RuleEngine engine,
object factsHndlIn)
{
object factsHndlOut = null;
// The following logic asserts the required DB rows only once.
// The initial values (cached during the first retrieval) are returned in
subsequent execution cycles
if (factsHndlIn == null)
{
SqlConnection con1;
DataConnection dc1, dc2;

con1 = new SqlConnection( "Data Source=(local);Initial
Catalog=EMRX;UID=sa;Pwd=pass@word1;");
dc1 = new DataConnection( "EMRX", "PublishedServicesList", con1);
engine.Assert( dc1);
dc2 = new DataConnection( "EMRX", "ServicesSubscription", con1);
engine.Assert( dc2);
factsHndlOut = dc2;
}
else
{
factsHndlOut = factsHndlIn;
}
return factsHndlOut;
}

But if I remove away the two lines
dc2 = new DataConnection( "EMRX", "ServicesSubscription", con1);
engine.Assert( dc2);
the policy would runs properly but only from 1 table lookup, meaning that
rules that lookup from other tables are not run.

Appreciate if any of you could enlighten me on the missing link.

Thanks.

Regards,
Desmond
Matt Milner

2005-06-02, 5:51 pm

What happens if you only use dc2? Are you sure the problem is not so much
your second connection?

Thanks,
Matt


"BlueDolphin" <BlueDolphin@discussions.microsoft.com> wrote in message
news:D5A787FB-1760-4518-8CA9-7F91D796AE97@microsoft.com...
> Hello To all BizTalk Gurus,
> I'm new to BizTalk, any help is greatly appreciated for the question
> below.
>
> I'm trying to run the rules policy from my biztalk orchestration. But the
> rules policy requires lookup from more than 1 tables.
> Hence, I tried executing the assert statement twice so that my rules
> policy
> can go to different tables in the database to grab the data, but I
> encountered the error:
>
> Microsoft.RuleEngine.PolicyExecutionException: An exception occurred
> inside
> the rule engine instance executing policy
> "EMRXServiceInterchangeEngineRulesPolicy". --->
> Microsoft.RuleEngine.RuleEngineArgumentNullException: The value of
> argument
> "newXml" cannot be null.
> at Microsoft.RuleEngine.Rete.Rete.ProcessException(Exception ex)
> at Microsoft.RuleEngine.Rete.Rete.ExecuteInternal(Object facts, Object
> data)
> at Microsoft.RuleEngine.Rete.Rete.ProcessingLoop(Operation operation,
> Object facts, Object data, EngineState nextState)
> at Microsoft.RuleEngine.Rete.Rete.Execute(Object facts)
> at Microsoft.RuleEngine.Policy.ExecuteInternal(Object facts)
> --- End of inner exception stack trace ---
> at Microsoft.RuleEngine.Policy.ExecuteInternal(Object facts)
> at Microsoft.RuleEngine.Policy.Execute(Object facts)
> at Microsoft.RuleEngine.Policy.Execute(Object[] facts)
> at
> EMRX.Orchestration.ServiceInterchangeEngine.EMRXServiceInterchangeOrchestration.segment3(StopConditions
> stopOn)
> at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s,
> StopConditions stopCond, Exception& exp)
> Microsoft.RuleEngine.PolicyExecutionException
>
> Below is the updatefact method from my fact retriever class that I try to
> get the rules policy to look up from different tables.
>
> public object UpdateFacts (RuleSetInfo ruleSetInfo, RuleEngine engine,
> object factsHndlIn)
> {
> object factsHndlOut = null;
> // The following logic asserts the required DB rows only once.
> // The initial values (cached during the first retrieval) are returned in
> subsequent execution cycles
> if (factsHndlIn == null)
> {
> SqlConnection con1;
> DataConnection dc1, dc2;
>
> con1 = new SqlConnection( "Data Source=(local);Initial
> Catalog=EMRX;UID=sa;Pwd=pass@word1;");
> dc1 = new DataConnection( "EMRX", "PublishedServicesList", con1);
> engine.Assert( dc1);
> dc2 = new DataConnection( "EMRX", "ServicesSubscription", con1);
> engine.Assert( dc2);
> factsHndlOut = dc2;
> }
> else
> {
> factsHndlOut = factsHndlIn;
> }
> return factsHndlOut;
> }
>
> But if I remove away the two lines
> dc2 = new DataConnection( "EMRX", "ServicesSubscription", con1);
> engine.Assert( dc2);
> the policy would runs properly but only from 1 table lookup, meaning that
> rules that lookup from other tables are not run.
>
> Appreciate if any of you could enlighten me on the missing link.
>
> Thanks.
>
> Regards,
> Desmond



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com