modify xml nodes in action of business rules
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > BizTalk Server > BizTalk Server Orchestration > modify xml nodes in action of business rules




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    modify xml nodes in action of business rules  
Mr. M


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-10-04 10:49 PM

Hi,

I've a business rules, that receive as parameter a xml file with some
values.

Then if condition was evaluated to true, i want to add new nodes to that xml
in the action pane.
Example of schema:

<request>
...
</request>
<response>
<message> </message>
</response>

for each business rule that are evaluated to true, i want to add to the xml
a new message node.
Example of xml after conditions are evaluated:

<request>
...
</request>
<response>
<message>pass business rule A </message>
<message>pass business rule D </message>
<message>pass business rule F </message>
</response>

So, to do that, i think that the only way is developing a .Net assembly.
is that true?

I tried to create a new function that receive as parameter "response" node
(instance of RuleEngine.TypedXmlDocument class), to append new child node.
But it doesn't works.

Any pointers???

Thanks in advance,
Mauri.-







[ Post a follow-up to this message ]



    RE: modify xml nodes in action of business rules  
phil


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-11-04 10:52 PM

Perhaps you can use the XML DOM to create to add an element.  Don't know how
this is in 2004 but I did something similar in 2002 in vbscript for my
orchestration.

Something like:

set doc = CreateObject("MSXML2.DOMDocument")
doc.loadXML(Document)
'' define where you want to add your element
set responseNode = doc.selectSingleNode("//response")

set msgText = doc.createTextNode("business rule A text")
set msgElement = doc.createElement("message")
msgElement.appendChild msgText


"Mr. M" wrote:

> Hi,
>
> I've a business rules, that receive as parameter a xml file with some
> values.
>
> Then if condition was evaluated to true, i want to add new nodes to that x
ml
> in the action pane.
> Example of schema:
>
> <request>
>      ....
> </request>
> <response>
>     <message> </message>
> </response>
>
> for each business rule that are evaluated to true, i want to add to the xm
l
> a new message node.
> Example of xml after conditions are evaluated:
>
> <request>
>      ....
> </request>
> <response>
>     <message>pass business rule A </message>
>     <message>pass business rule D </message>
>     <message>pass business rule F </message>
> </response>
>
> So, to do that, i think that the only way is developing a .Net assembly.
> is that true?
>
> I tried to create a new function that receive as parameter "response" node
> (instance of RuleEngine.TypedXmlDocument class), to append new child node.
> But it doesn't works.
>
> Any pointers???
>
> Thanks in advance,
> Mauri.-
>
>
>





[ Post a follow-up to this message ]



    RE: modify xml nodes in action of business rules  
Jurgen Willis


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-12-04 01:47 AM

You can create a .NET method that takes a
Microsoft.RuleEngine.TypedXmlDocument as a parameter.  In the Composer, use
your method as a rule action and drag-and-drop the appropriate node from
the XML schema into your method.  Within your code, you can call Document
on the TypedXmlDocument parameter to get the XmlNode and then add child
nodes to it.






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 11:00 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register