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 samples.
  • A JSON Record Data List (see the REST API Cookbook and JSON Record Data List example). When the 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.

When JSON data is used as input, the Create Job plugin (the next task in a print process) cannot use a Job Creation Preset. The Create Print Content task doesn't create a record set based on the provided data, like the Execute Data Mapping task does. Job Creation Presets need such a record set to group, sort and filter items.

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.)

Content creation may be aborted by a script in a Connect template that raises a fatal error. This triggers the On Error tab of the Content Creation task. See Designer Script API.

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 (see Using JSON) or a JSON Record Data List (see the REST API Cookbook).
        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.
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 User Options page of the 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 General appearance preferences), 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.