Friday, November 21, 2008

HowTo: XmlNode, Clone and InsertBefore

If we have a XmlDocument named "doc" and you want to Clone and Insert the Clone before the original:

// Select your XmlNode
XmlNode myOriginal = doc.FirstChild; // Use the code to select your XmlNode

// Clone the XmlNode
XmlNode myClone = myOriginal.Clone();

// Insert the clone before the original
myOriginal .ParentNode.InsertBefore(myClone , myOriginal );

// The XmlNode you call InsertBefore from must be parent to the parameter refChild.

Wednesday, November 19, 2008

View tracked policies

It was not easy to find how to view tracked policies.

Eventually I found something in the documentation, under "Properties Pages";

"You can view tracked rules and policies during runtime using Health and Activity Tracking (HAT). In HAT, right-click the orchestration that the policy is called from, and then click Follow this link to view the Policy execution details for this Orchestration Instance to view the details on the tracked policies."

That was not complete information though.

Of course you need to turn on tracking:

  • Turn on tracking (In BTS Admin under "Applications/All Artifacts/Policies" or a specific Application". Remember that you track a specific policy version! So on updates you need to activate tracking again.
  • Send a message that invokes the policy

Now the link in HAT is visible, but you have to right-click and choose "Message Flow" first, was not mentioned in documentation, then you see the link.