Is it possible to programmatically load an xml file from the repository from a code step? Of course I could load it from the file system, but it's a lot more convenient if I can load it straight from Neuron.
Is this possible? If so, how can I make that happen?
Thanks!
Darin Raffety
Tags:
Hi Darin,
This is pretty easy to do. Here's a sample C# you can run in a Code step. The DesignMode flag is to accomodate when you want to test the code in the process designer
string xml = string.Empty;
if(context.Runtime.DesignMode)
{
xml = Neuron.Explorer.UIEnvironment.ActiveConfiguration.XmlDocs["source"].Xml;
}
else
{
xml = Neuron.Esb.Internal.PipelineRuntimeHelper.ClientContext.Configuration.XmlDocs["source"].Xml;
}
context.Instance.TraceInformation(xml);
Excellent. This is exactly what I was looking for.
Thanks Marty!
Neuron ESB Product Support Forums and Communities
© 2024 Created by Neuron Admin. Powered by