Meta Data Interface

Post Reply
jasonx
Member
Posts: 28
Joined: Wed Jul 03, 2019 3:03 pm

Meta Data Interface

Post by jasonx »

Hey everyone,

I am building out a new flow for a new project. This project will be receiving an XML file which I do not know the format for as of yet. I want to start building out the flows but I wanted to create an Interface so that when I am provided with the XML file I can simply map the locations of the meta data to the interface. Saves me having to change everywhere this meta data is referenced.

Whats the best way of doing this?

I have thought of injecting the meta data as private data. (Seems messy)
I have also thought about creating a new XML dataset that a I reference and map it this way when the time comes. (Seems like the better solution).

Any experienced feedback would be great as I might be missing a simple solution to this issue.
laurentd
Member
Posts: 137
Joined: Wed Mar 13, 2019 2:06 pm

Re: Meta Data Interface

Post by laurentd »

I would indeed go for private data.
Easy to define now in a folder properties, and easy to map when you get the XML file.
If the XML contains multiple subjobs, Variable XPath Repeater can loop into the XML to produce many jobs each with corresponding private data.
Laurent De Wilde, Solution Architect @ Enfocus
User avatar
JimmyHartington
Advanced member
Posts: 282
Joined: Tue Mar 22, 2011 7:38 am

Re: Meta Data Interface

Post by JimmyHartington »

I second Laurents approach.
freddyp
Advanced member
Posts: 1008
Joined: Thu Feb 09, 2012 3:53 pm

Re: Meta Data Interface

Post by freddyp »

My two cents: it depends a bit on the number of pieces of metadata that you need, personal preference and the type of the input.

When you are configuring a flow using private data you have to know the name of the private data key or you are lost. That is where the use of XML has an advantage. Then again, if you correctly document your flows (by using the Description fields everywhere) and the number of pieces of metadata is not too high that is also not a big issue. So far I still agree with Laurent and Jimmy.

However, if the input metadata is already XML, then I find it more logical to stick with XML and transform the input metadata to an own format using an XSL transformation. If you do not know how to write an XSL, have a look at the "Make XML" app.

I also want to seize this opportunity to make a more general observation. In this case JSON (I mean Jason) wants to create his own XML format so he can start building the flow and then later on he is going to convert the incoming XML to his own XML format in some way. The observation I want to make is that a flow designer should always consider doing this also when the format of the incoming XML is already known. This process of what is called "normalization" of metadata is often a good idea for three reasons:
  • if the format of the input XML changes you only have to change the transformation, the rest of the flow stays unaffected
  • the structure of the incoming XML can sometimes be very complex and reducing the complexity helps when building the flow
  • the input XML usually contains too much information, so filtering out only the required pieces of information also helps to make things simpler
jasonx
Member
Posts: 28
Joined: Wed Jul 03, 2019 3:03 pm

Re: Meta Data Interface

Post by jasonx »

Thanks everyone I have gone the XML route.
Post Reply