Create PDF output for subset of data

I have a job which is around 30,000 records. I need a way to proof this in the workflow, producing only 10 or 20 records. The data file is complex so extracting the records from there would not work. Is there a way to do this in the workflow?

there may be the way of using a Splitter Plugin, splitting the data into two parts, first part having your 10 or 20 records and second part the rest of the data, and a condition may stop processing after the first iteration.

Now if for some reason, you cannot split the data in Workflow, an idea would be to use the Data Mapper to limit the number of records you want to proof. To do this:

  • At the top of your Data Mapping steps, add a Condition Step which checks whether the current record.index is less than 10 (or less than the value of a Workflow variable - the point is that the value you are comparing record.index against can also be set dynamically through a jobinfo or workflow variable)

  • Move all the steps which extract your data into the True branch.
  • In the False branch, add an Action step and set the Type of the Action to “Stop Processing Record”. In this way, any record above the index specified will not be extracted and as such Content Creation and Output for them will not be processed.

This means you will have two separate Data Mapping Configuration files: one for full production and the other for proof. So,your process in Workflow needs a logic which tells it whether you are running Proof or full Production if the Workflow runs in Service mode and not in debug mode.

Alternatively, if the idea behind this is to manually generate a proof without watermark, you could also do so in the Designer by printing through a remote Connect Server. To configure your client Designer system to print via a Remote Connect Server, open the Designer, click on the Window tab > Preferences > Print > General > Print Server Settings and enter the IP address or machine name with the username and password of the remote Connect server in the Hostname field. Make sur eto click on “test Print Server URL” to make sure you can communicate with the remote Connect server. Now to generate a limited number of print records without watermark from the Designer, click on File > Print, then select a record range (1-10 or 1-20), then click on Advanced and check the “Output Local” option.

To expand a bit on Rod’s excellent answer:

If you choose to do this through the DataMapper, as Rod said you can control the number of records to produce using a JobInfo or a process Variable. So for instance you would have your Workflow Process set JobInfo(9) to “1000000” (1 million) by default. The default number should be much higher than the actual maximum number of records you’re ever going to produce, so that by default all your records are produced. Whenever you want to test your process/document, you change that value to 10 or 20. No need to have separate DataMapper configs or different Workflow processes.

This is perfect. Thanks folks!