How to convert XML into an input file for debugging?

Hi,

How would you convert an XML into an input file, having name and value pairs, for debugging?

Thanks,

Ken

Can you post a sample input and output files or screenshots?

Hi Mahesh,

The flow service takes an XML file (screenshot of the XML tree structure attached). Currently, my testing process is inefficient - I initiate an XML transmission from our TMS, the flow service runs, and then I view the results in our trading network test environment and integration server log.

I’d like to be able to debug and step through the flow service in designer. However, debugging requires filling out debug values, of which I’m uncertain. Screenshot of the required debug values attached.

Ideally, I’d like to run the flow service once, and have the service post the required debug values to a log. Then I could take the debug values from the log and use them to debug the flow service in designer.

Thanks,

Ken


XMLstructure.png

I think this was your are looking for and hope it helps.

For testing and debugging sake, you can create another service (used for test purpose only) which will take xml input and output IData, you can pass this to your actual service and also try using the below services where you can capture the pipeline on the fly either by Designer options.

pub.flow:restorePipelineFromFile
pub.flow:savePipelineToFile

Make sure the above services are removed before promoting the code to higher environments. Also look at this thread, there are different approach to unit test your flow services.

1 Like

Hi,

another approach might be to fill out the fields once in Designer and then save this data to a file before starting the execution.

On later runs, you can either load or “load and replace” the saved data into Designer and start the execution.

Regrads,
Holger

Hi Mahesh,

Thank you for your reply - it pointed me in the right direction. I utilized the “Run Time>Pipeline debug” property in the flow service.

First I set the “Run Time>Pipeline debug” to “Save”, then I ran the flow service. After capturing the debug XML, I set the “Run Time>Pipeline debug” property to “Restore”, assigned the debug configuration, and ran the Debug Flow Service.

I was able to step through the service in designer and get a better understanding of the error.

Hi Holger,

As a result, I no longer have a need to fill out the input fields since the debug XML appears to be sufficient.

Thanks,

Ken