The user interface for the Jobs shows all the Jobs with their current status, the Job name, the associated Job definition, the Worker, who is carrying out or has carried out the Job and the actions currently possible.
By default, the list shows all the Jobs sorted chronologically, with the most recent ones at the top. The list can be manipulated by means of actions:
Action | Symbol | Meaning |
---|---|---|
Delete Job | Removes a Job from the list. | |
Process next | Moves the Job to the position of the oldest Job so that this Job is executed as the next one. | |
Open Job progress window | Opens a popup window with the progress information for the Job. | |
Open Job log window | Opens the Job-specific log. |
The Jobs can be displayed and hidden according to their status by marking the filter of the same name.
If the time filter Today's jobs is used, only those Jobs are listed that occurred on the current day. This list is updated at regular intervals. The time filter All jobs displays all the messages again.
The following statuses can be displayed for the Jobs:
Status | Symbol | Meaning |
---|---|---|
Queued | The Job Server has been started, the Job is located in the queue. As soon as a slot in the Job Server becomes free, the next Job in the queue is started. | |
Running | The Job Server is executing a pending Job. | |
FinishedSuccessfully | The Job has been completed successfully by the Job Server. The files of the Job have been copied into the agreed directory. | |
FinishedInError | The Job Server reported an error while processing the Job. Processing has been aborted and the files of the Job have been copied into the agreed directory (see failedFolder). An e-mail has been sent to predefined addresses. The contents of the error log can be inserted as a text into the e-mail (see jobdefinition). | |
Cancelled | A Job was cancelled by the user during the execution. |
Additionally to these states, the job can
- display a unique Job id,
- display a Job name. There are two case differentiations:
- fileTrigger: If the Job is located in the queue, the name of the file that triggered the FileTrigger is displayed. As soon as the Job leaves the queue, the Job name that is specified in the Job definition is displayed, extended by the time stamp.
- webserviceTrigger: If the Job is located in the queue, a file name cannot be displayed. The post parameter js.queuedJobName can be used to transfer a Job name that is displayed during this state. For example, the URL http://localhost:8787/request/jobdef_web?js.queuedJobName=Job with SAP-ID: 2029338&file=C:\noscan\models\import-export-model\sample\MyProj.px is used to display the Job name Job with SAP-ID: 2029338. As soon as the Job leaves the queue, the Job name that is specified in the Job definition is displayed, extended by the time stamp.
- List created files for the download (see JobServer.MarkFileForDownloadCommand).
- Own a detailed status text. This can be modified during the execution by means of a command (see JobServer.SetProgressMessageCommand).
In addition to these statuses a free status text can be output through a native command.
In addition, further information can be displayed that is created by a script during the execution of the Job and transferred to the browser.
For example, various results of the generation can be listed:
The data for the display are transferred as a Map. The API IJobAPI implements a method called getResultData() that initially returns a Map. The following Information to be displayed are to be attached to this Map.
import com.mind8.mechatronic.skill.api.IJobAPI;
resultData = IJobAPI.DEFAULT.getResultData();
data = [
["Station 1 überprüft": "Material vorhanden"],
["Station 2 überprüft": "Material nicht vorhanden"],
["Station 3 überprüft": "Material vorhanden"]
];
resultData.put("Materialüberprüfung der Stationen", data);
Tip:
In principle the method resultData.put() can process any objects. Since the transferred objects are converted into the JSON format, only simple objects such as List, Map and String should be used.
By means of a HTML file the look of the status indication is adjusted to customer-specific requirements (see jobStatusHtml).