XML data and preflight/actions

Post Reply
abonsey
Member
Posts: 142
Joined: Fri May 24, 2013 5:10 pm

XML data and preflight/actions

Post 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
User avatar
gabrielp
Advanced member
Posts: 645
Joined: Fri Aug 08, 2014 4:31 pm
Location: Boston
Contact:

Re: XML data and preflight/actions

Post 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.
Free Switch scripts: open-automation @ GitHub
Free Switch apps: open-automation @ Enfocus appstore

Want to hire me? I'm looking for my next gig. Contact me on LinkedIn or via email.
User avatar
andrea mahoney
Newbie
Posts: 19
Joined: Tue Jan 25, 2011 8:53 pm

Re: XML data and preflight/actions

Post 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.
Post Reply