Skip to main content

Connect Master Variables

JobFlow Master Variables allow a Connect module to override variables for the next module.

A JobFlow Master Variable is a JSON file named params_id.json a script creates in the JobFlow Vault location. id is the JobFlow module ID of the next module which is provided by JobFlow automatically as a script argument.

Master Variables examples

Example uses for using Master Variables are:

  1. You have a PitStop Action module that adds a barcode to a page. The content for that barcode is an Enfocus PitStop Smart Variable called txtText. Use the Connect module to create a Master Variable that sets the barcode content for the PitStop barcode action by overriding the default value for txtText. The content of the JSON Master Variables file should be {"txtText":"New barcode content"}. (Note: this guide does not cover how Enfocus PitStop Smart Variables work. For more info about this topic, please visit Enfocus)

  2. Master Variables can override Fiery Job Properties! By creating a JobFlow Master Variable with the correct PPD key (for instance Notes1) you can have JobFlow set the content for the notes field for that job on the Fiery. To override the content for the Notes 1 property, the content of the Master Variables JSON is {"Notes1":"Custom notes content"} Other examples include having the ability to set a page range for a specific media or chapters based on job content.

  3. Instead of overriding one or multiple Fiery Job Properties, you can also use Master Variables to override a Job Preset. The variable to use is preset and an example Master Variable JSON for Fiery is {"preset":"landscape_2up"}. For Fiery XF you can use Master Variables to override Workflow and Media: {"workflow":"workflow name","media":"media name"}.

  4. JobFlow Connect modules can override settings of other JobFlow modules. For converting images, Master Variables can set additional parameters for the image conversion settings in the Convert module. Settings for page ranges in the Pages module can also be overridden by Master Variables.

Example of a script that overrides the page range for the Page module. It is essential that this script runs immediately before the Pages module.

pagerange.bat
:: Fiery JobFlow provided arguments
set INPUT=%~1
set OUTPUT=%~2
set JOBNAME=%~n3
set VAULT=%~6
set NEXTMODULEID=%~7

:: Script variables
set ScriptName=%~n0
:: Save script log output in vault
set pathLog=%VAULT%\%ScriptName%.log
:: Set master variables location and file name
set pathJSON=%VAULT%\params_%NEXTMODULEID%.json

:: Override page number range for pages module
@echo {"page_number_range":"1,3,5-10"}> %pathJSON%

:: Make sure the JSON file has been created
if not exist %pathJSON% (
>>%pathLog% echo %DATE% %TIME% [ERROR] Cannot find %pathJSON%.
)

:: Move PDF to next module
copy /y "%INPUT%" "%OUTPUT%

:: Done