|
Home > Archive > BizTalk Server Orchestration > January 2005 > Business Rules Question
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 |
Business Rules Question
|
|
|
| I need to determine if a particular value in an XML element is NOT in a
table in our SQL Server Database.
In this case, I need to determine if a profit center is in our database, and
if it isn't, I need to set an XML element value to "false."
The business rule I created looks like the following:
IF
NOT
AND
XREFTable.PROFIT_CENTER_ID is equal to
[namespace]./Invoice/ProfitCenter
XREFTable.CLIENT_ID is equal to 'PRL300'
THEN
[namespace]./Invoice/ProfitCenterValid = 'False'
When I test this rule, the rules engine locks up on me. Is there something
I am unaware of?
Chris
| |
| Matt Milner 2005-01-11, 5:53 pm |
| Use SQLProfiler to check the SQL that is getting run. If I remember right,
the NOT operator does not work like you think it will with this type of
check against SQL. I had to do some work around to check this by
encapsulating the check in a .Net class. I think this is the same type of
thing I was doing, but not sure.
matt
"Chris" <cahale@shellopus.com> wrote in message
news:OsrNT0C%23EHA.3120@TK2MSFTNGP12.phx.gbl...
>I need to determine if a particular value in an XML element is NOT in a
> table in our SQL Server Database.
>
> In this case, I need to determine if a profit center is in our database,
> and
> if it isn't, I need to set an XML element value to "false."
>
> The business rule I created looks like the following:
>
> IF
> NOT
> AND
> XREFTable.PROFIT_CENTER_ID is equal to
> [namespace]./Invoice/ProfitCenter
> XREFTable.CLIENT_ID is equal to 'PRL300'
>
>
> THEN
> [namespace]./Invoice/ProfitCenterValid = 'False'
>
>
> When I test this rule, the rules engine locks up on me. Is there
> something
> I am unaware of?
>
> Chris
>
>
>
>
| |
|
| So you created a .NET Class method that made the call to the database
instead of the rules engine making the call?
Chris
"Matt Milner" <matt.milner@m3technologypartners dot com> wrote in message
news:OoLkTWD%23EHA.3472@TK2MSFTNGP14.phx.gbl...
> Use SQLProfiler to check the SQL that is getting run. If I remember right,
> the NOT operator does not work like you think it will with this type of
> check against SQL. I had to do some work around to check this by
> encapsulating the check in a .Net class. I think this is the same type of
> thing I was doing, but not sure.
>
> matt
>
>
> "Chris" <cahale@shellopus.com> wrote in message
> news:OsrNT0C%23EHA.3120@TK2MSFTNGP12.phx.gbl...
>
>
| |
| Matt Milner 2005-01-12, 8:46 pm |
| Correct. We created a method that took in the id and returned an indicator
as to whether it existed. I think we did some caching of the connection as
well but it has been a while.
matt
"Chris" <cahale@shellopus.com> wrote in message
news:%23Gv6GwL%23EHA.2112@TK2MSFTNGP10.phx.gbl...
> So you created a .NET Class method that made the call to the database
> instead of the rules engine making the call?
>
> Chris
>
> "Matt Milner" <matt.milner@m3technologypartners dot com> wrote in message
> news:OoLkTWD%23EHA.3472@TK2MSFTNGP14.phx.gbl...
>
>
|
|
|
|
|