Hi
@Michael A. LowryI'm pretty sure that :MODIFY_TASK won't work here. Instead you'll want to use :STOP nomsg in the (Pre-)Process tab of a Job or a SCRI.
I would activate the check Job via ACTIVATE_UC_OBJECT(MY_CHECK_JOB) (or PREP_PROCESS) and scan the report for the string you expect to occur. If the string doesn't occour, => :STOP NOMSG in the process tab of the calling object. So the calling object gets the status ENDED_OK or ENDED_EMPTY. The job started via A_U_O or P_P (see above) will always get the status ENDED_OK.
Cheers
Christoph
------------------------------
----------------------------------------------------------------
Automic AE Consultant and Trainer since 2000
----------------------------------------------------------------
------------------------------
Original Message:
Sent: Nov 23, 2022 09:46 AM
From: Michael Lowry
Subject: Change job status to ENDED_EMPTY if no results are found
I'm working on a job that checks for tasks in a remote AE system. I'd like to make the task end with the status ENDED_EMPTY if no matching tasks are found. I don't want the task to end with an error status, because I'd like to distinguish the case where no results are found, which is normal, from an error condition.
I know it's possible to mark a task ENDED_NOT_OK using :MODIFY_TASK
, but so far I haven't figured out how to mark a task ENDED_EMPTY. Does anyone know a way to accomplish this? Alternatively, is there a way to change the task to some other non-error status?
There was an earlier discussion about this, but the names of the participants were lost during one forum migration or another.