This functionality is only available for certain module packages. Info / Copyright

action

In a job definition, the <action> tag specifies an action that the job server is to execute. The actions are executed in the order in which they occur in the document. You can use the formula language for the arguments attribute.

You can also call up static methods. To this purpose, apply the following syntax:

<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 attach the name of the static method 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. You can use the formula language to determine an object as an argument.
Use the syntax trigger.<Trigger property> to access a property of the trigger. The properties for fileTrigger, webServiceTrigger and both fileTrigger and webServiceTrigger are differentiated.
fileTrigger:
  • trigger.currentJobId: Returns the current JobId, e.g. d366dc65-2974-4664-948c-d1736917c596.
  • 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.