Create Print Content
The Create Print Content task generates a set of printable content items from a template's Print Context, and saves those content items in the database until output creation is requested.
This task also accepts a PDF/VT file as input (see Create PDF/VT), allowing the task to be used without a Connect Template.
Input
This task can receive either Metadata containing information regarding a valid Record Set, or JSON data, or a PDF/VT File (see Create PDF/VT).
Metadata
The Execute Data Mapping task and the Retrieve Items task output Metadata containing information regarding a Record Set.
JSON
The Create Print Content task supports two types of JSON:
- A JSON object or an array of JSON objects representing records. If a value in a record object is a string, it is considered to be a field value. If a value in a record object is a JSON object, it is considered to be a nested table with detail records. For examples, see JSON string examples.
- A JSON Record Data List (see the REST API Cookbook and JSON Record Data List example). When the Execute Data Mapping or Retrieve Items task is set to output Records in JSON, it outputs this kind of JSON data.
If the input is JSON, the task performs a REST call to the /rest/serverengine/workflow/contentcreation/{templateId}
endpoint on the Connect Server. For more information see the REST API Cookbook.
Processing
In the case of a record set or a JSON object/array and template, this task loops through each record (or object) in the set (or array). For each record or JSON object, one or more pages are generated using the record's data and these pages are saved as a content item in the database.
In the case of a PDF/VT file, content items are created based on the structure of the PDF/VT metadata and content items are stored using the data for each of those metadata records.
By default, the entire Print Context is used to create print content items. Individual Print sections can be selected dynamically via a Control Script. (For more information see the Designer Help.)
Output
The output of this task is modified Metadata (see Note: Metadata in OL Connect jobs) with information about the job processing and each created content item. No content item is actually output from the task, they are only saved in the OL Connect Database.
Properties
General Tab
- Template File:
- "None" File name: Select to accept a PDF/VT file as an input and automatically create content items based on the PDF/VT.
- "%o": Select to use a dynamic template name. Click on %o to change the expression that determines the name of the template to use.
- Template Names: Select the appropriate template. Adding a template to the resources is done through the Send to Workflow option in the Designer Module.
- Data Source (see Input):
- Metadata:
- Update Records from Metadata: If the process metadata has been modified by any of the Metadata tasks, check this option to update the records in the Connect database with the metadata and use the updated records. Otherwise, only the ID of the current job is sent, and the unchanged records are used.
- JSON:
- JSON String: A JSON object or an array of JSON objects representing records or a JSON Record Data List (see: Types of JSON in Workflow).
This option requires that keys in the JSON data have matching field names in the data model of the template. When they have, the JSON values are passed to the template and the personalization scripts of the template will have access to the values through the record's data fields. (See the Designer help: Adding Variable Data.)The JSON format is not validated by the plugin; it is passed as is to the server.
- JSON String: A JSON object or an array of JSON objects representing records or a JSON Record Data List (see: Types of JSON in Workflow).
- Metadata:
- Runtime Parameters: The runtime parameters defined in the selected template are displayed and their values can be set here. (See Runtime parameters in the Online Help of OL Connect.)
Right-click the field to open the contextual menu that allows to select variables, data and lookup functions (see Data selections).
If the template name is dynamic, you must enter the name (or select a variable that contains the name) and set the value of all runtime parameters that may occur in the template.
If a runtime parameter is defined in a template, but not set in the task properties, an error will be raised. Note that it is not possible to change a parameter's type here; that can only be set in the template itself.
At runtime, Workflow passes the parameter values as strings, and the type defined in the template will be used to try and parse the input parameter value. In order to make this work: Boolean values need to be entered as either “true” or “false”. (When the comparison actually occurs, it will be a full Boolean comparison. Thus it can compare this runtime parameter with Boolean data values that are stored as 0/1 in data fields.) Numeric string values need to be parseable as a number (either a whole integer or decimal value). Dates should be in an ISO8601 compatible format (e.g. 2019-10-15) or use the current Windows Locale date settings options. The latter is not recommended as it requires all computers in the cluster have the same locale data format.Runtime parameter value settings are not preserved when switching to a different template and back, for example to reload a modified template. This issue is fixed in PlanetPress Workflow 2022.1.
OL Connect Proxy Tab
This tab is common to all OL Connect tasks and defines where to process the jobs sent through these tasks. When these fields are empty, they use the defaults set in the OL Connect preferences.
Defaults are not used unless the configuration is sent to the Workflow service.
-
OL Connect Proxy Address: Enter the machine name or IP Address where the OL Connect Server resides.
-
Port: Enter the port to use to communicate with the OL Connect Server. Default: 9340
-
User name: Enter the user name expected by the OL Connect Server.
-
Password: Enter the password expected by the OL Connect Server for the above user name.
On Error Tab
For a description of the options on the On Error tab see Using the On Error tab.
Miscellaneous Tab
The Miscellaneous tab is common to all tasks.
It contains a text area (Task comments) that lets you write comments about the task. These comments are saved when the dialog is closed with the OK button and are displayed in The Task Comments Pane.
Check the option Use as step description to display the text next to the icon of the plugin in the Process area.
The tab also provides an option to highlight the task in The Process area with the default color, set in the Preferences (see Colors), or the color selected or defined under Highlight color on this tab.
To revert the selected highlight color to the default color, open this tab, turn the Highlight option off and close the dialog with the OK button; then turn highlighting back on.
Highlighting can also be turned on and off via the task's contextual menu and with the Highlight button on the View ribbon.