This is how you create a job via an XML file using the Create Job task.
Your ‘business system’ writes an XML file in the Automation Engine hot folder that triggers the Create Job task.
‘Create Job’ task automatically creates the Job on Automation Engine. Job setup information is determined from data in the XML file.
Any workflow task can automatically be started, using the parameters from that XML.
This is a three step process.
First, create the XPATH Smart Names to extract the information from the XML file.
Build the Create Job ticket and save it.
Create a Task Type Hot Folder to drop the XML.
Follow the steps given below to create the XPATH Smart Names that we will use to extract the information from the XML file:
Go to SmartNames and click New SmartName.
Give a name to the SmartName (i.e. XML_OrderID) and choose XPath as the Type.
Choose Element from which to extract the information: option. This option will allow us to extract a specific element from the XML file. In this example, I want to extract the OrderID from the XML file.
You will type the element name from the XML file you are reading.
Keep the XML Source field as the default. ([URL of Input]).
Repeat steps 1-6 for each element you wish to extract from the XML file.
Follow the steps given below to build the Create Job Task that we will attach to the Hot Folder:
Go to Tickets View and double-click the Default Create Job ticket.
Fill in the field using the XML Smart Names we created above. The Job Folder by default will be created based on the Smart Job Location from the configure pallet. Otherwise, you can define a location using the XML Smart Names we created (i.e //EAW12VM418/ExampleJobContainer/[XML_OrderID])
To create a Job Parameter, go to the Parameters tab and click the icon.
In the Name field, type the name of the Job Parameter. For the Value field, use the XML Smart Name you want to associate that Parameter with.
Click OK and Save to save the 'Create Job' ticket. We will use this ticket when creating the Hot Folder below.
Follow the steps given below to create the Task Type Hot Folder that we will use to feed the XML file to Automation Engine:
Create a folder on an Automation Engine container. This folder is the folder that we will use as our hot folder.
In the Pilot, go to Hot Folders and click New Hot Folder.
Select Task Hot Folder.
Browse to the folder you created in Step 1 - Select it as our hot folder.
For Automatic Tasks choose Based on File Type.
In the Add Step window, select the Create Job ticket that you saved from the previous step. Click OK.
Make sure to double check the SmartNames you want to use for each section of the ticket are in fact SmartNames (they should all be green).
The location of the job that is created via the XML can be based on the smart job location or you can define a location with SmartNames ( i.e. //EAW12VM418/ExampleJobContainer/[XML_OrderID])
Click Save. In the Modify window, Click Deselect All and select XML under file types. Ensure that only XML check box is selected.
Make sure to define a working folder. Typically the working folder is a folder within the hot folder called 'working'.
Selecting Delete input files when automatic task is finished will delete the XML file from the working folder automatically.
Click OK. Change the Poll Interval to 1 minute on the hot folder and click OK.
Your hot folder is created. Go ahead and test by dropping an XML file to see if it will create the job.