Stage 1 - Notices are created (stage1 data file + design template) and archived individually.
Archived Content Items property set “StageComplete = 1”
Example: 3 Reject Notices
Review process of archived items takes place outside of Planetpress.
Stage 2 - Data file (with approved items only) pushed into WorkFlow.
Stage 2 process marks Content Items property “StageComplete = 2”
Example: Only 2 of the original Reject Notices
Scheduled process fires to pull all appropriate print content that completed Stage 2 (Retrieve Items where properties PrintCode=pkg0001, StageComplete = 2) and batch it into a single PDF for the print vendor.
Triggered Stage 1 and Stage 2:
(Datamapper is previous to this snippet)
I am having a problem in set Properties of Stage 1 and the Retrieve Items in Stage two.
I need to access each Content Item by a composite key made from data elements (EventType_EventId).
Properties are meant to be constant values that are applied to groups of entities. In your example, you are attempting to set a single property (Key) to different values inside the same group, which would be best achieved through a standard field in the DataMapper.
By the same token, when you retrieve items, you must specify constant values for the group of entities to be retrieved. The Retrieve Items task allows you to mix and match properties and field values. So for instance you can retrieve all items whose StageCompleteproperty is 1 AND whose FirstNamefield is EITHER “John”, “Jane” or “Jimbo”.
I don’t know what the EventId and EventType properties are supposed to contain, but if they are different for each item you want to retrieve, they aren’t properties, they should be fields instead.
Phil - Thanks for the quick response. Much appreciated.
I now better understand how properties were designed to be used with these plugins.
Are you able to suggest any possible approaches to my desired implementation?
That is … Create an initial collection of Content Items in the DB. Then later, approve a subset of the initial collection for the vendor to print.
(It seems as if I need to be able to access them individually in the Connect DB)
Thanks again for your time.
It feels like this one was similar: https://learn.objectiflune.com/discourse/t/how-to-set-properties-programmatically/3292
… If I am accessing the data field values directly for the Context Item, and I have to update the properties on each one … would I use a sequencer? How would that affect performance?
Without knowing what the “approval” process entails, I can’t tell you how to build your processes.
But let’s say your contents have been produced and marked “Ready for approval” (through a property).
Someone in charge of reviewing the content would obtain a list of all “Ready for approval” items using the Retrieve Items task and let’s say they approve half of all items: the approval process should produce a list of Content IDs for all approved items.
You can then use that list of approved items as an array in the Retrieve Items task. You can then mark those items as “approved” using the Set Properties task.
Again, you use the Retrieve Items task to fetch all “Approved” items, produce them, and then mark them as “Done” via the Set Properties task.
This is a very generic description, but it’s how you should generally approach the design of an approval process.
As stated earlier in the high level, The approval process is external to PlanetPress, so it does not know of the Content IDs. It just sends the approved payloads back through (key being EventType_EventId). So it feels like I would need to maintain a mapping in the Data Repository to go from my External Key to the Content ID.
Thanks again for the prompt responses. I will discuss with the team.