If that fails the action and/or transaction are closed (DTASK_ACTSHUT() or DTASK_COMSHUT()); if it is OK, DTASK_OBEY() is called.
DTASK_OBEY() calls DTASK_APPLIC() with context OBEY and that in turn calls the user's top-level routine.
On return from DTASK_APPLIC() if STATUS is not SAI__OK, the message status, MESSTATUS, for the final acknowledgement message is set to the bad status value; if STATUS is SAI__OK, the REQUEST returned from the application is checked (DTASK_ACT_SCHED()) to see whether the action is to be terminated or is to be rescheduled. If the user's code has not changed it, the REQUEST will be ACT__END.
If a reschedule is requested, DTASK_ACT_SCHED() will set it up; otherwise the action is ended and the communications transaction closed by sending a reply to the task which initiated the OBEY. MESSTATUS for the reply depends on the STATUS and REQUEST returned from DTASK_APPLIC().
If a reschedule was not requested, MESSTATUS will depend upon the value of REQUEST as follows:
REQUEST | MESSTATUS |
ACT__END | DTASK__ACTCOMPLETE |
ACT__UNIMP | DTASK__UNIMP |
ACT__INFORM | DTASK__ACTINFORM |
SAI__OK | DTASK__IVACTSTAT |
DTASK__SYSNORM | DTASK__IVACTSTAT |
ACT__CANCEL | DTASK__IVACTSTAT |
Other | REQUEST |
ADAM The Control Subsystem