Quick Start Guide
Quick Start Guide
Switch
Contents
1. Copyrights............................................................................................................................................... 4
2. About this Quick Start Guide................................................................................................................... 5
3. Understanding Switch............................................................................................................................. 6
3.1 About Switch...........................................................................................................................................6
3.2 About working with Switch.....................................................................................................................7
3.2.1 Flows.............................................................................................................................................7
3.2.2 Input..............................................................................................................................................8
3.2.3 Processes: standard processes...................................................................................................9
3.2.4 Processes: additional processes............................................................................................... 10
3.2.5 Processes: connections............................................................................................................. 12
3.2.6 Output......................................................................................................................................... 13
4. Getting started...................................................................................................................................... 15
4.1 Installing, activating and opening Switch............................................................................................ 15
4.1.1 Installing Switch......................................................................................................................... 15
4.1.2 Activating Switch........................................................................................................................ 15
4.1.3 Opening Switch...........................................................................................................................16
4.2 The Switch workspace..........................................................................................................................17
4.3 Before you start....................................................................................................................................19
4.4 Creating your first flow........................................................................................................................ 19
4.4.1 Step 1: Creating your flow......................................................................................................... 19
4.4.2 Step 2: Designing your flow.......................................................................................................20
4.4.3 Step 3: Running your flow......................................................................................................... 31
4.5 Exercise 1: Sorting files by file type.................................................................................................... 36
4.5.1 Exercise 1: Solution................................................................................................................... 36
4.6 Exercise 2: Sorting by file name pattern............................................................................................. 39
4.6.1 Exercise 2: Solution................................................................................................................... 40
5. Working with Switch............................................................................................................................. 42
5.1 Using embedded metadata and file information................................................................................. 42
5.1.1 About sample jobs......................................................................................................................43
5.1.2 Creating a sample job................................................................................................................45
5.1.3 Defining a condition with variables............................................................................................45
5.1.4 Defining text with variables....................................................................................................... 47
5.1.5 Exercise 3: Sorting files by information contained within the PDF file..................................... 48
5.2 Working with job folders and subfolders.............................................................................................50
5.2.1 The Ungroup flow element........................................................................................................ 50
5.2.2 The Submit hierarchy flow element.......................................................................................... 54
5.2.3 The Archive hierarchy flow element..........................................................................................56
ii
Contents
5.2.4 The Set hierarchy path flow element........................................................................................ 56
5.2.5 Exercise 5: Receiving jobs from within a server hierarchy....................................................... 57
5.3 Connecting flows and retaining hierarchy information....................................................................... 61
5.3.1 Exercise 6: Passing hierarchy info to another flow...................................................................61
iii
Switch
1. Copyrights
© 2014 Enfocus BVBA all rights reserved. Enfocus is an Esko company.
Certified PDF is a registered trademark of Enfocus BVBA.
Enfocus PitStop Pro, Enfocus PitStop Workgroup Manager, Enfocus PitStop Server, Enfocus
Connect YOU, Enfocus Connect ALL, Enfocus Connect SEND, Enfocus StatusCheck, Enfocus
CertifiedPDF.net, Enfocus PDF Workflow Suite, Enfocus Switch, Enfocus SwitchClient, Enfocus
SwitchScripter and Enfocus Browser are product names of Enfocus BVBA.
Adobe, Acrobat, Distiller, InDesign, Illustrator, Photoshop, FrameMaker, PDFWriter,
PageMaker, Adobe PDF Library™, the Adobe logo, the Acrobat logo and PostScript are
trademarks of Adobe Systems Incorporated.
Datalogics, the Datalogics logo, PDF2IMG™ and DLE™ are trademarks of Datalogics, Inc.
Apple, Mac, Mac OS, Macintosh, iPad and ColorSync are trademarks of Apple Computer, Inc.
registered in the U.S. and other countries.
Windows, Windows 2000, Windows XP, Windows Vista, Windows 7 and Windows 8 are registered
trademarks of Microsoft Corporation.
PANTONE® Colors displayed here may not match PANTONE-identified standards. Consult
current PANTONE Color Publications for accurate color. PANTONE® and other Pantone, Inc.
trademarks are the property of Pantone, Inc. ©Pantone, Inc., 2006.
OPI is a trademark of Aldus Corporation.
Monotype is a trademark of Monotype Imaging Inc. registered in the U.S. Patent and Trademark
Office and may be registered in certain jurisdictions. Monotype Baseline is a trademark of
Monotype Imaging Inc.
Quark, QuarkXPress, QuarkXTensions, XTensions and the XTensions logo among others, are
trademarks of Quark, Inc. and all applicable affiliated companies, Reg. U.S. Pat. & Tm. Off. and
in many other countries.
This product and use of this product is under license from Markzware under U.S.Patent No.
5,963,641.
Other brand and product names may be trademarks or registered trademarks of their
respective holders. All specifications, terms and descriptions of products and services are
subject to change without notice or recourse.
4
Switch
2. About this Quick Start Guide
The Switch Quick Start Guide explains the basic concepts of Switch and helps you to get started
with Switch.
The Guide consists of three parts:
• Understanding Switch on page 6 explains what Switch is and how it works, without going
into detail. Read this part if you’re new to Switch.
• Getting started on page 15 guides you through installation and activation and explains how
to set up your first flow.
• Working with Switch on page 42 elaborates on some specific topics, such as using sample
jobs, working with folders and connecting different flows.
This Quick Start Guide contains a number of exercises. Try to make them yourself, before
checking the example solution.
Do you want to know more?
Please refer to the Switch Reference Guide, available on the Enfocus website.
Tip: You can also access the help files from within Switch: press F1 or select Help >
Switch help .
5
Switch
3. Understanding Switch
Read this part if you want to know what kind of application Switch is, and how it works.
3.1 About Switch
Switch is an application that allows you to automate a number of tasks and processes, such as
sorting and renaming files, converting files to PDF, preflighting PDFs, and so on.
Every aspect of the process can be automated:
• Switch can pick up input files wherever you stored them.
• The tasks are executed without any manual intervention.
• Processed files are automatically placed in the appropriate location.
Working with Switch can save you a lot of time.
Modules
Switch is a modular application. It consists of:
• A core engine module, which offers the basic functionalities (sorting, renaming, splitting,
merging, ... files).
• A number of additional modules, which you can purchase if you need more advanced
functionalities.
For example, if you want to use Switch to automate tasks performed by third party applications
(such as the Adobe Creative Suite), you need a license for the Switch Configurator module; if you
want to use database information in Switch, you need the Database Module.
For a complete overview, refer to the Switch Reference Guide.
Components
When running the Switch installer, the following components are installed:
• Switch Server is the core engine; it runs in the background, executing all processes. It has
no user interface and it is started and terminated by the Switch Designer.
• The Switch Designer is the user interface of Switch; the component you’re using when
working with Switch.
• SwitchScripter is a separate application for use with Switch: it allows you to create and
test scripts for Switch. Note that you can only use SwitchScripter if you have licensed the
Scripting Module.
SwitchClient is another component of Switch, but it has its own installer. SwitchClient allows
you to submit and review files remotely. You can only use SwitchClient if you have licensed the
SwitchClient Module.
6
Switch
3.2 About working with Switch
Switch provides you with a workspace with a canvas and a number of tools (called flow elements)
to design your own workflows (called flows).
To create such a flow, you must select the flow elements you need from the right pane, and drag
and drop them onto the canvas.
3.2.1 Flows
A flow (in its basic form) consists of the following elements:
• Some kind of input (can be files or folders) submitted to Switch
• One or more processes to be executed or tasks to be performed (e.g. renaming files,
converting images, preflighting PDFs ...)
• Some kind of output (=processed files and/or folders)
7
Switch
Each of these elements is represented by a flow element, and the flow elements are
interconnected via so called Connections (arrows). The direction indicates how the files will
move (in this example from left to right).
3.2.2 Input
Switch allows you to process both single input files and file folders.
• Examples of input files: PDF files, MS Word files, all types of images …
• Example of input folders: InDesign folders, a page layout with all images and fonts ...
Files and file folders that enter Switch and have to be treated as one entity are in Switch
referred to as "jobs".
Ways to provide input
There are several ways to submit input to Switch:
• Manually: You can drag and drop your input files or folders onto an input folder element
on the canvas. This is handy to test flows.
• Automated: You can configure Switch to download the input from a server (an FTP server, an
e-mail server, or a network server), or to receive it from SwitchClient.
Depending on the way you want to provide your input, you must select the appropriate flow
element:
If you want to submit files ...
By dropping them onto the canvas
(manually)
Use the following flow element
Folder
Via a location on a local computer or a
network server
Folder (you will have to specify the
location)
Submit hierarchy
This is a special type which remembers the
folder structure. See The Submit hierarchy
flow element on page 54.
Via FTP
FTP receive
Via e-mail
Mail receive
Via SwitchClient
Submit point
8
Switch
Job data
Switch allows you to send extra data along with your input files, called Job data. This can be
metadata, the file name, information about the user, or data from other systems, such as MIS
systems, asset management systems… The format of the job data can be XML, JDF, Metadata…
Job data can be used to decide how files must be processed.
Example:
The paper type (coated versus uncoated) often determines whether or not a file must be sent to
an ink optimizer. If this information is available in your MIS system, you can attach it to your files
as job data. If the files arrives in Switch, Switch can use this information to sort the input files
and only send them to an ink optimizer application if required.
3.2.3 Processes: standard processes
Switch provides you with a lot of flow elements for processing the files that are submitted to
Switch.
Some flow elements are always available, because they are included in the Switch Core Engine.
They allow you to perform a number of standard tasks/processes, such as the ones listed in the
table below.
Processes
Renaming a job or the files included in a job folder (e.g.
to add a prefix or a suffix, replace part of the name with
some other string, …)
Flow element
Rename job
Sorting files in a job folder (for example renaming them
so that they are sorted alphabetically)
Sort files in jobs
Combining multiple PDF files into one file for processing,
or splitting one file into different PDF files.
Merge PDF
Split PDF
9
Switch
Processes
Moving files into a ZIP package, or extracting files from a
ZIP file.
Flow element
Compress
Uncompress
Just like other flow elements, you can select these elements from the Flow Elements pane.
Note: You can combine several processes in one flow. In the example below, the input
is first unzipped (using the Uncompress flow element) and afterwards merged into one
PDF file (using the Merge PDF flow element).
3.2.4 Processes: additional processes
If you have licensed the Configurator Module, a number of additional processes can be
performed, i.e. by 3rd party applications (Adobe Creative Suite, Adobe Acrobat Professional,
Automation Engine… ) integrated in Switch.
This is possible thanks to the Configurators, which allow you to connect to these applications
from within a Switch flow.
Configurators are available in the Configurators Category of the Flow Elements pane, and must
be dropped onto the canvas, just like the other flow elements.
10
Switch
Note: You can only use Configurators for applications that you have installed and
licensed. Configurators for applications that are not available are hidden or displayed
in gray (depending on your settings - to change these settings, click
right corner of the pane).
in the upper
How it works
Configurators allow you to send files to 3rd party applications from within a Switch workflow.
The sent files are processed by this application, and once processed, they are returned to
Switch, so that Switch can further process the resulting files as required.
In the example below, the input files are first sent to Photoshop for converting the images to
PDF; afterwards the resulting PDFs are sent to PitStop Server to be preflighted. The result of
the preflight (OK or not OK) is used to sort the output files.
11
Switch
3.2.5 Processes: connections
Whereas the flow elements are used to perform processes, the connections (= the lines between
flow elements) allow you to control the flow, i.e. to decide which files go where.
The connections can be configured to:
• Hold files, or pass files through.
• Sort files by file type (for example PDF versus JPEG ), file size, file pattern or by condition
(author, color mode, and so on).
Example:
In the example below, the connections are configured to move the input files (based on their file
type) to the correct Configurator element. Input that does not comply with one of the configured
file types is moved to the “Other” folder and is (in this example) not processed.
Traffic light icons
If flow elements generate a report or log, i.e. indicate whether or not the input was processed
successfully (with or without warnings), this information can be used to sort the resulting
output.
12
Switch
For example, if PitStop Server (=a Configurator element) preflights PDF files, you can configure
the outgoing Connections in such a way that they include or exclude files based on their preflight
status. The color of the traffic light indicates which files are passed through:
• Green is used for files that are processed successfully.
• Yellow is used for files that generate a warning.
• Red is used for files that generate an error.
Example:
In the following example, the first connection moves files that were preflighted successfully
(green) or with warnings (yellow) to the Ok files folder, whereas the second connection moves
erroneous files (red) to the Nok files folder.
3.2.6 Output
Once the files have been processed, they are moved to an output folder. This can be a physical
folder somewhere on the network, a folder that's connected to another Switch workflow, or
an input folder for a RIP or print controller. You can also upload the output to an FTP or mail
server.
Depending on how you want to receive the output files, you can use one of the following flow
elements:
If you want to receive the processed output
files...
Use the following flow element
In a folder on the network, or on your own
local computer
Folder
Archive hierarchy
This is a special type, which places the
output in a folder structure. See The Archive
hierarchy flow element on page 56.
Via an FTP server
FTP send
13
Switch
If you want to receive the processed output
files...
Use the following flow element
Via an e-mail server
Mail send
14
Switch
4. Getting started
Read this part if you are new to Switch. You will learn:
• How to install and activate Switch.
• How the GUI looks like.
• How to create your first, basic flow.
4.1 Installing, activating and opening Switch
Before you can start working with Switch, you must first install Switch and activate the modules
for which you have a license.
Note that in this Quick Start Guide, only the main procedures are explained:
• We assume that you install Switch Server and Switch Designer on the same computer.
• We assume that this computer has internet access.
If this is not the case, refer to the Switch Reference Guide on the Enfocus website.
4.1.1 Installing Switch
Prerequisites: You must have administrator rights on your local computer to install Switch.
To install Switch
1. Do one of the following:
• Insert the Enfocus Product CD-ROM or DVD into your CD-ROM/DVD-ROM drive.
• Use the link you received from your local reseller to download Switch.
Switch is only sold via local resellers. Different from other Enfocus products, you cannot
download it directly from the Enfocus website.
2. If necessary, double-click the Switch installer.
3. Follow the on-screen installation instructions.
You have installed Switch. Next, you have to activate your Switch license(s).
4.1.2 Activating Switch
Once you have installed Switch, you must activate the modules for which you have a license.
Note: You need at least a license for the Switch Core Engine. Other modules are
optional (and not required for the exercises in this Quick Start Guide).
This procedure describes how to activate Switch on a computer with internet access.
15
Switch
Note: It is also possible to install Switch on a computer without internet access (as
long as you have another computer available to connect to the internet). For the offline
procedure, refer to the Switch Reference Guide.
To activate Switch
1. Locate the application (Switch.exe or Switch.app) and double-click to start Switch.
Switch is installed by default in the following directory:
• Windows: C:\Program Files (x86)\Enfocus\Enfocus Switch <version
number>
• Mac OS: /Applications/Enfocus/Enfocus Switch <version number>
2. In the Connect to Switch Server dialog, select Connect to local Switch Server.
It is also possible to connect to a Switch Server installed on another computer (on which
Switch has been installed as well). For more information, refer to the Switch Reference
Guide.
3. Click OK.
The Switch Designer is opened.
4. Make sure the Off-Line Mode checkbox is cleared.
5. Enter your account name and password.
If you don't have an Enfocus activation account yet, click the Create account link. After
completing the form, you will receive an e-mail with an account name and password.
6. To supply your product key(s), do one of the following:
• Enter the product keys in the text area.
• Drop the product key file into the text area.
• Click Browse to select the product file from a location on your local system.
A green check mark next to the product key indicates that the key is valid.
7. Click Activate.
In the right part of the dialog, a green checkmark appears next to the activated module(s).
8. Click Close.
4.1.3 Opening Switch
This procedure assumes you are connecting to a local Switch Server.
To open Switch
1. Locate the application (Switch.exe or Switch.app) and double-click to start Switch.
Switch is installed by default in the following directory:
• Windows: C:\Program Files (x86)\Enfocus\Enfocus Switch <version
number>
• Mac OS: /Applications/Enfocus/Enfocus Switch <version number>
16
Switch
2. If the Connect to Switch Server dialog pops up:
a. Select Connect to local Switch Server.
b. Clear the Show dialog at startup checkbox.
Next time you open Switch, the selected connection (in this case: local connection) is
considered the default. You can afterwards still change the connection from within
Switch, by selecting File > Connect to Switch Server .
c. Click OK.
You have opened Switch.
4.2 The Switch workspace
When Switch Designer is launched for the first time, the following window (ie. the workspace) is
displayed.
It consists of a title bar and a menu/toolbar (#1 en #2) at the top, and a number of panes
(#3,#5,#6,#7) surrounding a central area, the canvas (#4). The table below gives a brief
description of each of these screen parts.
Screen part
1 Title bar
Function
Indicates whether or not you are connected locally or remotely. E.g.
Ann’s Switch Server (localhost) indicates that the Switch Server (in this
example called Ann’s Switch Server) is launched locally. The name of the
Switch Server can be changed by selecting Edit > Preferences > Internal
Communication > Switch Server Name (Windows) or Enfocus Switch >
Preferences > Internal Communication > Switch Server Name (Mac OS).
17
Switch
Screen part
2 Menu/
Toolbar
Function
The menu bar gives access to the different panes and functions of Switch;
for some of the main functions a shortcut, i.e. a button is available in the
toolbar:
• The Workspace button allows you to switch between different
workspace views (i.e. combinations of panes). There are three
preconfigured views (Design - which is the default -, Run and Test), but
you can change the content of these views as required, by displaying/
hiding pane(s) via the file menu View > Show panes .
• The Messages, Statistics, and Users button allow you to switch to the
corresponding screens:
• Click Messages, to check the log messages.
• Click Statistics, to learn more about the time needed for processing
the input files in a particular folder. Note that only folders for which
the property Show in statistics is enabled are shown in this pane.
(See About flow element properties on page 23)
• Click Users to determine which users are allowed to use Remote
Designer or have access to certain Checkpoints and Submit points
via SwitchClient.
• The other buttons are used to work with flows and to manage log
messages.
Note: Not all buttons are available in all views. The above
described buttons are displayed in the default Workspace - Design
view.
3 Flows pane
Gives an overview of the flows in your workspace. The selected flow is
shown on the canvas (#4).
The properties of the selected flow are shown in the Properties pane (#5).
4 Canvas
5 Properties
pane
Gives a visual representation of your flow and allows you to design flows.
6 Jobs pane
Shows the content of the backing folder of a selected flow element. This
allows you to see which files are where in the flow.
7 Flow
elements
pane
Contains all flow elements that can be used for designing flows.
Gives an overview of the properties of the flow selected in the Flows pane
(#3) or the flow element selected on the Canvas (#4).
Note: The number of flow elements depends on the modules you
have licensed. For example, the Configurator elements are only
available if you have licensed the Configurator module.
18
Switch
4.3 Before you start
If you want to automate a process, we recommend analyzing the process in detail first.
Think about:
• Where the files/jobs come from (the input).
• What you want to do with them (processes).
• Where you want them to go (output).
Tip:
• Use diagrams to visualize your flows, before actually configuring them in Switch!
• Try to break down your workflows into smaller flows, focused on one task: it’s much
easier to work with small flows than with large and complex flows, which are difficult
to debug.
4.4 Creating your first flow
Working with flows always requires the following steps:
1. Create a new flow for the process you want to automate.
A wizard will guide you through the flow creation process. You can start from a blank flow
(and design it from scratch) or start from a sample flow.
2. Design your flow, by dragging the required flow elements onto the canvas.
You must configure the properties of all flow elements and connections on the canvas.
3. Run your flow: i.e. save, activate and test the flow using test files, until you are happy with
the result.
4.4.1 Step 1: Creating your flow
Although there are different flows types available to start from, for your first flow(s), we
recommend starting from scratch (blank flow).
To create a blank flow
1. Do one of the following:
•
In the toolbar at the top of the screen, click
• From the menu, select Flow > New Flow... .
.
19
Switch
• In the Flows pane, right-click and select New Flow.
The Welcome screen of the Create new flow wizard appears.
2. Select Blank flow and click Next.
3. Enter a name and a description for your flow and click Next.
The name will appear in the Flows pane; the description will be shown in the Properties
pane when you select this flow.
The chosen settings are shown. You can still go back to the previous screen and change
them, by clicking the Previous button.
4. To create the flow, click Finish.
The flow is displayed in the Flows pane. In the Properties pane, you can see the flow's
properties, for example the name and the description you have entered in the wizard.You
can now add flow elements as required.
4.4.2 Step 2: Designing your flow
You are now ready to design your flow:
1. Add flow elements to the canvas.
2. Connect them through Connections.
3. Configure the flow element properties.
4.4.2.1 About flow elements
Flow element types
Remember the difference between the flow elements available in the Flow Elements pane:
• The Connection flow element is a special type, connecting other flow elements and
determining how jobs (i.e. files and file folders) can move from one flow element to another.
• The Folder flow element can be used to deliver input files and to store the processed files,
but it is also used to (temporarily) store or modify jobs in between processes.
• Various other flow elements allow you to handle jobs.
For more information about the flow elements, refer to About working with Switch on page 7.
Search field
To find the flow element you need, you can use the Search field at the top of the Flow Elements
pane.
Just enter a keyword, and the associated flow elements will be shown. For example, if you
enter the word preflight, you will see all flow elements that can be used to preflight jobs
(Enfocus PitStop Server, callas pdf Toolbox configurators) or to deal with preflighted jobs (Sort
by preflight state).
20
Switch
Tooltips
Switch provides you with tooltips for every field or element in the GUI.
So, if you are not sure about the meaning of a flow element, move your cursor over it and a
tooltip will appear.
Furthermore, to learn more about the Configurators and what they are used for, you can rightclick the Configurator and select Info on third-party application or Documentation.
Problem jobs
21
Switch
The Problem jobs folder element is a special element that keeps track of jobs that cannot be
processed. This is the case if a job matches none of the filters set on a Connection, if an invalid
file format is sent to a third party application configurator, and so on.
Always add this element to your flow; otherwise you may not be aware of the fact that there are
problems with your flow...
Note: The Problem jobs folder element does not require any connections. It can have an
outgoing connection that handles failed jobs, but if there is no outgoing connection, the
failed jobs stay in the folder until a user handles them manually.
4.4.2.2 Adding flow elements to your flow
You need at least one flow element for the input and one for the output; additional elements may
be required depending on the processes you want to automate.
Input and output: The most basic flow consists of two Folder elements, one for the input and
one the output (see example below), but depending on the way you want to deliver your input and
receive the output, you can select other elements, such as FTP Receive… (See Input on page 8
and Output on page 13).
Processes: A number of flow elements allow you to perform processes, such as Merge PDF,
Compress, ... See Processes: standard processes on page 9 and Processes: additional processes
on page 10).
22
Switch
To add a flow element to your flow
Do one of the following:
• Drag the icon for the desired flow element from the Flow Elements pane onto the canvas
in the desired location.
• Right-click a blank area of the canvas and select Add > <category> > <desired flow
element> .
4.4.2.3 Warning when adding flow elements
If you drop a flow element on the canvas, a warning icon may appear. To see what the problem
is, move your cursor over the icon and check the tooltip.
Note that in some cases additional information (warnings or errors) is available in the log
messages in the Messages pane (See further: Troubleshooting problems when running a flow on
page 34).
4.4.2.4 Connecting flow elements
Next step is connecting the flow elements on the canvas, using the Connection flow element.
To connect two flow elements that are already present on the canvas
Do one of the following:
• Drag the Connection icon from the Flow Elements pane and drop it onto the first flow
element; then click the second flow element.
• Double-click the first flow element; then click the second flow element.
• Right-click the first flow element and select Start connection; then click the second flow
element.
A connection line connects the two flow elements.
4.4.2.5 About flow element properties
After you have placed the required flow elements on the canvas, and connected them as
required, you must configure each flow element's properties.
23
Switch
Properties pane
The Properties pane displays the properties of the selected flow element.
Each flow element type has its own specific properties.
For example, FTP receive has properties to identify the FTP server, whereas the Folder element
has a property for the file path.
Properties may also be different, depending on the flow element(s) the selected element is
connected to.
Example of the properties of an FTP receive flow element:
Example of the properties of a Folder flow element:
24
Switch
Tip: Remember that you can display a tooltip for each of the property fields.
Default values
Switch fills the properties with meaningful/default values; you only have to specify values
that Switch cannot know (e.g. FTP/e-mail server address, user names and passwords, e-mail
addresses for notifications…) and values that are different from the default values.
Filters
Example of the properties of a Connection flow element:
The Connection properties allow you to filter, i.e. exclude or include particular files (or file
folders, depending on the connected elements) moving along the connection. Filter properties
can be used to sort files, based on file types, file patterns … (see image below).
25
Switch
Example of a flow with filtering via the Connection properties
In this example, only PDF files will be sent to the output folder; all other files will be sent to a
Problem jobs element. Alternatively, you could add a second output folder, to take care of the
non-PDF files. The connection to this second output folder should have the property Include
these jobs set to All other jobs.
To see which file types are defined, you must click the Include these jobs property, select File
types defined and check the dialog that pops up.
26
Switch
Tip: It's handy to mention the sorting method in the name of your Connection.
Hold jobs allows you to stop files from being routed to the next folder; the files remain in the
source folder, and you can check their properties via the Jobs pane. See About sample jobs on
page 43.
This also allows Switch to use the input as an example when defining variable parameters. For a
use case, see exercise 3.
Note: If a connection is set “on hold”, the connection is shown as an orange dashed line.
4.4.2.6 Configuring flow element properties
To change the properties of a flow element
1. Select the flow element of which you want to change the properties.
Note: If you select multiple (similar) flow elements at the same time, you can
change the common properties.
The properties of the selected flow element(s) are displayed in the Properties pane.
2. Click the property you want to change.
Depending on the selected property, a text box, a button, or a drop-down menu appears.
3. Make the required changes:
If ...
appears
Do the following:
A text box
A dropdown
menu
Type the text in the displayed text field.
Select the appropriate option.
1. In the the property editor dialog that pops up, update the field(s)
as required.
2. Click OK.
27
Switch
If ...
appears
Do the following:
1. From the pop-up list, select one of the options.
Depending on the selected option, an inline editor or a dialog
appears.
2. Configure the desired values.
Your changes are applied immediately.
4.4.2.7 Adjusting the layout of your flow design
If you have designed a flow with many flow elements, it is important to keep it clear and wellarranged. Switch provides you with a number of tools to do this:
• You can align your flow elements (place them all on one line, horizontally or vertically).
• You can adjust the layout of the connections.
• You can change the color of the connections and folders, for example to distinguish between
local and network folders.
Tip: For a better overview, we recommend using meaningful names for flow elements
and connections.
Example:
Before: Disorganized and sloppy...
After: A neat and well-arranged layout:
28
Switch
In the above example, the green color is used to indicate how the files should move if nothing
goes wrong.
Aligning flow elements horizontally
To align flow elements horizontally
1. Select the flow elements to be aligned.
2. Do one of the following:
• On Windows OS:
Select Edit > Align Horizontally , or press Ctrl + Shift + H.
• On Mac OS:
Select Enfocus Switch > Align Horizontally , or press Command + Shift + H.
Aligning flow elements vertically
To align flow elements vertically
1. Select the flow elements to be aligned.
2. Do one of the following:
• On Windows OS:
Select Edit > Align Vertically , or press Ctrl + Shift + V.
• On Mac OS:
Select Enfocus Switch > Align Vertically , or press Command + Shift + V.
Adjusting the layout of a connection
By default, connections are drawn as straight lines between two flow elements. You can
however adjust these lines to make a well-arranged design.
1. To draw the connection along the sides of a rectangle (with a rounded corner)
a. Select the connection.
29
Switch
b. Do one of the following:
• Right-click the connection and select Vertical, then horizontal or Horizontal, then
vertical.
• In the Properties pane, set the connection's Corner angle to -90 or +90.
2. To draw the connection along a route somewhere in between these extremes
a. Select the connection.
b. Do one of the following:
• Move your cursor over the connections's corner until a drag handle (blue circle)
appears, and drag the handle to the desired direction.
• In the Properties pane, set the connection's Corner angle to a value between -90 or
+90.
Adjusting the colors of folders and connections
To make it easy to distinguish between different folder or connection types, for example
between network and input folders, you can change the default color for folders (yellow) and
connections (gray).
To adjust the colors of folders and connections
1. Select one or more connections or folders.
Note: You cannot combine connections and folders in one selection.
30
Switch
2. Right-click to open the context menu.
3. Click Choose color and select the appropriate color from the list of predefined colors.
You can choose one of the following colors:
• Gray (default), Yellow, Green, Cyan, Blue, Magenta for connections.
• Yellow (default), Orange, Green, Cyan, Blue, Magenta for folders.
Alternatively, you can set the color via the Properties pane.
Keep in mind that "conditional" colors (e.g. orange for connections on hold) will take priority
over custom colors.
For example, even if you have chosen green for a particular connection, its color will change to
orange when the connection is set on hold. When the connection is released, the chosen color
(green) will be restored.
4.4.3 Step 3: Running your flow
Once you have configured the flow elements, you can save, activate and test the flow, to see if it
does what you expect it to do. If this is not the case, Switch offers a couple of tools to investigate
what's going on, so you can solve the problems.
4.4.3.1 Saving a flow
In the Flows pane, unsaved flows are displayed in italics, followed by an asterisk.
To save a flow
1. In the Flows pane, select the flow you want to save.
Optionally, you can select several flows, to save them all in one go.
2. Do one of the following:
•
In the toolbar at the top of the screen, click
.
• In the Flows pane, right-click and select Save Flow(s).
• From the menu, select Flow > Save Flow(s) .
In the Flows pane, the flow name is no longer displayed in italics and the asterisk has
disappeared.
31
Switch
Note: As soon as you start making changes to the saved flow, the name is again
displayed in italics, followed by an asterisk. Note that you can always go back to the
last saved version, by clicking the Revert Flow button in the toolbar.
4.4.3.2 Activating a flow
If you want a flow to start processing jobs, you must activate it.
To activate a flow
1. In the Flows pane, select the (inactive) flow you want to start.
2. Do one of the following:
•
In the toolbar at the top of the screen, click
.
•
In the Flows pane, click
and select Activate Flow.
• In the Flows pane, right-click and select Activate Flow.
• In the Flows pane, double-click the selected flow (only possible in case of a single flow).
• From the menu, select Flow > Activate Flow .
If you haven't saved your flow yet, a warning pops up. Note that clicking Save, will save all
flows with unsaved changes. If you do not want to save all unsaved flows, click Cancel and
manually save the flows as required.
The background of the flow is darkened. In the Flows pane, you can see an icon
the name of the flow. The flow is now active and waits for input jobs to appear.
next to
4.4.3.3 Testing a flow
Input for testing
To test the flow, make sure to provide Switch with some meaningful input:
• If you have chosen a Folder element for your input:
• If you have entered a file path in the Folder element property Path, make sure it contains
some appropriate input files or folders.
• If you haven’t configured a path in the Folder element property Path, drag and drop the
input from your local computer onto the input element on the canvas.
Note: In that case, the value of Path is Auto-managed (which is the default value).
Auto-managed folders are folders that are created automatically (by Switch) in
the application data root folder. Note that the the path to the application data root
folder can be configured via Preferences > Application data > Application data
root .
32
Switch
• If you have chosen a Mail receive or an FTP receive flow element, make sure that some
input is available on the configured mail or FTP server.
• If you have selected a Submit point, you must provide your input using SwitchClient. For
more information, refer to the Switch Reference Guide.
Switch will process the input as soon as the flow is activated.
Information while processing
While the flow is running, Switch gives you information about the jobs being handled and their
progress:
• The number of jobs being present in a folder is indicated on the canvas. This allows you to
see how files move along a flow and where they are being hold.
If more than 100 jobs are present in a particular folder, Switch doesn't display the number,
but instead displays the symbol for infinity.
• Problem jobs and problem processes are marked with an error mark icon.
If the icon appears next to a Problem jobs folder, the Problem jobs folder contains at least
one file or file folder. This may be due to the fact that the job does not match the filters set on
a Connection element.
If the icon appears next to a flow element for processes, there may be a problem with this
element, for example a network error (so jobs can no longer be transported), or an invalid
property.
33
Switch
If the icon appears next to a folder element, probably the backing folder is not accessible
anymore, for example because it does not exist anymore, or because the local network
connection is broken.
Output
Carefully check the output.
In case of problems:
1.
Stop the flow, by clicking the
button.
2. Review the properties of the flow elements.
3. Activate the flow again, to see the result of your changes.
Tip: Not clear what the problem is? Have a look at Troubleshooting problems when
running a flow on page 34.
4.4.3.4 Troubleshooting problems when running a flow
In case of problems, have a look at the following panes.
Tip: If you open the Workspace in Run view (by selecting View > Run ), all three panes
are shown by default.
The Log messages pane
This pane gives an overview of all processes performed in Switch.
Warnings are shown in yellow, error messages are shown in red.
As this pane may contain a long list of messages, it may be useful to filter out the messages that
are relevant to you. To filter log messages, just type the values in the fields at the top (but do not
forget to remove them afterwards!).
To sort the messages based on a particular field (i.e.column), click the column headers.
34
Switch
How to display this pane?
•
In the toolbar, click
, or
• From the menu, select View > Messages .
Note that it is possible to set up multiple Messages panes (e.g. Messages 2 for all messages
related to FTP, and Messages 3 for all error messages). To display these additional Messages
panes, on the menu, click View > Show panes > Messages 2 or Messages 3 .
The Progress pane
This pane displays progress information for tasks currently being executed by the Switch
Server, for example downloading files from FTP or distilling a PostScript file.
How to display this pane?
From the menu, select View > Show panes > Progress .
The Dashboard pane
The Dashboard pane displays an overview of current problems with the flow (opposed to the
Messages pane, which gives an overview of problems in the past).
35
Switch
How to display this pane?
From the menu, select View > Show panes > Dashboard .
4.5 Exercise 1: Sorting files by file type
Instruction
Create a flow where files can be placed manually in an input folder. Switch should sort the input
into two categories: PDFs and non-PDFs.
Test files
Download the test files: http://www.enfocus.com/webmarketing/Switch12tutorial/
Switch12tutorial.zip
Solution
• Review the step-by-step solution.
• Have a look at the video explaining how to build this flow http://youtu.be/u8BT8llg3RI.
4.5.1 Exercise 1: Solution
This topic explains how to create a basic flow, which sends all input files first to an intermediate
folder and then sorts them into two categories (PDFs versus all other files).
1. Open Switch.
2. Create a new blank flow and rename it to Tutorial 1 Flow.
a. Create a new blank flow.
b. Make sure the flow is selected and in the Properties pane, click the Name field.
c. Replace New flow 1 with Tutorial 1 Flow.
3. Add a Folder flow element (for the input), and configure the properties as required.
In this exercise, the input folder should be named Input1 and linked to a physical folder on
your desktop.
36
Switch
a. From the Flow Elements pane, select the Folder flow element and drag it onto the blank
flow canvas.
As you drag the item onto the flow canvas, you should see it drag with your cursor. You
should place it on the left side of the canvas.
b. Select the folder on the canvas.
c. Change the name in the Properties pane to Input 1.
d. Link the Folder element to a physical folder on your desktop.
1. Make sure that the new folder is still selected.
2. In the Properties pane, click Path.
3.
Click
.
4. Select Choose folder.
5. Select Create new and create a new folder on your desktop called Input flow 1.
6. Click Select folder.
Note: With a production workflow, the folder being linked to can be anywhere on the
network. As long as the Switch Server can access the shared volume, it can link to
the folder.
4. Add a second folder.
Name this folder Sort for PDF. This will remain an Auto-managed folder. We recommend
using auto-managed folders for intermediate folders within a workflow, so files are not
moved unnecessarily over the network.
5. Add two more folders to the upper right and lower right of the Sort for PDF folder.
Name the top folder PDFs and the bottom folder All other files.
6. To take care of files that (for any reason) cannot be processed, add a Problem jobs flow
element.
Your flow now looks like this:
7. Connect your Folder elements (but not the Problem jobs element!).
37
Switch
a. Double-click the Input 1 folder.
A connection appears.
b. Move your cursor to the Sort for PDF folder and click that folder.
A connection is made between the two folders.
c. Make a similar connection from Sort for PDF to the PDFs folder and the All other files
folder.
Note: Always start a connection with the folder from where the files will "flow from"
and then connect to the folder they will move to. Connections have a direction of flow
noted by the arrow in the middle of the connection.
Your flow now looks like this:
8. Now change the connection settings, to make sure that PDF files are moved to the PDFs
folder, and all other files to the All other files folder.
a. Click the connection between the Sort for PDF and PDFs folder.
The connection highlights in purple.
b. In the Properties pane, select the Include these jobs property.
c.
Click
and select Define file types from the pop-up menu.
1. In the Define file types: Include these jobs dialog, select Adobe PDF (*.pdf).
2. To add it to the include list (right side), click Add.
3. Click OK.
d. Click the connection between the Sort for PDF and All other jobs folder.
e. In the Properties pane, select the Include these jobs property.
f.
Click
and select All other jobs from the pop-up menu.
Now your flow is complete.
9. Save the flow.
To do so, click the Save Flow button at the top of the design window.
38
Switch
10. Activate the flow.
To do so, click the Activate Flow button at the top of the design window.
The design window with the flow should turn gray with numbers showing "0" for each folder
in the flow. The numbers tell you how many files are in that folder at any given time.
Your flow now looks like this:
11. Drop your test files in the flow input folder on your desktop.
You can use your own files (PDF and non-PDF) or you can use the sample files found in
"Tutorial Job Folder" folder.
Switch will recognize these files within 10 seconds (which is the default scanning time for
an input folder) and you will see the counter change to match the number of files in the
folder. Shortly after, the end folder counters will increment with the proper number of files
depending on the sorting.
12. To check the results, click the PDFs folder or the All other files folder.
In the Jobs pane you can view what files are in these folders. PDFs should be in the PDFs
folder and all other file types should be in the All other files folder. If they are not, then
double-check the Connection settings (see step 7) and try the flows again.
Note: You can delete files from the output folders by clicking the file name in the
Jobs pane and hitting the Delete key.
4.6 Exercise 2: Sorting by file name pattern
Instruction
Duplicate the flow you created in exercise 1 and change the sorting method; instead of sorting
based on file type, now the input should be sorted on file name pattern:
39
Switch
• If the file name contains Part1 (e.g. JobsPart1.pdf or Part1_jobs.pdf), it should be moved to
the PDFs folder.
• All other files should be moved to a folder named All other files.
Note: This type of flows can be useful when receiving files from a Web to Print system,
or for any workflow where the file name can contain file name patterns to identify job
type, color model or other characteristics that are important to your workflow.
Test files
Download the test files: http://www.enfocus.com/webmarketing/Switch12tutorial/
Switch12tutorial.zip
Solution
• Review the step-by-step solution.
• Have a look at the video explaining how to build this flow http://youtu.be/GIwDS8kvnvw.
4.6.1 Exercise 2: Solution
This topic explains how to duplicate a flow and change the sorting method from sorting based on
file type to sorting based on file name pattern.
In this example, if the file name contains Part1 (or part1), it should be moved to the PDFs folder;
all other files should be moved to All other files.
1. Duplicate Tutorial 1 Flow.
a. In the Flows pane, click Tutorial 1 Flow.
b. Right-click and select Duplicate flow.
2. Rename the flow.
a. In the Properties pane, select Name.
b. Replace Tutorial 1 Flow [Copy] with Tutorial 1B flow.
3. Define the new settings for sorting.
a. Select the connection between Sort for PDF and PDFs.
b. In the Properties pane, click the Include these jobs field.
c.
Click
and select Define file patterns from the pop-up menu.
d. In the Define file patterns: Include these jobs dialog, type *part1* and click OK.
The asterisk (*) is a wild card character. The case of the characters is not taken into
account; *part1* will match Part1, part1, PART1 and so on.
40
Switch
4. Check your results.
a. Save and activate the flow.
b. Add relevant input files, for example the two tutorial 1 PDF files.
c. Check the content of the PDFs and All other files folder (in the Jobs pane).
Job_Part1.pdf should be routed to the PDFs folder; Job_Part2.pdf should be routed to the All
other files folder.
41
Switch
5. Working with Switch
This part of the QuickStart explains some more advanced topics, such as working with sample
jobs, submitting job folders and passing data from one flow to another.
5.1 Using embedded metadata and file information
Switch allows you to use job information that is embedded inside a job, as part of the file, for
example within XMP metadata, EXIF or IPTC tags. You can use this information to sort jobs, or
use it as a reference in e-mail messages.
Note: Switch also supports metadata datasets stored as external files associated with
the job. If this is XML, XMP or JDF metadata, then Switch offers convenient access to the
metadata file content. For other file types (TXT etc.), script expressions can be used to
access the file content.
Some examples of embedded metadata
•
•
•
•
•
Number of pages
Author
Creation date
Paper type
...
Example use cases
To decide whether or not a job must be sent to an ink optimizer, you can use the information
about the paper type (coated versus uncoated) embedded inside the job; to sort jobs based on
quantity, you can use the information about the number of copies...
If you want to send an e-mail notification to the customer, you can either manually enter the
customer's e-mail address, or you can extract the customer's e-mail address from the job. You
can also refer to the customer's reference number, or other relevant metadata.
Note: If the job was submitted via e-mail, the sender's e-mail address is automatically
stored in the metadata dataset, associated with the job. So you can later extract this
address to send e-mail notifications.
Variables
In Switch, metadata can be accessed by means of variables.
There are two types of variables:
• Switch variables, which are not related to a particular job, such as [Swich.FlowName],
[Switch.Language], [Switch.ServerName] ...
• Job-related variables, such as [Job.Size], [Job.EmailAddress]...
42
Switch
When jobs are being processed, these variables are replaced with actual values. To see these
variable values, you should run a "sample" or trial job. Refer to About sample jobs on page 43.
How to use embedded metadata in Switch
• If you want to use metadata to sort jobs, you must select a Connection flow element and
exclude or include jobs using Conditions with variables.
Defining a condition with variables on page 45
• If you want to use metadata in e-mail notifications, you must select a flow element that
supports attaching e-mail notifications to the job (e.g. Folder element) and select Define
multi-line or single-line text with variables. The attached e-mail information (addresses,
body text) can later be used by the Mail send tool to send the e-mail notifications.
Defining text with variables on page 47
5.1.1 About sample jobs
Sample jobs are trial jobs.
If you have used variables to configure conditions (for example to sort or rename jobs) or to
define text (for example to customize e-mail notifications), sample jobs allow you to check the
actual values of these variables for a particular job.
Note: Switch can only display variable values if the flow contains at least one valid
sample job.
Sample jobs are also useful to check what's going on at each step of the flow.
43
Switch
How does it work?
Once you have designed a flow, you must set one of the connections, before the end of the flow,
on hold. When you activate the flow and input a job to the flow, the job will remain in the folder
just before the “on hold” connection, and you will see it appear in the Jobs pane.
Note: As soon as a job is submitted to Switch, it receives a unique name prefix. Switch
uses this prefix to identify jobs. Note that only jobs receive a prefixed name; files inside a
job folder (e.g. an InDesign folder) do not receive a prefix.
Prefixes can be stripped at the moment the job reaches the flow output folder (i.e. folder
without any outgoing connections). When the prefix is stripped, the job is considered
processed and Switch has no control over this job anymore.
Example
In the above example, the Check single pages folder element contains 1 file (test.pdf with prefix
0001A).
When you now open an editor that supports variables (e.g. if you are selecting the Connection
property Include these jobs), you will see that the sample jobs are available in the dialog, and
can be used to define conditions for sorting the incoming files.
44
Switch
5.1.2 Creating a sample job
A sample job allows you to see sample variable values in a flow, for example to make it easier
to define conditions for the connections or text/e-mail addresses that will be used in e-mail
notifications.
For more information, refer to About sample jobs on page 43.
To create a sample job
1. Create and design the flow.
2. Save and activate the flow.
3. Put a connection at the end of the flow on hold.
4. Place test jobs in the flow and let them process to the desired stage.
5. Deactivate the flow.
The sample jobs are visible in the Jobs pane. They have a unique prefix. When you now open a
property editor that supports variables, you will see the sample jobs at the top of the property
editor.
5.1.3 Defining a condition with variables
Variables allow you to use information embedded inside a job, and use this information to define
conditions for example for including or excluding jobs. Conditions always consists of a variable,
an operator, and a value (this can be a fixed value or another variable).
For example, if you want to sort jobs by the number of pages they contain (more or less than
100 pages), you should define conditions such as "[Number of pages] <= 100" (for the first
connection) and "[Number of pages] > 100" (for the second connection).
To define a condition with variables
1. Select a Connection element.
45
Switch
2.
In the Properties pane, click Include/Exclude jobs and select
variables.
> Define condition with
3. Select the sample job for which you want to see the sample values for variables.
To be able to see the sample values, you need at least one valid sample job. Refer to
Creating a sample job on page 45.
4. Define the condition, starting with the first element (always a variable).
a.
Under Condition, next to the first field at the left, click
b. Search for the variable you need.
.
Select a group (from the first column), and a variable belonging to that group (from the
second column). In the third column you will find information about the selected variable
and (at the bottom) the value of that variable as found in the sample job (if the variable is
job-related).
Note: If the variable is not job-related (like Switch.FlowName), the sample value
of the variable will be the same, regardless of which sample job you select.
For example, the variable "Number of pages" can be found in the group Stats.
Depending on the selected variable, you may have additional options (displayed at the
right), e.g. in case of dates, to define the format of that date.
c. Click Insert variable.
The Text with variables field (below the columns) shows the selected variable.
d. Click OK.
5. Now select an operator from the list (next to the selected variable).
For example: Equal to, Contains, Matches, ...
6.
To enter a value, click
(next to the second field).
• To enter a fixed value, select Inline value and type the required value in the text field.
• To enter a variable value, i.e. a variable, select Define single-line text with variables and
proceed as explained in step 4.
The Sample value indicates whether or not the sample job matches the defined condition.
For example, if the sample job has 20 pages and the condition states that Number of pages >
100 , the value in this field will be "false".
7.
To add more conditions as required, click
steps 4-6).
and define another condition (repeat
8. Click OK.
46
Switch
The value of the Include/exclude these jobs property is set to Condition with variables
defined.
5.1.4 Defining text with variables
Variables allow you to use metadata information for a job, and use this information (for example
the customer or its reference number) in e-mail notifications.
To define text with variables
1. Select a flow element that supports attaching e-mail information, such as the Folder
element.
2. In the Properties pane, click Attach email addresses or Attach email body text (depending
on what you want to configure).
3.
Select
> Define multi-line/single-line text with variables.
4. If a dialog pops up, type the required text or e-mail addresses, and click Define variables to
insert a variable.
If you selected Define single-line text with variables, no dialog pops up. Proceed with the
next step.
5. Select the sample job from which you want to see sample values for variables.
You need at least one valid sample job. Refer to Creating a sample job on page 45.
6. Search for the variable you want to insert:
a. Select a group (from the first column).
b. Select a variable belonging to that group (from the second column).
In the third column you will find information about the selected variable and (at the
bottom) the value of that variable as found in the sample job. Depending on the selected
variable, you may have additional options (displayed at the right), e.g. in case of dates, to
define the format of that date.
c. Click Insert variable.
The Text with variables field (below the columns) shows the selected variable.
Note: You can put more variables in this 'text with variables' field as well
as any extra text. When the jobs will be processed in this flow, the variables
will be replaced with their actual values. For example, a line like "The
[Job.NameProper] has size [Job.Size] bytes" will be replaced with something like
"The testfile has size 5412 bytes" and this new line will be used as the value of
the property (for example, attached as e-mail body if the corresponding property
is involved).
d. Click OK.
7. If you selected Define multi-line text with variables in step 3, to insert more variables,
repeat steps 4 to 6.
If you selected Define single-line text with variables, all variables must be inserted at once.
47
Switch
8. To close the dialog as required, click OK.
5.1.5 Exercise 3: Sorting files by information contained within the
PDF file
Instruction
Duplicate the flow you created in exercise 1 and change the sorting method; instead of
sorting based on file type or file name pattern (exercise 2), now the input should be sorted on
information from within the PDF file. In this example, only documents with a trim box size of 144
x 252 pixels should be routed to the PDFs folder.
Note: Other information that could be used to sort files is for example: page width and
height, page count or color model used.
This method can be useful to confirm or use information that is native to the PDF files you're
processing.
For example, if you have a workflow for business card production, you may want to confirm the
files entering the workflow are business card size. This would allow you to look at the actual
size defined within the file and confirm it's correct before processing.
Test files
Download the test files: http://www.enfocus.com/webmarketing/Switch12tutorial/
Switch12tutorial.zip
Solution
• Review the step-by-step solution.
• Have a look at the video explaining how to build this flow http://youtu.be/GIwDS8kvnvw.
5.1.5.1 Exercise 3: Solution
This topic explains how change the sorting method from sorting based on file type to sorting
based on variables.
In this example, only files with a trim box size of 144 x 252 pixels should be moved to the PDFs
folder; all other files should be moved to All other files.
1. Duplicate Tutorial 1 Flow and name it Tutorial 1C flow.
2. Set the connection between Sort for PDF and PDFs on hold.
a. Select the connection between Sort for PDF and PDFs.
b. Right-click and select Hold.
Alternatively, you can set the Connection property Hold jobs to Yes.
This stops the flow and holds the input in the Sort for PDF folder. This will allow Switch
to use this PDF as an example when defining a condition with variables.
3. Save and activate the flow.
4. Add a PDF file (e.g. Job_Part1.pdf) to the flow.
48
Switch
5.
Once the file has been moved to Sort for PDF, click
to stop the flow.
6. Define the sorting parameters.
a. Select the connection between Sort for PDF and PDFs.
b. In the Properties pane, select the Include these jobs field.
c.
Click
and select Define condition with variables from the pop-up menu.
In the Define condition with variables dialog the test file is listed (as shown above).
d.
Under Condition, next to the first field, click
to edit the variable parameters.
The Define text with variables dialog lists all the variables available for selection.
e. Select the file at the top of the Define text with variables dialog and set the variable
condition as follows:
1. From the Groups column, select Stats.
2. In the Variables column, select TrimBoxHeight.
Note that the values in the column to the right change as you make your
selection.The value of the selected variable in the test file (in this example: the height
of the trim box in Job_Part1.pdf, i.e. 144 (pixels)) is displayed in the bottom part of the
3rd column.
3. Click Insert variable.
f.
The Text with variables field displays the variable that will be used for sorting the
input files, in this example: [Stats.TrimBoxHeight].
4. Click OK.
In the Define condition with variables dialog, select Equal to and type 144.
You have defined the first condition.
49
Switch
g.
To add a second condition, click
and select AND.
h. Repeat the previous steps, to define an additional condition, i.e. set the required trim box
width to 252.
i. Click OK to complete the setup.
7. Check your results.
a. Select the connection between Sort for PDF and PDFs.
b. Right-click and select Release.
Alternatively, you can set the Connection property Hold jobs to No.
c. Save and activate the flow.
d. Drag and drop Job_1.pdf and Job_2.pdf into the Input 1 folder within the flow.
Job_1.pdf is moved to the PDFs folder and Job_2.pdf is moved to the All other files folder.
5.2 Working with job folders and subfolders
As explained earlier, Switch accepts both files and folders (such as InDesign folders) as input,
and moves them along the flow as one entity. However, sometimes single files that have to
be processed as separate files are also submitted in a hierarchy of subfolders, for example
because the customer sorts them by project or by date.
Switch cannot distinguish between real job folders (to be processed as one entity) and files in a
subfolder hierarchy (to be processed as separate files), unless you use one of the following flow
elements dedicated for working with hierarchy structures:
•
•
•
•
The Ungroup flow element
The Submit hierarchy flow element
The Set hierarchy path flow element
The Archive hierarchy flow element.
5.2.1 The Ungroup flow element
The Ungroup element, used in combination with the Assemble job element, allows you to
process files separately, while keeping track of their original place in the folder structure.
How does it work?
1. The Ungroup element, placed at the beginning of the flow, disassembles the input files that
enter the flow in a particular subfolder structure into separate files.
2. Each of these files is processed separately (depending on the elements in the flow).
3. At the end of the flow, an Assemble job element is used to re-assemble the files into a job
folder that is identical or similar to the incoming job folder.
50
Switch
Note: The Assemble job flow element offers different ways (schemes) for regrouping the processed jobs. If you want to restore the original folder structure
(=remembered by the Ungroup flow element), you should set the Scheme property to
Ungrouped job.
The Subfolder levels property is another important property. To make sure that all
subfolders are restored, we recommend entering a very high value (e.g. 999).
Example
In this example, the input is:
• First ungrouped
• Then renamed
• Finally re-assembled
We need so many intermediate folders, because only folder elements can be interconnected
directly; between two non-folder elements, you need to add at least one folder element.
Below you can see the result of this flow: all files have been processed separately (i.e. the file
names have changed), but the folder structure is still the same.
Note:
51
Switch
A job cannot be reassembled until all the files for that job are available. For example,
if some of the input files are sent to the Problem jobs folder, the job cannot be
reassembled!
5.2.1.1 Exercise 4: Ungrouping and regrouping a folder with
multiple files
Instruction
Create a new flow that supports file folders with multiple input files in subfolders. Sort the
input files by file type; PDFs should be sent to one folder (PDF); all other files should be sent to
another folder (Other Files). Then collect all files again in one folder and make sure the original
folder gets restored. Use a sample job to check how the job folders are ungrouped.
Note: Ungrouping and reassembling folders helps you to save time, because you don't
need to extract the files manually. This is useful if a folder hierarchy contains different
file types that each require specific processing. For example, if you want to convert all
images in an InDesign package to CMYK, you can sort out the images, process them
using Photoshop (with the Photoshop configurator), and finally restore the original
package, without any manual intervention.
Test files
Download the test files: http://www.enfocus.com/webmarketing/Switch12tutorial/
Switch12tutorial.zip
Solution
• Review the step-by-step solution.
• Have a look at the video explaining how to build this flow http://youtu.be/0Mxqci8oCuM.
Exercise 4: Solution
This topic explains how to group and ungroup a job folder.
1. Create a new flow (Tutorial 2 Flow) with an input folder (called Input).
2. From the Flow Elements pane, add the Ungroup job element to the right of the Input folder.
No settings are required. The job folders that flow through this element will be ungrouped
into their individual files. Switch will automatically remember the structure and add it to the
files as private data, so that they can be reassembled later if needed.
3. Add the following flow elements:
• 4 job folders (Sort, PDF, Other files, Collect)
• 1 Assemble Job flow element
4. Define settings to reassemble the job, This will tell the flow element to look for complete
jobs that were "Ungrouped" before reconstructing them.
a. Select the Assemble Job flow element.
b. In the Properties pane, select the Scheme property and set its value to Ungrouped job.
52
Switch
c. Change the Subfolder levels property to 2, so that it reassembles the job folder with up
to two subfolder levels. If the original job folder contained less levels, the extra level will
be ignored.
5. Add a new folder called Regroup to the right of the Assemble job flow element.
6. Connect all the elements (see screenshot).
7. Change the connection properties to sort for PDFs (see exercise 1).
8. Check your results.
Before this flow is activated, put one of the connections on hold, so that you can see how the
job is disassembled and reassembled. The connection changes to a dashed line (see below).
a. Save and activate the flow.
b. Drag and drop the entire job folder, Tutorial Job Folder into the Tutorial 2 input
folder. Note that the job folder is constructed as follows:
53
Switch
When the job processes, the number of files in the PDF folder increments to 2 and the
Collect folder increments to 3.
c. Click each folder and review the Jobs pane to see how the job folder has been
ungrouped.
d. Right-click the connection between the PDF folder and the Collect folder and select
Release.
This will allow the PDF files to move forward in the flow to be reassembled. Note that
the job is not reassembled until all the files for that job are available to reassemble.
e. Now review the Regroup folder.
The original folder structure has been restored.
5.2.2 The Submit hierarchy flow element
The Submit hierarchy element allows you to process files that are stored in a folder structure
with different levels, and to remember the original location of each of these files. Different from
the Ungroup element (which ungroups all files in a folder structure), you can configure this
element to only pick up particular files in particular subfolders.
How does it work?
Switch picks up the required files, based on the properties configured for the Submit hierarchy
element. The main properties are:
• The Path to the hierarchy root: Indicates the highest level where Switch must start searching
for files or folders to be processed.
• The Subfolder levels: Indicates how many levels deep Switch must search for new files or
jobs.
54
Switch
Note that, if the specified level contains another subfolder, this subfolder will be considered
as one job, i.e. it will be processed as one entity, and not as a separate job.
Tip: If you are not sure about the number of levels, or if you want all files to be
processed separately (regardless of their nesting level in the hierarchy), set the
Subfolder levels property to a very high value (for example: 999).
• The Process these folders property: If not all folders on the selected level should be
processed, you can set this property to No and use the following fields to include or exclude
particular folders.
• Attach hierarchy info: By default, once the files have been processed, they are all placed
in the same output folder, at the highest level, unless you set Attach hierarchy info to Yes.
This ensures that the original location of the job in the hierarchy is stored with the file (in a
so called “internal job ticket”), so that it can be used to recreate the hierarchy. Note that this
property is available for other flow elements as well.
Thanks to this mechanism, you can "on the fly" (so while the job is passing different flow
elements) construct the path in which the processed job will be placed.
Hierarchy location path
The hierarchy information is stored as a hierarchy location path, consisting of one or more
segments, each segment representing the name of a (sub)folder in a nested folder structure.
The first segment represents the top-level folder. For example, the folder structure below is
stored as a hierarchy location path consisting of the segments CustomerA, Input and PDF (in that
order).
Tip: Use a sample job to see how the saved hierarchy location path looks like. The
hierarchy is shown in the Hierarchy column of the Jobs pane.
The Hierarchy column is not by default available. To display this column, proceed as follows:
55
Switch
1. In the Jobs pane header, right-click one of the column headers and select Show columns >
Column1 .The new column (Column1) is now visible in the Jobs pane.
2. Right-click the Column1 header and select Set column header.
3. Type Hierarchy and click OK.
4. Right-click the Hierarchy column header and select Set column value > Define text with
variables .
5. Select Job (from the first column) and Hierarchy (from the second column) and click the
Insert variable button.
6. Click OK.
5.2.3 The Archive hierarchy flow element
The Archive hierarchy element allows you to move processed files into a subfolder hierarchy
(instead of a flat structure, with all files in one root folder).
This output folder structure can be the subfolder hierarchy that was used to deliver the jobs
(via a Submit hierarchy element), or a different subfolder hierarchy, for example based on
which routes the job took in a flow. For example, you could move all jobs that were processed
successfully to a subfolder OK, and files with problems to a subfolder Not OK.
How does it work?
The information needed to place the job in the appropriate location is retrieved from the job’s
internal job ticket. The hierarchy information is empty by default. It is created if the Attach
hierarchy information property of a flow element is set to Yes; if the hierarchy information was
not stored in the Submit hierarchy element, it is not available, hence it cannot be used to restore
the original folder structure.
Note: Do not forget to set the Subfolder levels property!
5.2.4 The Set hierarchy path flow element
The Set hierarchy path element allows you to modify the hierarchy location path (stored in the
internal job ticket). This is useful to organize processed jobs in a folder hierarchy, for example
based on the result or the date of processing.
How does it work?
This element provides particular actions to change the hierarchy location path. You can add,
remove, or reverse segments (i.e. parts) of the location path. Note however that you cannot
56
Switch
combine different actions in one Set hierarchy path flow element. Hence, you may have to
combine different elements of this type in order to build the new hierarchy path.
Example
• Original hierarchy location path: Server\CustomerX\Input
• New path (to be used to store the processed files): Server\Customer X\Output\dd-mm-yy
In this example, the highest levels (Server (0) & CustomerX (1) ) must remain unchanged; there
are two new sublevels; one with a fixed name (=Output (2) ), the other with a variable name
(indicating today’s date) (3).
To create the new location path as in the example, two instances of the Set hierarchy path
element are needed:
• Set hierarchy path1 will be used to remove the Input segment (level 2) from the location path.
This results in Server\Customer X.
Properties:
• Action: Remove
• Start index: 2 (subfolder level)
• End index: 2 (subfolder level)
• Set hierarchy path2 will be used to add two new segments: Output (level2) and today’s date.
This results in Server\Customer X\Output\dd-mm-yy.
Properties:
• Action: Add at the bottom (= the new segment should be attached to the end of the current
hierarchy path).
• Path segment 1: Output (= entered as an inline value)
• Path segment 2: The [Switch.FileCreationDate] variable (entered using the Define singleline text with variables editor)
5.2.5 Exercise 5: Receiving jobs from within a server hierarchy
Instruction
Create a new flow that processes all files stored in the subfolders with the name Incoming
(see image below). Once processed, the files must be moved to a new folder with the name
Completed, under the appropriate client name.
57
Switch
Note: This type of flow is useful to work with folders with variable names (e.g. client A,
client B, ...). If new client folders are added, the flow doesn't have to be changed; jobs
will be processed automatically.
Test files
Download the test files: http://www.enfocus.com/webmarketing/Switch12tutorial/
Switch12tutorial.zip
Solution
• Review the step-by-step solution.
• Have a look at the video explaining how to build this flow http://youtu.be/-nu27qeXR-A.
5.2.5.1 Exercise 5: Solution
This topic explains how to create a flow where:
• A new client job or job folder is recognized within a client input folder (in this example:
Server/Client/Incoming).
• The job is processed in Switch.
• The processed files are placed back in an outgoing folder for client review (in this example:
Server/Client/Completed).
1. Place Tutorial 3 Desktop Folder on your desktop.
This will be used to simulate a network server folder structure.
2. Create a new blank flow and rename it to Tutorial 3A Flow.
3. From the Flow Elements pane, select and drag a Submit Hierarchy flow element onto the
canvas.
58
Switch
4. In the Properties pane (with Submit Hierarchy selected), rename the flow element and
define the actual location of the input files.
You should indicate the top-level (level 0), the number of sublevels to be checked by Switch,
the folder names that should be included or excluded, and whether or not the folder
hierarchy should be remembered.
In this example, Switch should pick up input from the Incoming folder of each Client folder
(see image).
a. To rename the Submit Hierarchy element to a meaningful name, set Name to From
Server.
b. To define the top-level directory path, select Path and Choose folder from the pop-up
menu.
Select the Server directory from the Tutorial 3 Desktop Folder.
c. To have Switch look two levels deep, set Subfolder levels to 2.
d. To have Switch look for folder names starting with the string Incomin, but only on level 2:
1. Set Adjusted by (rule 1) to Excluding folders not named.
2. Set Folder name to Define folder patterns and enter Incomin* as value.
3. Set On levels to 2.
e. To have Switch remember the complete path back where the job came from, set
Attach hierarchy info to Yes. This information will be added to the job as private data
(metadata) within Switch.
f. Set Include subfolder levels to 2.
Since this is the same level Switch is looking for files, this will have Switch remember
the entire hierarchy. It can be modified later.
5. Mimic the flow below, by adding flow elements and connecting them.
59
Switch
6. Define a new location for the processed files.
Note: The Set hierarchy path flow elements are used to build a new location path,
based on the original path. In this example, the original path is Server/Client/
Incoming; the new path should be Server/Client/Completed.
a. In the Properties pane of the first Set hierarchy path element:
1. To remove Incoming from the original location path, set Action to Remove.
2. To indicate the level of the hierarchy that will be removed (in this example: the
second level, being Incoming), set Start index and End index to 2.
This will change the path from Server - <Client> - Incoming to Server - <Client>.
b. In the Properties of the second Set hierarchy path element:
1. To add a segment at the end of the hierarchy path, set Action to Add at the bottom.
2. To enter a name for the new segment, click Path segment 1 and select Inline value
from the pop-up menu.
3. Enter a name, in this example: Completed.
7. Now define the properties for the Archive hierarchy element.
a. Set the Path to the original input location (see the Server element in your flow).
b. Change Subfolder levels to 3.
The Subfolder level indicates the number of subfolder levels to be created. The
embedded hierarchy will make sure that the original position is maintained (i.e. that files
are stored in the correct Client folder), while taking into account the changes made in
"Set hierarchy path" (i.e. so that output files are placed in the Completed instead of the
Incoming folder).
c. To maintain the file original names, set Strip unique name to Yes.
This means that the unique prefix name added to the file name by Switch is removed
before placing the job in the archive hierarchy.
d. To indicate what should happen in case of duplicate file names, choose a value for
Duplicates, for example: Overwrite.
8. Check the result.
a. Save and activate the flow.
b. Place a new job in one of the input folder (e.g. in Server/Client B/Incoming).
This can be a folder or a single file (any file can be used).
c. Check the output.
The output should be found in a new subfolder of the same Client folder (e.g. in
Server/Client B/Completed).
60
Switch
Note: If you need to access a secure FTP server to receive your files, the procedure is
similar. However, you will need to use FTP Receive (instead of Submit Hierarchy) and
FTP Send (instead of Archive Hierarchy).
5.3 Connecting flows and retaining hierarchy
information
Switch allows you to connect two flows (each doing part of the processing), while remembering
the original folder structure, so the files can be placed in the right folder.This is useful if a
process is divided over two different workflows, for example the images are processed in one
workflow and then rejoined to a layout document so a PDF can be created with the modified
images.
How does it work?
To connect two flows, you must make sure that:
• The ouput folder of the first flow is linked to the input folder of the second.
• The Strip unique name property of the output folder of the first flow is set to No. This way,
the unique job prefix is preserved when jobs go from the first flow to the second flow.
If the first flow places the processed files in the output folder, these files can be picked up
immediately by the second flow.
5.3.1 Exercise 6: Passing hierarchy info to another flow
Instruction
Modify two flows created in the previous exercises (flow 3A and flow 2) so that:
• The first flow captures and modifies the hierarchy data;
• The second job processes the result of the first flow and uses this hierarchy information to
put the files back in the appropriate folder.
61
Switch
Test files
Download the test files: http://www.enfocus.com/webmarketing/Switch12tutorial/
Switch12tutorial.zip
Solution
• Review the step-by-step solution.
• Have a look at the video explaining how to build this flow http://youtu.be/-nu27qeXR-A.
5.3.1.1 Exercise 6: Solution
This topic explains how to pass hierarchy information from one flow to another. This is done
by linking the output folder of one flow to the input folder of the second flow, and by adding an
Archive hierarchy element to the end of the flow.
1. Duplicate "Tutorial 3A Flow" and rename it Tutorial 3B Flow.
2. Duplicate "Tutorial 2 Flow" and rename it Tutorial 3C Flow.
3. From Tutorial 3B Flow, copy Archive hierarchy and paste it into the new Tutorial 3C Flow. .
a. Select "Archive hierarchy".
b. Right-click and select Copy.
All properties will be retained.
c. Switch to Tutorial 3C Flow, right-click in the canvas area and select Paste.
d. Place the Archive hierarchy element near the end of the flow.
4. Switch back to Tutorial 3B Flow and delete the Archive hierarchy flow element.
5. Link the last folder in the flow (Folder 4) to an external folder called Workflow Input 3C.
Your Tutorial 3B Flow should now look like this:
6. In the Properties pane of Workflow Input 3C, set Strip unique name to No. This avoids that Switch removes private data (such as the hierarchy information) from the
files.
7. Switch to Tutorial 3C flow for editing.
8. Link the input folder of Tutorial 3C flow to the output folder of Tutorial 3B flow.
62
Switch
a. Select the Input folder.
b. In the Properties pane, click Path.
c.
Click
and select Choose folder.
d. Select the Workflow Input 3c folder on your desktop.
Now when the Tutorial 3B flow places a file in this folder, the Tutorial 3C flow will detect it
for processing.
9. Make a connection between the Regroup folder and the Archive hierarchy element (copied
from the Tutorial 3C flow).
This makes sure that processed jobs are placed back in the correct folder.
10. Check the result.
a. Save and activate both flows.
b. Place the Tutorial Job Folder folder in any of the Client Incoming folders within the
tutorial hierarchy.
If successful, the processed Tutorial Job Folder folder is placed in a new subfolder called
Completed. This should take about 20-30 seconds in total to process.
63
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising