|
Home > Archive > BizTalk Server General > July 2004 > BizTalk 2004 Rule Composer - XML Schema Condition 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 Composer - XML Schema Condition Problem
|
|
| Senthil 2004-06-26, 10:51 am |
| Hi Guys,
I'm facing a problem in creating a rule and calling that from an
orchestration in BizTalk 2004 Rule Composer using XML Schemas.
I've the following XSD file.
<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns="http://BusinessRuleDemo.AccountOutputSchema"
xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
targetNamespace="http://BusinessRuleDemo.AccountOutputSchema"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="AccountInfo">
<xs:complexType>
<xs:sequence>
<xs:element name="ID" type="xs:string" />
<xs:element name="Name" type="xs:string" />
<xs:element name="Balance" type="xs:double" />
<xs:element name="StatusInfo" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
I added the schema in Facts explorer. When i dragged the element
Balance into the Conditions/Actions tab, I'm getting the following
expression.
"BusinessRuleDemo.AccountOutputSchema:/AccountInfo/Balance"
I feel the above condition must be like this
"BusinessRuleDemo.AccountOutputSchema:AccountInfo/Balance"
The Root node is not coming properly in the condition statement.
I think because of that my rule is not getting called from the
orchestration.
Can any one help me out to resolve the problem?
Thanks & Regards,
Senthil.
| |
| Alvaro Miranda [MSFT] 2004-06-26, 10:51 am |
| The expression looks correct. Have you changed the document type property
in the rule composer so that it matches the fully qualified name of the
schema from the BizTalk project? You can enable tracking of the policy in
HAT, to verify if the rule is being executed or not by the orchestration.
Also you may want to check if there is any error reported in the event
viewer.
--------------------[vbcol=seagreen]
06:03:11 GMT)[vbcol=seagreen]
cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.s
ul.t-online.de!t-online.de!news.glorb.com!postnews2.google.com!not-for-mail[vbcol=seagreen]
This posting is provided "AS IS" with no warranties, and confers no rights.
EBusiness Server Team
| |
| Senthil 2004-06-29, 8:57 am |
| Hi Alvaro,
Thanks for your reply.
I tried debugging the orchestration. The flow calls the business rule.
However I found that there's a problem with my business rule. I
tried testing the business rule with the sample xml file.
I see that "Conditions" are not executed at all.
However the business rule starts with "Operation: Assert" and ends
with "Operation: Retract". It's not calling the conditions.
I haven't seen any errors in the event viewer.
Can you pls. let me know what could be the problem?
If you want i can send the business rule and the sample file in my
next mail.
Thanks & Regards,
Senthil.
alvarom@online.microsoft.com (Alvaro Miranda [MSFT]) wrote in message news:<HXl8mevWEHA.328@cpmsftngxa10.phx.gbl>...
> The expression looks correct. Have you changed the document type property
> in the rule composer so that it matches the fully qualified name of the
> schema from the BizTalk project? You can enable tracking of the policy in
> HAT, to verify if the rule is being executed or not by the orchestration.
> Also you may want to check if there is any error reported in the event
> viewer.
>
> --------------------
> 06:03:11 GMT)
> cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.s
> ul.t-online.de!t-online.de!news.glorb.com!postnews2.google.com!not-for-mail
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> EBusiness Server Team
| |
| Alvaro Miranda [MSFT] 2004-06-29, 5:52 pm |
| Hi Senthil, no problem, please send if you can the rule definition and the
sample document. I assume it is also failing to execute when testing
through the Rule Composer?
--------------------[vbcol=seagreen]
<HXl8mevWEHA.328@cpmsftngxa10.phx.gbl>[vbcol=seagreen]
12:30:28 GMT)[vbcol=seagreen]
cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGP08.phx.gbl!news-out.cwi
x.com!newsfeed.cwix.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news
.glorb.com!postnews2.google.com!not-for-mail[vbcol=seagreen]
news:<HXl8mevWEHA.328@cpmsftngxa10.phx.gbl>...[vbcol=seagreen]
property[vbcol=seagreen]
in[vbcol=seagreen]
orchestration.[vbcol=seagreen]
cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.s[vbcol=seagreen]
ul.t-online.de!t-online.de!news.glorb.com!postnews2.google.com!not-for-mail[vbcol=seagreen]
rights.[vbcol=seagreen]
This posting is provided "AS IS" with no warranties, and confers no rights.
EBusiness Server Team
| |
| Alvaro Miranda [MSFT] 2004-07-01, 3:06 am |
| It seems the problem is that the xml document AccountInput doesn't match
the schema used to compose the rules (AccountOutputSchema.xsd). For
instance, the root element in the document is 'Account', but in the rule
definition it is called 'AccountInfo'. Also the target namespace doesn't
match (it is http://BusinessRuleDemo.InputSchema in the document, but
http://BusinessRuleDemo.OutputSchema in the rule).
So I believe you need to change the rules to use the input schema instead.
Another alternative is (assuming you have a map to transform AccountInput
into AccountOutput), you could keep the rules as they are and pass
AccountOutput for policy execution instead of AccountInput, as long as that
is done after the transformation is executed.
--------------------[vbcol=seagreen]
<HXl8mevWEHA.328@cpmsftngxa10.phx.gbl>
<4dce1b6a.0406290430.78bc7c39@posting.google.com>[vbcol=seagreen]
the[vbcol=seagreen]
wi[vbcol=seagreen]
ws[vbcol=seagreen]
rule.[vbcol=seagreen]
the[vbcol=seagreen]
policy[vbcol=seagreen]
event[vbcol=seagreen]
.s[vbcol=seagreen]
l[vbcol=seagreen]
This posting is provided "AS IS" with no warranties, and confers no rights.
EBusiness Server Team
| |
| Senthil 2004-07-05, 2:47 am |
| Hi Avalro,
Thanks for your reply. The input given to the Policy Testing wizard
is wrong. When i changed the message to the outputschema, the policy
test wizard worked fine. Thanks. However, i've passed the right
message to the orchestration. It was not working.
Then i changed both the schmea files. I changed all the elements
(ID, Name, Balance, Status, StatusInfo) to "Record" instead of "Child
Field Elements". Now the orchestration started working by calling the
rule. Can you pls. let me know why? Can't the root node have elements
directly instead of records?
The orchestration worked fine with elements when the orchestration
was not integrated with Rules. When i called the rule from the
orchestration, it stopped working. Now everything works fine with
"Record" nodes under the root node.
Awaiting for your reply.
Thanks & Regards,
Senthil.
alvarom@online.microsoft.com (Alvaro Miranda [MSFT]) wrote in message news:<8I5daOyXEHA.3748@cpmsftngxa06.phx.gbl>...
> It seems the problem is that the xml document AccountInput doesn't match
> the schema used to compose the rules (AccountOutputSchema.xsd). For
> instance, the root element in the document is 'Account', but in the rule
> definition it is called 'AccountInfo'. Also the target namespace doesn't
> match (it is http://BusinessRuleDemo.InputSchema in the document, but
> http://BusinessRuleDemo.OutputSchema in the rule).
> So I believe you need to change the rules to use the input schema instead.
> Another alternative is (assuming you have a map to transform AccountInput
> into AccountOutput), you could keep the rules as they are and pass
> AccountOutput for policy execution instead of AccountInput, as long as that
> is done after the transformation is executed.
>
> --------------------
> <HXl8mevWEHA.328@cpmsftngxa10.phx.gbl>
> <4dce1b6a.0406290430.78bc7c39@posting.google.com>
> the
> <HXl8mevWEHA.328@cpmsftngxa10.phx.gbl>
> 12:30:28 GMT)
> wi
> ws
> rule.
> news:<HXl8mevWEHA.328@cpmsftngxa10.phx.gbl>...
> property
> the
> policy
> in
> orchestration.
> event
> 06:03:11 GMT)
> .s
> l
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> EBusiness Server Team
| |
| Alvaro Miranda [MSFT] 2004-07-09, 3:30 pm |
| Hi Senthil, I'm glad to hear you have had progress. With regard to your
question, it should work fine with field elements. One reason I can think
of for it not to work is if the xml instance may not be 100% valid for the
schema used to define the rule terms, causing some xpath expression
evaluation to fail. Is it possible for you to send a sample xml and related
schema of the output message, for both cases (i.e. as records vs. as
element fields)?
thanks.
--------------------[vbcol=seagreen]
<HXl8mevWEHA.328@cpmsftngxa10.phx.gbl>
<4dce1b6a.0406290430.78bc7c39@posting.google.com>
<0RMIsZgXEHA.2900@cpmsftngxa06.phx.gbl>
<8I5daOyXEHA.3748@cpmsftngxa06.phx.gbl>[vbcol=seagreen]
06:57:46 GMT)[vbcol=seagreen]
cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-onlin
e.de!news.glorb.com!postnews2.google.com!not-for-mail[vbcol=seagreen]
news:<8I5daOyXEHA.3748@cpmsftngxa06.phx.gbl>...[vbcol=seagreen]
match[vbcol=seagreen]
rule[vbcol=seagreen]
doesn't[vbcol=seagreen]
instead.[vbcol=seagreen]
AccountInput[vbcol=seagreen]
that[vbcol=seagreen]
Problem[vbcol=seagreen]
and[vbcol=seagreen]
Problem[vbcol=seagreen]
ends[vbcol=seagreen]
my[vbcol=seagreen]
message[vbcol=seagreen]
of[vbcol=seagreen]
Problem[vbcol=seagreen]
2004[vbcol=seagreen]
microsoft.public.biztalk.general:16638[vbcol=seagreen]
from an[vbcol=seagreen]
element[vbcol=seagreen]
following[vbcol=seagreen]
statement.[vbcol=seagreen]
the[vbcol=seagreen]
rights.[vbcol=seagreen]
This posting is provided "AS IS" with no warranties, and confers no rights.
EBusiness Server Team
|
|
|
|
|