投稿日: 2021年12月16日


How to perform serial execution of jobs where execution conditions are specified

Hello.
In this article, we will introduce you how to perform serial execution of jobs where execution conditions are specified.
In Hinemos, whether to start subsequent jobs can be determined according to the value of the preceding job’s processing result (end status or end value). Therefore, settings can be configured so that multiple jobs will start when one job ends.
Also, the preceding job’s end status or value, time, time after the session started (in minutes), job parameter, or the cross-session job’s end status or value can be used as a wait condition for executing the subsequent jobs.
When time or time after the session started is specified as a wait condition, Hinemos will judge the condition is fulfilled if it is past the specified time.
This time, we will configure the settings so that subsequent jobs will be executed based on the execution result of an approval job.

1. Register a node where Hinemos Agent is installed in Repository.

 

2. Check if Hinemos Agent is running.

 

3. Register jobs.

The job configuration this time is described below.
One approval job under a job unit
One command job which will be executed if the approval job is approved.
One command job which will be executed if the approval job is rejected.

 

●Setting of approval job “Approval”
Add the following to the default setting of the approval job which was configured when it was created.
・Approval request message

 

●Command job “Approval_OK” which will be executed if the approval job is approved
Add the following to the default setting of the command job which was configured when it was created.
・Wait condition: Will be executed if the approval job ends with the “Normal” status.
・End status set under the ”End if condition unmatched” checkbox: Normal
・End value set under the ”End if condition unmatched” checkbox: 0
・Command: Specify the node, which was registered in Repository in 1, as a scope. Set start command ”echo OK”.

 

 

●Command job “Approval_NG” which will be executed if the approval job is rejected
Add the following to the default setting of the command job which was configured when it was created.
・Wait condition: Will be executed if the approval job ends with the “Error” status.
・End status set under the “End if condition unmatched” checkbox: Normal
・End value set under the “End if condition unmatched” checkbox: 0
・Command: Specify the node, which was registered in Repository in 1, as a scope. Set start command ”echo NG”.

 

 

4. Execute job unit “JU01”, and then approve the approval job.
Execute the job unit.

 

When executing job unit “JU01”, an approval request will be displayed in the Approval perspective. Double-click on the request, and then click on the Approve button.

 

Confirm the end statuses of the job unit, approval job and command jobs are as follows in the Job History [Job Details] view of the Job History perspective.
Job unit “JU01”: Normal
Approval job “Approval”: Normal
Command job “Approval_OK”: Normal
Command job “Approval_NG”: Normal (Unmatched)
Click command jobs ”Approval_OK” and “Approval_NG” respectively in the Job History [Job Details] view of the Job History perspective, and then confirm their run statuses are as follows in the Job History [Node Details] view of the Job History perspective.

・Command job “Approval_OK”: End
・Command job “Approval_NG”: Waiting

 

 

5. Execute the job unit, and then reject the approval job

Execute the job unit.

 

When executing job unit “JU01”, an approval request will be displayed in the Approval perspective. Double-click on the request, and then click on the Reject button.

 

Confirm the end statuses of the job unit, approval job and command jobs are as follows in the Job History [Job Details] view of the Job History perspective.
Job unit “JU01”: Normal
Approval job “Approval”: Error
Command job “Approval_OK”: Normal (Unmatched)
Command job “Approval_NG”: Normal
Click on command jobs “Approval_OK” and “Approval_NG” respectively in the Job History [Job Details] view of the Job History perspective, and then confirm their run statuses are as follows in the Job History [Node Details] view of the Job History perspective.

・Command job “Approval_OK”: Waiting
・Command job “Approval_NG”: End

 

 

 

That’s it for the brief introduction to how to perform serial execution of jobs where execution conditions are specified.


ご意見やお問い合わせについて

この記事へのご意見やお問い合わせについては、こちら(お問い合わせフォーム)もしくは
Hinemos営業担当【hsd-sales@atomitech.jp】までご連絡ください。
※お問い合わせフォームからご連絡の場合には、お問い合わせ内容で「Hinemosについて」を選択し、
本文の冒頭に「Hinemos研究日記_【タイトル名】」とご記載ください。

定期的にHinemos相談会をzoomで開催しております。
下記もご利用ください。