------=_NextPart_0001_07525597
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Hi Salam,
This is a by design behavior. As you can see in BizTalk rule engine
samples, if we pragrammically call Policy.Execute or RuleEngine.Execute to
execute a policy, the result is filled into OuterXml of a TypedXmlDo***ent
object instead of overwriting the original do***ent directly. This is a
more flexible design since sometimes we don't want the original do***ent
to
be modified. If you need a output XML, simply writing the stream into a
file like below. As you've seen, the behavior of executing in rule
composer
and orchestration is different here. It will modify the input do***ent
directly.
//Execute Policy Tester
try
{
policyTester.Execute(doc1, dti);
}
catch (Exception e)
{
System.Console.WriteLine(e.ToString());
}
FileInfo f = new FileInfo("LoanPocessingResults.xml");
StreamWriter w = f.CreateText();
w.Write(doc1.Do***ent.OuterXml);
w.Close();
Thanks.
Sincerely,
WenJun Zhang
Microsoft Online Community Sup****t
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the sup****t we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@[EMAIL PROTECTED]
notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup sup****t offering is for non-urgent issues
where an initial response from the community or a Microsoft Sup****t
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the sup****t
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Sup****t Engineer by contacting
Microsoft Customer Sup****t Services (CSS) at
http://msdn.microsoft.com/subscriptions/sup****t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.
------=_NextPart_0001_07525597
Content-Type: text/x-rtf
Content-Transfer-Encoding: 7bit
{\rtf1\ansi\ansicpg936\deff0\deflang1033\deflangfe2052{\fonttbl{\f0\fnil\fprq2\fcharset0
MS Sans Serif;}}
\viewkind4\uc1\pard\lang2052\f0\fs20 Hi Salam,
\par
\par This is a by design behavior. As you can see in BizTalk rule engine
samples, if we pragrammically call Policy.Execute or RuleEngine.Execute to
execute a policy, the result is filled into OuterXml of a TypedXmlDo***ent
object instead of overwriting the original do***ent directly. This is a
more flexible design since sometimes we don't want the original do***ent to
be modified. If you need a output XML, simply writing the stream into a
file like below. As you've seen, the behavior of executing in rule composer
and orchestration is different here. It will modify the input do***ent
directly.
\par
\par \tab\tab\tab //Execute Policy Tester
\par \tab\tab\tab try
\par \tab\tab\tab\{
\par \tab\tab\tab\tab policyTester.Execute(doc1, dti);
\par \tab\tab\tab\}
\par \tab\tab\tab catch (Exception e)
\par \tab\tab\tab\{
\par \tab\tab\tab\tab System.Console.WriteLine(e.ToString());
\par \tab\tab\tab\}
\par \tab\tab\tab
\par \tab\tab\tab FileInfo f = new FileInfo("LoanPocessingResults.xml");
\par \tab\tab\tab StreamWriter w = f.CreateText();
\par \tab\tab\tab w.Write(doc1.Do***ent.OuterXml);
\par \tab\tab\tab w.Close();
\par
\par Thanks.
\par
\par Sincerely,
\par
\par WenJun Zhang
\par
\par Microsoft Online Community Sup****t
\par
\par Delighting our customers is our #1 priority. We welcome your comments
and suggestions about how we can improve the sup****t we provide to you.
Please feel free to let my manager know what you think of the level of
service provided. You can send feedback directly to my manager at:
msdnmg@[EMAIL PROTECTED]
\par ==================================================
\par Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notifications.
\par
\par Note: The MSDN Managed Newsgroup sup****t offering is for non-urgent
issues where an initial response from the community or a Microsoft Sup****t
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the sup****t
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Sup****t Engineer by contacting
Microsoft Customer Sup****t Services (CSS) at
http://msdn.microsoft.com/subscriptions/sup****t/default.aspx.
\par ==================================================
\par This posting is provided "AS IS" with no warranties, and confers no
rights.
\par
\par }
------=_NextPart_0001_07525597--


|