Jobs running from a process are not properly protected from manual UI
status changes and deletion, leading to an unusable 'Completed' job instance.
Job scheduled from a process can be Paused/Resumed and go to 'Completed', but then cannot be deleted due to NJS-0125 error.
When a Clarity job is scheduled via a process/definition, the resulting job instance on the Scheduled Jobs page should be restricted from manual actions like Pause, Resume, Cancel, or Delete. The status should consistently remain as 'Job Template For Process Engine' or 'Pending for Process Engine'.
The current behavior allows the job to be Paused and Resumed, ultimately permitting the job to reach a 'Completed' status. When an attempt is made to Delete this 'Completed' instance, the system incorrectly throws the error NJS-0125, preventing the deletion, which is contradictory to the desired state for a process-driven job.
STEPS TO REPRODUCE:
1. Create a process in Clarity that is configured to run a Clarity job, e.g. Clean User Sessions.
2. Start/execute the process, which will schedule the job to run.
3. Navigate to Reports and Jobs > Jobs > Scheduled and look for the job/job run Id.
4. Checkmark the job instance that was scheduled by the process and select 'Pause'.
5. Checkmark the job and select 'Resume'. The job is allowed to run and is set to 'Completed'
6. Attempt to Delete the 'Completed' job instance.
Actual:
A job that is scheduled from a process is allowed to be Paused and Resumed, and is allowed to go to 'Completed'. When attempting to Delete the 'Completed' instance, it repeatedly gives the 'NJS-0125' error, making the job impossible to be deleted.
Expected:
The job status should not be allowed to be set to 'Paused', 'Resume', 'Cancelled', nor 'Delete' as it is a job scheduled by a process. It should always retain the status: 'Job Template For Process Engine' or 'Pending for Process Engine'. When attempting any of these button actions, it should consistently provide the protective message: NJS-0125: Job 'EXAMPLE' cannot be deleted because it is currently used by process 'ABC_EXAMPLE' (or similar message indicating it's process-controlled).
16.3.3+
DE179970
This will be under Engineering review.