From 1b69cde1d788231766054b50561b685e1251fbc0 Mon Sep 17 00:00:00 2001 From: thomas_deschamps Date: Thu, 28 Aug 2025 13:47:00 +0000 Subject: [PATCH] Pushed by Git push app from Switch --- Ultima_04-Apply Template.xml | 2774 ++++++++++++++++++++++++++++++++++ 1 file changed, 2774 insertions(+) create mode 100644 Ultima_04-Apply Template.xml diff --git a/Ultima_04-Apply Template.xml b/Ultima_04-Apply Template.xml new file mode 100644 index 0000000..360c465 --- /dev/null +++ b/Ultima_04-Apply Template.xml @@ -0,0 +1,2774 @@ + + +
+ + Ultima_04-Apply Template + Flow + Created at 28/04/2023 09:42 + + Ultima_04-Apply Template + 13496 + No + 47 + D:/Enfocus/Enfocus Switch Dataroot/PropertySets/445/Grille Switch.png + D:/Enfocus/Enfocus Switch Dataroot/PropertySets/444/logo.png + Green flag + No + No + 00:00 + 00:00 + No + Monday + Sunday + No + 1 + Start of the month + 177 + +
+ + + ProblemFilesFolder + producer + Filter + One + Problem jobs + + This flow only + Default + 10 + 10 + 80 + 224 + + + + + + Folder + folder + priority + + #automanaged# + No + + Default + No + 00:00 + 00:00 + No + Monday + Sunday + No + 1 + Start of the month + Cyan + No + No + + + + + -999999999 + + Yes + Yes + Overwrite + + 1 + No + No Folders + + + No + 176 + 624 + + + + + + Folder + folder + - + + #automanaged# + No + + Default + No + 00:00 + 00:00 + No + Monday + Sunday + No + 1 + Start of the month + #808080 + No + No + + + + + + + Yes + Yes + Overwrite + + 1 + No + No Folders + + + No + 272 + 784 + + + + + + Unpack job + processor + TrafficLight + - + + 272 + 704 + + Default + Default + 0 + Default + Yes + Unlimited + + Yes + Restore and replace + Restore and replace + No + 5 + + + + + Subflow-Receive + processor + Move + Subflow - Receive + + 80 + 544 + + Default + Default + No + Unlimited + + + + + Subflow-SendBack + processor + Move + Success + + 1616 + 544 + + Default + Default + Yes + No + Success + [Job.FailElement] : [Job.FailMessage] + No + <?xml version="1.0" encoding="utf-8"?> +<root> + <tag1>Hello world!</tag1> +</root> + + XML + log + 0 + + + + + Pack job + processor + Move + Pack job + + 176 + 704 + + Default + Default + 0 + Default + Yes + Unlimited + Yes + Yes + Yes + + + + + + Folder + folder + - + + #automanaged# + No + + Default + No + 00:00 + 00:00 + No + Monday + Sunday + No + 1 + Start of the month + #808080 + No + No + + + + + + + Yes + Yes + Overwrite + + 1 + No + No Folders + + + No + 176 + 544 + + + + + + Folder + folder + Packed job + + #automanaged# + No + + Default + No + 00:00 + 00:00 + No + Monday + Sunday + No + 1 + Start of the month + #808080 + No + No + + + + + + + Yes + Yes + Add version number + _v + 2 + No + No Folders + + + No + 176 + 784 + + + + + + Folder + folder + - + + #automanaged# + No + + Default + No + 00:00 + 00:00 + No + Monday + Sunday + No + 1 + Start of the month + #808080 + No + No + + + + + + + Yes + Yes + Overwrite + + 1 + No + No Folders + + + No + 272 + 544 + + + + + + Filter + + + 0 + 1 + 1874 + Green + No + + + + Subflow + [Job.FailModule] + + + true + [Job.PrivateData:Key="isTest",Case="lower"] + + + + + + +]]> + No Files + + + + + Filter + + + 0 + 1481 + 616 + Gray + No + All Files + No Files + + + + + Filter + + + 0 + 1846 + 1854 + Gray + No + All Files + No Files + + + + + TrafficLight + + + 0 + 1854 + 2041 + Gray + Data + Log + No + Yes + Yes + + + + + Move + + + 0 + 2 + 617 + Gray + No + + + + + Move + + + 0 + 616 + 620 + Gray + No + + + + + Filter + + + 0 + 617 + 626 + Gray + No + All Files + No Files + + + + + Folder + folder + - + + #automanaged# + No + + Default + No + 00:00 + 00:00 + No + Monday + Sunday + No + 1 + Start of the month + #808080 + No + No + + + + + + + Yes + Yes + Overwrite + + 1 + No + No Folders + + + No + 944 + 544 + + + + + + Folder + folder + - + + #automanaged# + No + + Default + No + 00:00 + 00:00 + No + Monday + Sunday + No + 1 + Start of the month + #808080 + No + No + + + + + + + Yes + Yes + Overwrite + + 1 + No + No Folders + + + No + 176 + 224 + + + + + + RetryIt + processor + TrafficLight + 3 retry + + 272 + 304 + + Default + Default + Yes + Unlimited + 3 + up + retryInjectTemplate + No + + + + + Filter + Overlay PDF + + -90 + 1874 + 1876 + Green + No + + + + Overlay PDF + [Job.FailModule] + + + + +]]> + No Files + + + + + TrafficLight + + + -90 + 1876 + 1908 + Green + Data + Log + No + Yes + No + + + + + OverlayPDF + processor + TrafficLight + Overlay PDF + E:\Artwork Templates + 1040 + 544 + + Default + Default + Yes + Unlimited + External file + [Metadata.Text:Dataset="envVariables",Model="XML",Path="/Data/path/ressources/template"]\[Metadata.Text:Dataset="Masterdata",Model="XML",Path="/Data/file/template/name",Space="trim"].pdf + Alphabetically first in root folder + + + Default + All non-master files + + + Overlay on top + Keep overprints from the overlay + Do not scale + Stop after the last overlay page + + Default + + The number of master and overlay pages is not equal + +]]> + + + + + Folder + folder + Success + + #automanaged# + No + + Default + No + 00:00 + 00:00 + No + Monday + Sunday + No + 1 + Start of the month + #808080 + No + No + + + + + + + Yes + Yes + Overwrite + + 1 + No + No Folders + + + No + 1136 + 544 + + + + + + TrafficLight + + + 0 + 1879 + 1887 + Green + Data + Log + No + Yes + No + + + + + Folder + folder + Fail + + #automanaged# + No + + Default + No + 00:00 + 00:00 + No + Monday + Sunday + No + 1 + Start of the month + #808080 + No + No + + + + + + + Yes + Yes + Overwrite + + 1 + No + No Folders + + + No + 368 + 224 + + + + + + TrafficLight + + + 90 + 1876 + 1889 + #ff0000 + Data + Log + No + No + Yes + + + + + Subflow-SendBack + processor + Move + Fail + + 560 + 224 + + Default + Default + Yes + No + Fail + Inject job : Failed to inject template after [Job.PrivateData:Key="retryInjectTemplate"] try from path "[Job.PrivateData:Key="templatePath"]". + No + <?xml version="1.0" encoding="utf-8"?> +<root> + <tag1>Hello world!</tag1> +</root> + + XML + log + 0 + + + + + Filter + + + 0 + 1887 + 1920 + Gray + No + All Files + No Files + + + + + Filter + + + 0 + 1889 + 13464 + Gray + No + All Files + No Files + + + + + Hold job + processor + Move + Hold 1mn + + 464 + 384 + + 0 + Yes + Unlimited + Default + Delay + Minutes + 1 + + Minutes + 0 + 0 + Cyclic + + + + + Folder + folder + Retry + + #automanaged# + No + + Default + No + 00:00 + 00:00 + No + Monday + Sunday + No + 1 + Start of the month + #808080 + No + No + + + + + + + Yes + Yes + Overwrite + + 1 + No + No Folders + + + No + 368 + 384 + + + + + + Filter + + + 0 + 1908 + 1907 + Gray + No + All Files + No Files + + + + + Move + + + 90 + 1907 + 1868 + Gray + No + 0 + No + 0 + 0 + 0 + Default + No + 00:00 + 00:00 + No + Monday + Sunday + No + 1 + Start of month + No + Minutes + 0 + + + + + Folder + folder + Error + + #automanaged# + No + + Default + No + 00:00 + 00:00 + No + Monday + Sunday + No + 1 + Start of the month + #808080 + No + No + + + + + + + Yes + Yes + Overwrite + + 1 + No + No Folders + + + No + 1136 + 624 + + + + + + TrafficLight + + + -90 + 1879 + 1913 + #ff0000 + Data + Log + No + No + Yes + + + + + Filter + + + 0 + 1868 + 1879 + Gray + No + All Files + No Files + + + + + Filter + + + 90 + 1874 + 1985 + #ff0000 + No + All Other Files + No Files + + + + + Enfocus~PitStop Server + processor + TrafficLight + fix template layer + + 1232 + 544 + + 0 + Default + Yes + Unlimited + No + 100 + 1200 + 300 + No + No + Yes + Yes + Current + + Yes + No + JPEGMedium + JPEGMedium + CCITTGroup3 + None + Yes + No + Yes + Resolution + 72 + Automatic + Automatic + + + + D:/Enfocus/Enfocus Switch Dataroot/PropertySets/441/PropertySet + + + Unchanged + No + No + No + + + + + + + + + + + + No + Yes + Generic Enfocus Gray + Adobe RGB (1998) + ISO Coated v2 (ECI) + Generic Enfocus Lab + No + No + Generic Enfocus Gray + Adobe RGB (1998) + ISO Coated v2 (ECI) + Generic Enfocus Lab + No + Object defined + Same as images + Generic Enfocus Gray + Adobe RGB (1998) + ISO Coated v2 (ECI) + Generic Enfocus Lab + No + No + Generic Enfocus Gray + Adobe RGB (1998) + ISO Coated v2 (ECI) + Generic Enfocus Lab + No + Object defined + No + Yes + + No + No + File size only + PDF + + Yes + + v3 + Default + Default + v3 + Default + Default + + Points + + Yes + + + + + Folder + folder + - + + #automanaged# + No + + Default + No + 00:00 + 00:00 + No + Monday + Sunday + No + 1 + Start of the month + #808080 + No + No + + + + + + + Yes + Yes + Overwrite + + 1 + No + No Folders + + + No + 1328 + 544 + + + + + + Filter + + + 0 + 1934 + 13495 + Gray + No + All Files + No Files + + + + + Filter + + + 0 + 626 + 2047 + Green + No + + + + _template.pdf + [Job.Name:Case="lower"] + + + + +]]> + No Files + + + + + Folder + folder + - + + #automanaged# + No + + Default + No + 00:00 + 00:00 + No + Monday + Sunday + No + 1 + Start of the month + #808080 + No + No + + + + + + + Yes + Yes + Overwrite + + 1 + No + No Folders + + + No + 272 + 224 + + + + + + Filter + + + 0 + 1985 + 1889 + Gray + No + All Files + No Files + + + + + TrafficLight + + + 0 + 1920 + 1934 + Gray + Data + Log + No + Yes + Yes + Yes + + + + + Folder + folder + - + + #automanaged# + No + + Default + No + 00:00 + 00:00 + No + Monday + Sunday + No + 1 + Start of the month + #808080 + No + No + + + + + + + Yes + Yes + Overwrite + + 1 + No + No Folders + + + No + 560 + 544 + + + + + + Filter + Assert exist + + 0 + 1988 + 2019 + Green + No + + import fs from "fs"; + +async function getXpath(job: Job, dataset: string, xpath: string): Promise<string> { + let result: string | number | boolean; + try { + const datasetPath = await job.getDataset(dataset, AccessLevel.ReadOnly); + const XML = XmlDocument.open(datasetPath); + const NSmap = XML.getDefaultNSMap(); + const evaluation = XML.evaluate(`string(${xpath})`, NSmap); + //@ts-ignore + result = evaluation; + } catch (e) { + result = e.message; + } + return result.toString(); +} + + +async function calculateScriptExpression(s: Switch, flowElement: FlowElement, job: Job): Promise<boolean> { + + const rootPath = await getXpath(job, "envVariables", "/Data/path/ressources/template") + const templateName = await getXpath(job, "Masterdata", "/Data/file/template/name") + const filePath = `${rootPath}\\${templateName}.pdf` + return fs.existsSync(filePath) +} + + +]]> + No Files + + + + + Filter + + + 90 + 1913 + 1934 + Gray + No + All Files + No Files + + + + + OpaquePickup + processor + TrafficLight + Opaque pickup + + 848 + 544 + + Default + Default + Yes + Unlimited + 0400000000 + Template + Metadata alongside asset + <ValueDescription Type="patterns"> + <Value>*_template.pdf</Value> +</ValueDescription> + + 15 + + *.log + +]]> + 1 + + + + + Inject job + processor + Move + Inject job + + 656 + 544 + + Default + Default + 0 + Default + Yes + Unlimited + + + + + Move + + + 0 + 2019 + 2024 + Green + No + Inject + Incoming job + Minutes + 15 + No + + Minutes + 0 + Incoming job + + No + + + + No + Incoming job + + + + + + Folder + folder + template + + #automanaged# + No + + Default + No + 00:00 + 00:00 + No + Monday + Sunday + No + 1 + Start of the month + #808080 + No + No + + + + + + + Yes + Yes + Overwrite + + 1 + No + No Folders + + + No + 752 + 624 + + + + + + Move + + + -90 + 2019 + 2021 + Cyan + No + Inject + Incoming job + Minutes + 15 + No + + Minutes + 0 + Specific job + [Metadata.Text:Dataset="envVariables",Model="XML",Path="/Data/path/ressources/template"]\[Metadata.Text:Dataset="Masterdata",Model="XML",Path="/Data/file/template/name",Space="trim"].pdf + No + + + + No + Custom + [Job.NameProper]_template.pdf + + + + + Filter + + + 90 + 2021 + 2018 + Gray + No + All Files + No Files + + + + + Folder + folder + Job + + #automanaged# + No + + Default + No + 00:00 + 00:00 + No + Monday + Sunday + No + 1 + Start of the month + #808080 + No + No + + + + + + + Yes + Yes + Overwrite + + 1 + No + No Folders + + + No + 752 + 544 + + + + + + Filter + + + 0 + 2024 + 2018 + Gray + No + All Files + No Files + + + + + Folder + folder + Warning + + #automanaged# + No + + Default + No + 00:00 + 00:00 + No + Monday + Sunday + No + 1 + Start of the month + Cyan + No + No + + + Warning + + + preflightStatus=Warning +preflightStatus_translated=Warning +actionList_translated=01_Force;02_Check again;03_Trash bin +additionalWarning=No template found! Please add it manually. + Yes + Yes + Overwrite + + 1 + No + No Folders + + + No + 752 + 704 + + + + + + TrafficLight + + + 0 + 2018 + 1868 + Gray + Data + Log + No + Yes + Yes + + + + + Subflow-SendBack + processor + Move + Error + + 848 + 704 + + Default + Default + Yes + No + Warning + Inject job : Failed to inject from path "[Job.PrivateData:Key="templatePath"]". + No + <?xml version="1.0" encoding="utf-8"?> +<root> + <tag1>Hello world!</tag1> +</root> + + XML + log + 0 + + + + + Filter + + + 0 + 2026 + 2029 + Gray + No + All Files + No Files + + + + + Job_info + processor + Move + Ultima_04-Apply Template + + 464 + 544 + + Default + Default + Yes + One + Set + Ultima_04-Apply Template + Refresh + Refresh + None + None + None + None + None + + + + + + + + + + + + + + + Move + + + 0 + 2031 + 1988 + Gray + No + + + + + Filter + + + -90 + 1988 + 2026 + Gray + No + All Other Files + No Files + + + + + Folder + folder + - + + #automanaged# + No + + Default + No + 00:00 + 00:00 + No + Monday + Sunday + No + 1 + Start of the month + #808080 + No + No + + + + + + + Yes + Yes + Overwrite + + 1 + No + No Folders + + + No + 272 + 624 + + + + + + Filter + + + 0 + 2041 + 626 + Gray + No + All Files + No Files + + + + + Rename job + processor + Move + Gestion _template + + 368 + 624 + + Default + Default + 0 + Default + Yes + One + All jobs + No + Original + Leave alone + 1 + Add suffix after filename proper + _count + Search and replace + Complete filename + + + 1 + 0 + _template.pdf + -template.pdf + Once + Local8bit + Underscore + + <ValueDescription Type="regexp"><Value>\d+$</Value></ValueDescription> + 3 + Search and replace + Complete filename + + + 1 + 0 + _Template.pdf + -template.pdf + Once + Local8bit + Underscore + + <ValueDescription Type="regexp"><Value>\d+$</Value></ValueDescription> + 3 + None + Filename proper + + + 1 + 0 + + + + Local8bit + Underscore + + <ValueDescription Type="regexp"><Value>\d+$</Value></ValueDescription> + 3 + None + Filename proper + + + 1 + 0 + + + + Local8bit + Underscore + + <ValueDescription Type="regexp"><Value>\d+$</Value></ValueDescription> + 3 + None + Filename proper + + + 1 + 0 + + + + Local8bit + Underscore + + <ValueDescription Type="regexp"><Value>\d+$</Value></ValueDescription> + 3 + + + + + Folder + folder + - + + #automanaged# + No + + Default + No + 00:00 + 00:00 + No + Monday + Sunday + No + 1 + Start of the month + #808080 + No + No + + + + + + + Yes + Yes + Overwrite + + 1 + No + No Folders + + + No + 368 + 544 + + + + + + Move + + + 0 + 2047 + 2049 + Gray + No + + + + + Filter + + + 0 + 2049 + 2031 + Gray + No + All Files + No Files + + + + + Filter + + + 0 + 626 + 2049 + #ff0000 + No + All Other Files + No Files + + + + + FlowLinksSend + processor + Move + 97-Switch Report + + 560 + 304 + + Default + Default + Yes + No + 97-Switch Report + Don't add metadata + Masterdata + // Lines starting with a double slash like this line are considered general comments and are ignored. + +// In the following line a data map is done with "TagName1" is name of the Private Data or XML dataset tag and "TagValue1" as value +TagName1=TagValue1 + +// The following line has a comment which will be added to the XML dataset. It can be used to add extra info, by example if the info map contains a dimension the comment can explain the unit of the dimension +TagName2=TagValue2// This comment will be added to the XML dataset. + +// The following lines show how nested values can be created in an XML dataset. +ParentTag.ChildTag1=TagValue3 +ParentTag.ChildTag2=TagValue4 + + + + + Folder + folder + - + + #automanaged# + No + + Default + No + 00:00 + 00:00 + No + Monday + Sunday + No + 1 + Start of the month + #808080 + No + No + + + + + + + Yes + Yes + Overwrite + + 1 + No + No Folders + + + No + 464 + 224 + + + + + + Filter + + + 0 + 13464 + 1891 + Gray + No + All Files + No Files + + + + + Filter + + + -90 + 13464 + 13463 + Gray + No + All Files + No Files + + + + + SubmitPoint + producer + Filter + Unlimited + Test - Apply template + + #automanaged# + Default + Drag and drop a file here to apply a template to a file. +Result will be displayed in Switch client. + D:/Enfocus/Enfocus Switch Dataroot/PropertySets/443/testtube_5154.png + + No + No + No + No + + Job and metadata + Files only + <ValueDescription Type="stringlist"> + <Value>pdf</Value> +</ValueDescription> + + + <ValueDescription Type="dynamiclist"> + <DynamicValues Editor="scriptexp">function getFileList(path) { + const pool = new Dir(path); + const fileList = pool.entryList("*.pdf") + return fileList; +} + + +const rootPath = "E:/Artwork Templates" +const resultArray = getFileList(rootPath) + + +resultArray.join(";")</DynamicValues> + <DefaultValue Editor="inline"></DefaultValue> +</ValueDescription> + + +]]> + Submit + Yes + + No + 80 + 464 + + SwitchClient + + + + + Folder + folder + isTest + + #automanaged# + No + + Default + No + 00:00 + 00:00 + No + Monday + Sunday + No + 1 + Start of the month + Cyan + No + No + + + + + + isTest=true + Yes + Yes + Overwrite + + 1 + No + No Folders + + + No + 176 + 464 + + + + + + DataMapper + processor + Move + envVariables + + 272 + 464 + + Default + Default + 0 + 0 + Yes + One + XML Dataset and Private Data + envVariables + path.ressources.template=E:\Artwork Templates + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Folder + folder + - + + #automanaged# + No + + Default + No + 00:00 + 00:00 + No + Monday + Sunday + No + 1 + Start of the month + #808080 + No + No + + + + + + + Yes + Yes + Overwrite + + 1 + No + No Folders + + + No + 368 + 464 + + + + + + DataMapper + processor + Move + path + + 464 + 464 + + Default + Default + 0 + 0 + Yes + One + XML Dataset and Private Data + Masterdata + file.template.name=[Metadata.Text:Dataset="Submit",Model="XML",Path="/field-list/field/value",Before=".pdf"] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Folder + folder + - + + #automanaged# + No + + Default + No + 00:00 + 00:00 + No + Monday + Sunday + No + 1 + Start of the month + #808080 + No + No + + + + + + + Yes + Yes + Overwrite + + 1 + No + No Folders + + + No + 560 + 464 + + + + + + Filter + + + 90 + 13467 + 13468 + Gray + No + All Files + No Files + + + + + Filter + + + 90 + 13468 + 13487 + Gray + No + All Files + No Files + + + + + Move + + + 0 + 13487 + 13488 + Gray + No + + + + + Filter + + + 0 + 13488 + 13483 + Gray + No + All Files + No Files + + + + + Move + + + 90 + 13483 + 13489 + Gray + No + + + + + Filter + + + 90 + 13489 + 2019 + Gray + No + All Files + No Files + + + + + Folder + folder + - + + #automanaged# + No + + Default + No + 00:00 + 00:00 + No + Monday + Sunday + No + 1 + Start of the month + #808080 + No + No + + + + + + + Yes + Yes + Overwrite + + 1 + No + No Folders + + + No + 1424 + 544 + + + + + + Folder + folder + - + + #automanaged# + No + + Default + No + 00:00 + 00:00 + No + Monday + Sunday + No + 1 + Start of the month + #808080 + No + No + + + + + + + Yes + Yes + Overwrite + + 1 + No + No Folders + + + No + 1520 + 544 + + + + + + Folder + folder + - + + #automanaged# + No + + Default + No + 00:00 + 00:00 + No + Monday + Sunday + No + 1 + Start of the month + #808080 + No + No + + + + + + + Yes + Yes + Overwrite + + 1 + No + No Folders + + + No + 1520 + 464 + + + + + + Folder + folder + - + + #automanaged# + No + + Default + No + 00:00 + 00:00 + No + Monday + Sunday + No + 1 + Start of the month + #808080 + No + No + + + + + + + Yes + Yes + Overwrite + + 1 + No + No Folders + + + No + 1712 + 464 + + + + + + Checkpoint + processor + Move + Yes + Unlimited + Test - Apply template Check + + #automanaged# + + No + No + Log + No + No + + Check + Yes + No + If empty + No + Minutes + 0 + + 1616 + 464 + + SwitchClient + + + + + RecycleBin + consumer + Move + Yes + Recycle bin is a flow element that deletes the jobs that come in. + Tools + 0800000000 + trash can remove delete + Recycle bin + + #automanaged# + 0 + 0 + 0 + No + Yes + 1808 + 464 + + + + + + Filter + isTest + + -90 + 13495 + 13469 + Green + No + + + + true + [Job.PrivateData:Key="isTest",Case="lower"] + + + + +]]> + No Files + + + + + Filter + + + 0 + 13495 + 13472 + #ff0000 + No + All Other Files + No Files + + + + + Filter + + + 0 + 13469 + 13470 + Gray + No + All Files + No Files + + + + + Filter + + + 0 + 13476 + 13475 + Gray + No + All Files + No Files + + + + + Move + + + 0 + 13470 + 13476 + Gray + No + + + + + Filter + + + 0 + 13472 + 5 + Gray + No + All Files + No Files + + +