Despite our organization using Planet Press Connect 2020.1, we have still yet to remove all traces of Planet Press 7. In particular we are using a PTK file from PP7, to define conditions based on XPaths.
Our old PP7 file contains several conditions, and these conditions are used to group documents by a ‘type’ attribute, so that we can count the document types.
As the number of letter types is growing, I need a way to move the logic from PP7 into Planet Press Workflow metadata tasks.
The XML source file is structured like
<letterData @type> … …
For example we have a PP7 Condition
Display Name: RR
Planet Press Talk ID: RR
String to Find: RR
Operator: Location
XPath: /letterData[1]/@type
A Planet Press 7 Metadata field called ‘rrconf’ then is conditionally set to a value, for example ‘RR’ when the RR condition is met. It tests each of the conditions and sets it to the appropriate value.
Going forward, we need to convert this to a metadata record in a Document of a Job using Planet Press Workflow, however I’m pretty stuck.
The XML file is already being loaded using a Folder Capture task.
An existing Create Metadata task, loads the legacy PTK file, and evaluates the XML file. (It is this specific step, I’m trying to replace)
There are then a series of task blocks which already test for each of the possible values of ‘rrconf’, to using a Metadata filter, before counting the number of documents which contain the specified value.
To substitute for the Create Metadata task above,
- I added a Create Metadata task, (passthrough)
- I added a Metadata Field Management, and then add a field called ‘rrconf’, which is assigned value based on the XML attribute.
For instance, I try to set the value of ‘rrconf’ to ‘RR’ if the conditions is met, but try as a might, I can’t seem to get the notation correct. Is it meant to be something like
xmlget(‘./letterData[?]/@type’,Value,KeepCase,NoTrim) = ‘RR’
There is a many to one relationship between @type values and grouping values.
I haven’t seen any migration documentation for PP7 or Planet Press Workflow Metadata which cover the condition logic migration.
Documentation on the data selection is light. Thoughts?