This functionality is only available for certain module packages.

You are here: Tutorial > Job Server > Setting a Job definition to webserviceTrigger

Setting a Job definition to webserviceTrigger

Requirements:

A configuration could be created successfully with the third Job definition. In it components were placed on the Placeholder_Inspect placeholder and all extension points.

The Job was always triggered by a fileTrigger, i.e. an IMX file that was copied into the <incomingFolder> directory has triggered the processing.

This section shows how a webserviceTrigger is defined in the Job definition in order to start the processing by a call in the browser.

Proceed as follows to change the existing Job definition:

  1. Create a copy of the existing JMX file jobdef2.jmx called jobdef4.jmx.
  2. Open the JMX file jobdef4.jmx with any editor, for example Notepad++.
  3. Change the name of the Job definition from <jobdefinition name="Job2" to <jobdefinition name="Job4".
  4. Replace the block <fileTrigger> ... </fileTrigger> against the following block:
<webserviceTrigger>
	<failedFolder value="error" />
	<outputFolder value="output" />
</webserviceTrigger>
  1. Adjust the file paths to your installation accordingly.
  2. Replace the block <actions> ... </actions> against the following block:
<actions>
	<action name="Engineering.ImportIMXCommand" arguments="List{trigger.params.pathToIMX}" />
	<action name="Engineering.ExportEOXCommand" arguments="List{trigger.additionalResultsDir + 'Feeder.eox',List{'Feeder'}}" />
	<action name="JobServer.MarkFileForDownloadCommand" arguments="=List{trigger.outputFolder + 'results\\Feeder.eox'}" />
</actions>
  1. Save the JMX file.
  2. Remove the Job definition jobdef2.jmx from the directory <Job Server installation path>\resources\JobServer\jobs.

The complete JMX file should have the following appearance:

  1. Continue with Test 4 - Creating a configuration with webserviceTrigger.