Child pages
  • KB87952968: Automation Engine - How to create a job via XML
Skip to end of metadata
Go to start of metadata

 

Description

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.

Procedure

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:
 
  1. Go to SmartNames and click New SmartName.
  2. Give a name to the SmartName (i.e. XML_OrderID) and choose XPath as the Type.
  3. 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.
  4. You will type the element name from the XML file you are reading.
  5. Keep the XML Source field as the default. ([URL of Input]).
  6. Click Save.
  7. 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:
  1.  Go to Tickets View and double-click the Default Create Job ticket.
  2. 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])
  3. To create a Job Parameter, go to the Parameters tab and click the  icon.
  4. 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.
  5. 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:
  1. Create a folder on an Automation Engine container. This folder is the folder that we will use as our hot folder. 
  2. In the Pilot, go to Hot Folders and click New Hot Folder.

  3. Select Task Hot Folder.
  4. Browse to the folder you created in Step 1 - Select it as our hot folder.
  5. For Automatic Tasks choose Based on File Type.
     
  6. In the Add Step window, select the Create Job ticket that you saved from the previous step. Click OK.
  7.  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])




  8. Click Save. In the Modify window, Click Deselect All and select XML under file types. Ensure that only XML check box is selected.
  9. 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.



  10. Click OK. Change the Poll Interval to 1 minute on the hot folder and click OK.
  11. Your hot folder is created. Go ahead and test by dropping an XML file to see if it will create the job.
Article information
Applies to

Automation Engine 12.x

Created21-Apr-14
Last revised24-Oct-14
AuthorTYTH
CW Number 
Contents

 

3 Comments

  1. Anonymous

    I was looking for Verror:-6

    1. I had this for a morning once, I just got the PID of the JDF server (from diagnostics.app) and killed the process on the master. BGMD restarts it immediately and my JDFs went through fine again afterwards.

       

  2. TIP: Also check the latest AE 14 On Line Help and its new chapter "Integrating with External systems". It elaborates on this use case and also contains a section with detailed Examples (plus it uses the 'Acccess Point'  tool)