Create a job that receives an XML file via a hot folder, creates a new job using information from the XML file, and then moves the XML file to the new job.
- Create a new job named
Funnel
, which receives the XML files and creates the new jobs based on the XML files. - While you are in the
Funnel
job, create a new rule set, and start it with the Job Hot Folder Drop event. Add the Read XML action, and set the following parameters:
This stores the data from the XML file so that you can use the data for actions later in the rule.Parameter
Setting
Schema Name
General > MySchema
File
Item (File)
Validate
True
Add the Create Job action, and set the following parameters:
This creates a new job, copies the rule set from the Template job to the new job, and enables the rule set.Parameter
Setting
New Job Name
XML Data (MySchema) > JobName
Job Group
MyGroup
Template Job
Template
Create from Template Job Options
Rules
Note: If you do not set Job group, you must set Job Home Share.Add the Copy or Move Files action, and set the following parameters:
This moves all files from theParameter
Setting
Files to move
Root Event (Job Hot Folder Dropped) > UNC File Paths
Destination Directory
Job > Home > Path Name
Do move
True
HotFolders\Processed
folder at job home of theFunnel
job to the job home of the newly created job.
Tip: You can move the file into theUserDefinedFolders
folder inside the job folder. You can also move it into a specific subfolder that you define in Prinergy Administrator.Add the Send Remote Trigger action, and set the following parameters:
String1 is the combination of Previous Event (Job Created) > Job > Home > Path Name followed by a slash and then Previous Event (Job Created) > Previous Event (XML Parsed OK) > File > File Name.Parameter
Setting
Destination Machine
Previous Event (Job Created) > Job > Home > Server Name
Destination Context
Previous Event (Job Created) > Job > Job Name
Rule Set Path
ProcessJob
Additional Properties: String 1
%triggerEvent.Previous.Job.Home.PathName%%triggerEvent.Previous.Previous.IntentFile.FileName%
This selects the job that was just created and identifies the location of the XML file to the rule set that processes the new job.- Save the rule set with the name
Funnel
. - Enable the rule set for the
Funnel
job. - In the
Funnel
job:- Create a folder that will become the hot folder.
- Add a hot folder and set it to process the Funnel rule set.
- Test the system by dropping an XML file into the hot folder.