Page 1 of 1

XML data and preflight/actions

Posted: Wed Feb 24, 2016 5:16 pm
by abonsey
I'm trying to understand how/can variable sets work with preflight/actions to ensure certain actions are applied based on the xml data.

The variable set needs to read the XML data "customer name". This I have set up. What I'm struggling with is how to apply the variable set into a flow using PitStop Server to use an action ONLY when a certain customer name is detected, but at the same time uses other actions as well within the flow.

Hope that makes senses.
Thanks for any help given

Re: XML data and preflight/actions

Posted: Wed Feb 24, 2016 6:28 pm
by gabrielp
I don't use much Pitstop, but there is a way to achieve this that doesn't involve having Pitstop treat the jobs differently based on that value but instead letting Switch route it differently.

You could route it into a different path which has that special Pitstop configurator if customer_name == "whatever". You read XML values within Switch by picking up XML as metadata. Once it's in metadata, you can access those values within "single-line text with variables" within the Metadata -> text -> build location path, section.

To simplify things, most of us, up front in the flow, pickup our XML dataset and then map many of those values to Private Data, for convenience. This way, you can route the job based on Job.PrivateData (giving it a key of CustomerName) which returns "whatever", which you can use as a comparison operator for a flow connection. So, same deal as using metadata but you can more easily access it with a PD Key instead of an XPath and you also have the option of overwriting the private data value if your flow requires it.

Re: XML data and preflight/actions

Posted: Thu Feb 25, 2016 4:36 pm
by andrea mahoney
In the Pitstop Server Variable set you will create a rule that will be set to true or false (or yes no).

If "Customer" is equal to ABC then yes.

When that rule is used in a pitstop profile with actions attached you can turn on the Variables in the Actions window and use it to control the checkboxes for the actions.

When your rule evaluates to Yes the action will be run. If it is No it will not run.