15.3.3. Executing a Batch Job in a Process

Engineering Knowledge Manager

User's Guide | Chapter 15: Starting and Managing Processes | 15.3. Managing Tasks Assigned to You |

15.3.2. Starting a Task |  | 15.3.4. Cancelling a Batch Job
Prev |  | Next

### 15.3.3. Executing a Batch Job in a Process

When the process gets to a batch job, the job will execute automatically in the process view if automatic execution is specified in the batch node definition. For process templates that are defined in EKM Studio, this means that the Start job automatically box was checked in the batch node properties. For templates defined using XML, this means that the batch node definition includes the `autoStart` element. If a job is set to start automatically, values for the `Application`, `Command line arguments`, `Number of Cores` and `Transcript` settings are predetermined by the batch node definition and cannot be edited before the job is submitted.

For batch jobs that do not start automatically, the status of the job will read `Not Started` in the execution details, as shown in the example below. In this case you will need to initiate the execution manually.

Figure 15.15: Job Ready to be Executed in Process View

Before executing the batch job you can upload additional files to the job’s working directory by clicking in the details pane. For more information about uploading files, see Uploading Files to a Server Folder in the Managing Jobs chapter. To view the contents of the job's working directory, click the Working Directory link in the job view.

To execute a batch job in the process view, click in the details pane.

Note that if the job cannot start for some reason, such as an incorrect password set for the selected queue, an error message will be displayed in the task pane. Once you have rectified the issue, you can click at the bottom of the task pane to start the job again.

#### Specifying Job Submission Settings

When you click , the Execute Batch Job dialog box will appear. Here you can select an application to use and specify other job submission settings.

Figure 15.16: Execute Batch Job Dialog Box

If values for the `Application`, `Command line arguments`, `Number of Cores` and `Transcript` settings were explicitly specified in the batch node definition, those values will be prefilled in the Execute Batch Job dialog box. Alternatively, if a job template was selected in the batch node definition, the values for these settings are taken from the selected template. In the case where the template defines a custom interface, the Execute Batch Job dialog box will have a custom appearance and settings. For details about the default job submission settings, see Setting Up a Batch Job in the Managing Jobs chapter.

Note: The Import files into repository after job completion setting is not applicable when a batch job is launched within a process, as the output behavior is predetermined by the process definition.

When you click OK, the job will be queued and then begin to execute. You can monitor its progress within the process view, or from the Job Monitor page. The status of the job will go from `Queued` to `Running` to `Finished`. To view the current status, click Refresh at the bottom of the task pane. You can cancel the job if desired by clicking Cancel. For more information about monitoring and managing jobs, see the Managing Jobs chapter.

Figure 15.17: Job Executing in Process View

#### Re-executing a Job

If the execution fails, or if the batch job is not set to complete automatically after execution, a button will be displayed, providing you with an opportunity to execute the job again.

Figure 15.18: Option to Re-execute a Batch Job

#### Accessing Different Views of a Batch Job

When a batch job is the active task, you can access its Status and Transcript using the toolbar in the upper right corner of the task pane.

To view the contents of the job's working directory, go to the Status view and click the Working Directory link in the job details. For more information see Accessing a Job's Working Directory.

#### Completing a Batch Job

If the batch job is not set to complete automatically, you will need to complete it by clicking in the details pane. Once complete, the process will move on to the next stage.

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.