A.5.5. Batch Node Type

Engineering Knowledge Manager

User's Guide | Appendix A. Defining a Process Template Using XML | A.5. Defining Nodes |

A.5.4. Monitor Node Type |  | A.5.6. Workflow Reference Node Type
Prev |  | Next

### A.5.5. Batch Node Type

A batch node has the following required attributes:

`name`

  specifies the name of the node. It has the same character restrictions as the `name` attribute of the node type. This will be displayed in the graph and the Elements tree. Same restrictions apply as for Node Type.

`description`

  specifies a description of the node.

The batch node definition has the following optional attributes:

`assignee`

  specifies the name of the user or group, the task corresponding to this node is assigned to. Refer to the `assignee` attribute of the node definition for more details. Only the assigned user can view, execute or cancel the batch task or get notified by email when the batch execution completes.

`assigneeModifiable`

  specifies whether or not the assignee can be changed. If set to `true`, the process creator or an `admin` user can change the task's assignee in the Process Monitor. This attribute is optional; if not specified, the default value is `true`.

The batch node definition has the following child elements:

`appKey`

  specifies the name of the application that will be launched by the batch node. See the Defining EKM Servers, Queues and External Applications chapter in the Administration Guide for details on defining external applications. This element has an optional Boolean attribute named `literal` that can take `true` or `false` values. If this attribute is not specified or is `false`, the value of the `appKey` corresponds to a `String` variable whose value is the key of the application. If the `literal` attribute is specified and is `true`, the value of the `appKey` is the key of the application. You can specify one and only one `appKey` element.

`autoComplete`

  controls whether or not a task is automatically completed after job execution. When an execution finishes successfully, and autoComplete is set to true, the process will automatically advance to next task.

`autoStart`

  controls whether or not the task will start executing automatically in the process view. If there is any error during auto-start, you will be able to start the job manually.

`showWorkingDirectory`

  controls whether or not the job’s Working Directory can be displayed in the process view or job view during job execution. Set this to `false` if you do not want users to have access to a job’s input and output files.

`core`

  specifies the number of cores to reserve.

`param`

  specifies a command line parameter for the application. This element has an optional Boolean attribute named `literal` that can take `true` or `false` values. If this attribute is not specified or is `false`, the value of the `param` corresponds to a `String` or `Reference` variable. If it corresponds to a `String` variable, then the value of the variable will be taken as command line parameter. Otherwise, if it corresponds to a `Reference` variable, then the name of the referenced object will be taken as the command line parameter. If the `literal` attribute is specified and is `true`, the value of the `param` is the taken as the command line parameter. You can specify any number of `param` elements.

`exportFile`

  specifies a file or folder that will be exported to the working directory in which the application is launched. This is primarily used to export files or folders that are used as inputs to the application being launched. You can specify any number of `exportFile` elements. This element has the following optional attributes:

  - `literal`: specifies whether the value of `exportFile` element is literal or not. If this attribute is not specified or is `false`, the value of the `exportFile` element corresponds to a `String` or `Reference` variable. If it corresponds to a `String` variable, then the value of the variable will be taken as the path of the file or folder. Otherwise, if it corresponds to a `Reference` variable, then the file or folder object pointed to by the reference variable will be exported. If the `literal` attribute is specified and is `true`, the value of the `exportFile` element is taken as the path of the file or folder.

  - `exportedFileName`: Specifies the name of the file or folder when it is exported to the working directory. If it is not specified, the original name of the file or folder is used. This is used if you want to change the name of a file or folder when it is exported to the working directory

  - `literalExportedFileName`: It is a Boolean attribute that specifies whether the value for the `exportedFileName` is literal or not. If it is `false` or is not specified, the value of `exportedFileName` attribute is taken as the name of a `String` variable whose value is the exported name. Otherwise the value of the `exportedFileName` attribute is taken as the exported name.

  - `nonEkmFile`: Specifies whether the file or folder is external to EKM or part of EKM’s repository. If this attribute is not specified or is `false`, the file or folder is assumed to reside within EKM; otherwise, it is assumed to lie outside EKM’s repository and on a file system accessible to EKM’s server.

  - `template`: Specifies whether the file is a template or not. If it is a template, the file must be an ASCII file and “templatized” using the syntax `{$var}`, where `var` is the name of a variable defined in the process. When a template is exported, all instances of `{$var}` are replaced by the actual value of `var` variable. This allows you to specify a generic file as input and have the actual contents of the file be different for different process instances. You can only specify this attribute to be `true` for files and not folders.

  - `includes`: A comma-separated list of patterns (strings that may contain the wildcard characters `*` and `?` such as `*.xml`, `test.???`, `*/test.*`) used to determine what files from the exported folder to include for export.

  - `excludes`: A comma-separated list of patterns (strings that may contain the wildcard characters `*` and `?` such as `*.xml`, `test.???`, `*/test.*`) used to determine what files from the exported folder to exclude from export.

`exportFileFromJob`

  specifies a file or folder generated in an upstream node that will be used in the current node (as long as the upstream node belongs to the same block as the current node). This means that you do not need to import files back into EKM in an upstream node and then export the same files in the downstream node.

  - `literal`: specifies whether the value of `exportFileFromJob` element is literal or not. If this attribute is not specified or is `false`, the value of the `exportFileFromJob` element corresponds to a `String` or `Reference` variable. If it corresponds to a `String` variable, then the value of the variable will be taken as the path of the file or folder. Otherwise, if it corresponds to a `Reference` variable, then the file or folder object pointed to by the reference variable will be exported. If the `literal` attribute is specified and is `true`, the value of the `exportFileFromJob` element is taken as the path of the file or folder.

  - `exportedFileName`: Specifies the name of the file or folder when it is exported to the working directory. If it is not specified, the original name of the file or folder is used. This is used if you want to change the name of a file or folder when it is exported to the working directory

  - `literalExportedFileName`: It is a Boolean attribute that specifies whether the value for the `exportedFileName` is literal or not. If it is `false` or is not specified, the value of `exportedFileName` attribute is taken as the name of a `String` variable whose value is the exported name. Otherwise the value of the `exportedFileName` attribute is taken as the exported name.

  - `includes`: A comma-separated list of patterns (strings that may contain the wildcard characters `*` and `?` such as `*.xml`, `test.???`, `*/test.*`) used to determine what files from the exported folder to include for export.

  - `excludes`: A comma-separated list of patterns (strings that may contain the wildcard characters `*` and `?` such as `*.xml`, `test.???`, `*/test.*`) used to determine what files from the exported folder to exclude from export.

`outputFolder`

  specifies the folder where all the output files will be imported to EKM. This is a required element. When an application completes it may generate output files that need to be imported back into EKM. You can use `outputFolder` to define this. This element has an optional Boolean attribute named `literal` that can take `true` or `false` values. If this attribute is not specified or is `false`, the value of the `outputFolder` element corresponds to a `Reference` variable. If the `literal` attribute is specified and is `true`, the value of the`outputFolder` element is taken as the path of the output folder in EKM. You can specify one and only one `outputFolder` element.

`importFile`

  specifies the output file or folder that will be imported into EKM once the application completes. The value can contain the exact name of the file (for example, `mesh.msh`) or contain names with wild cards (for example, `*.cas` or `*.dat)`. You can also import all files and sub-folders created by the application using just the wildcard character: `*`. The value can also be left empty and in this case, all file/folder matching will be done based on the `includes` and `excludes` attributes.

  This element has the following optional attributes:

  - `literal`: The `literal` attribute takes Boolean values of `true` or `false`. If this attribute is not specified or is `false`, the value of the `importFile` element corresponds to a `String` variable. If the `literal` attribute is specified and is `true`, the value of the `importFile` element is taken as the name of the file or folder to import. You can specify any number of `importFile` elements.

  - `includes`: A comma-separated list of patterns (strings that may contain the wildcard characters `*` and `?` such as `*.xml`, `test.???`, `*/test.*`) used to determine what files from the imported folder to include for import.

  - `excludes`: A comma-separated list of patterns (strings that may contain the wildcard characters `*` and `?` such as `*.xml`, `test.???`, `*/test.*`) used to determine what files from the imported folder to exclude from import.

  - `retrieveOnFailure`: The `retrieveOnFailure` attribute takes Boolean values of `true` or `false`. This attribute determines whether or not to retrieve files for a failed/cancelled job. The default is `false` when this attribute is not specified.

`importedFileType`

  specifies the type of an imported file or folder. The type of the file is usually determined by its extension. If the extension is used by multiple file types then in some cases EKM can determine the correct file type by reading a section of the file type. If it is unable to make an accurate determination, it will use the type mapping specified by this element. Finally, if type mapping for a file is not specified in this element, EKM will use the default type association defined in the Preferences of the user who is assigned to the batch task. Folders are always imported as type `Folder`. You can, however, provide an alternate type by using this element. You can specify any number of `importedFileType` elements. This element has the following required attributes:

  - `pattern`: relative path pattern of files or folders in the working directory that you want to associate with a type. You can use wildcards `?` and `*` to match a single or multiple arbitrary characters. For example: `*.dat` will match all files whose extension is `.dat` no matter where they occur in the working directory while `fluent-files/*.dat` will only match files with extension `.dat` in a sub-folder named fluent-files in the working directory.

  - `type`: non localized type name of the file or folder

`jobTemplate`

  specifies the name of a job template to be used when the job is executed. If a template is specified, the values specified for `appKey`, `core`, `param` and `transcript` will be ignored, and the values defined for these attributes in the template will be used instead.

`transcript`

  specifies the name of the file in the working directory that stores the transcript of the job. If it is not specified, the standard output and error streams of the batch job are taken as transcripts. The transcript is used to monitor the execution of the job. You can specify zero or one transcript element.

An example of a batch node definition is supplied in Example 10: Batch Node Example.

In Example 10: Batch Node Example, the application key (`appKey`) of the application launched by this batch node is specified by the variable `Preprocessor`. There are four command line parameters specified by the variables named `Geometry File`, `Dimension 1`, `Dimension 2` and `Mesh Quality`. The input file of the application is specified by the variable `Geometry File`. The output file that will be imported into EKM is specified by the variable named `Mesh Name` and folder where it will be imported is specified by the variable named `Mesh Folder`.

Example 10: Batch Node Example

    <batch-node name="Batch Pre-process" description="">
          <appKey>Preprocessor</appKey>
          <param>Geometry File</param>
          <param>Dimension 1</param>
          <param>Dimension 2</param>
          <param>Mesh Quality</param>
          <exportFile>Geometry File</exportFile>
          <outputFolder>Mesh Folder</outputFolder>
          <importFile>Mesh Name</importFile>
    </batch-node>

Contains proprietary and confidential information of ANSYS, Inc. and its subsidiaries and affiliates.

Prev | Up / Contents | Next

Release 18.2 - © ANSYS, Inc. All rights reserved.