This functionality is only available for certain module packages.

You are here: Reference > Job definitions > action

action

The <action> tag defines an action to be performed by the Job Server. The actions are executed in the order in which they occur in the document. The formula language can be used for the arguments attribute.

Static methods are called up. To this purpose the following syntax is used:

<action name="<class name>:<static method name>" arguments="List{<argument1>, <argument2>}" />

The tag has no sub-elements.

Attribute Usage Values Default value Description
name required Absolute name of the action or command, e.g. T_Ecad_Ui.UpdateExtensions.
In order to call a static method the name of the static method is attached to the absolute name of the class, separated by a colon.
arguments required List of arguments that are passed to the action or command. When defining the arguments, it is implied that this indicates the job object that recognizes a trigger property. The formula language can be used in order to determine an object as an argument.
A property of the trigger can be accessed with the syntax trigger.<Trigger property>. The properties for File Trigger, WebService Trigger and both File Trigger as well as WebService Trigger are differentiated.
File Trigger:
  • trigger.fileName/trigger.getFileName: Returns the file name without extension, for example Job2010916.
  • trigger.fullFileName/trigger.getFullFileName: Returns the file name with extension, for example Job20140916.xls.
  • trigger.fileExtension/trigger.getFileExtension: Returns the file extension, for example xls.
  • trigger.filePath/trigger.getFilePath: Returns the absolute path to the file that triggered the Job processing, for example C:\input\Job20140916.xls.

WebService Trigger:

  • trigger.params/trigger.getParams: Returns the value of an URL parameter.

File Trigger and WebService Trigger:

  • trigger.additionalResultsDir/trigger.getAdditionalResultsDir: Folder for additional data, for example a PX file.
  • trigger.outputFolder/trigger.getOutputFolder: Returns the path to the defined output folder for the storage of the data in case of success:
  • trigger.failedFolder/trigger.getFailedFolder: Returns the path to the defined output folder for the storage of the data in case of failure:
  • trigger.jobName/trigger.getJobName: Returns the unique name of the Job to be executed. Consists of the value of the name attribute of the tag <jobdefinition> + <_TimeStamp (yyMMdd_HHmm_ssSSS)>
The formal language permits the use of regular expressions.

Note:

The action shown in the example uses a command whose implementation has to be created self with scripting.
The script uses the markFileForDownload method from the IJobAPI class. The method expects the path to the target file as the parameter.

Example for the implementation:


import com.mind8.mechatronic.skill.api.IJobAPI;
IJobAPI.DEFAULT.markFileForDownload(pathToFile);

To offer multiple files for download, the JobServer.MarkFileForDownloadCommand has to be performed for each individual file.

Note:

To download target files the browser has to be set so that popup windows are allowed for this application.