!-------------------------------------------------------------------------------
!
! Name: rspsti.resource
!
! Purpose: This file is used to construct the trigger, error, and 
!          success status fields in the observation status file.
!
!	This resource file uses a file trigger.
!
!-------------------------------------------------------------------------------
!                          REVISION HISTORY
!-------------------------------------------------------------------------------
!             PR
!   DATE    NUMBER  Developer  Description
! -------- -------- ---------  -------------------------------------------------
! 09/22/98 36848    MSwam      first version 
! 10/20/98 36860    MSwam      add PASSWORD and time trigger 
! 11/13/98 36860_02 MSwam      remove logfile resource
! 06/25/99 38324    WMiller    Set ENV vars
! 07/13/00          MSwam      add data_reduction_path
! 11/26/01 44598_01 MSwam      parameterize calibration stage name
! 04/22/02 44741    WMiller    add ^CL to COMMAND
! 07/01/02 46074    MSwam      Add DISK_SPACE exit status
! 09/10/02 46357    Sherbert   Set OSF_RANK=2,TIME_RANK=1 so process will go 
!                              absent on incorrect password without failing OSFs
! 06/10/02 43915    WMiller    remove time trigger/password
! 04/22/03 43915    Sherbert   Trigger new UnReserve stage instead of CL
! 08/14/03 47755    Sherbert   Trigger CL for Unreserve: simpler for ops
!
!-------------------------------------------------------------------------------
PROCESS_NAME = rspsti           ! Short name for process id
TASK         = <xpoll -p $PATH_FILE -r rspsti>
COMMAND      = 'rspxxx.sh ^CL'  ! Name of the command procedure

DESCRIPTION  = 'Create OTFR response and copy it to DADS'
SYSTEM = OTFR 
CLASS = otf

OSF_RANK             = 1        ! If passwd correct, look for OSFs
OSF_TRIGGER1.RS      = w        ! OSF status column and
OSF_TRIGGER1.DATA_ID = sti      ! OSF data_id field

OSF_PROCESSING.RS  = p          ! Set the processing flag to 'Processing'

OSF_NORMAL.RS      = c          ! Normal: Completed
OSF_NORMAL.CL      = v          ! Normal: Waiting for next stage

OSF_ERROR.RS       = e          ! Error:  Set the error flag

INSUFF_DISK_SPACE.RS = z        ! not enough space in DADS, try later

XPOLL_STATE.00 = OSF_NORMAL
XPOLL_STATE.01 = OSF_ERROR
XPOLL_STATE.03 = INSUFF_DISK_SPACE

XPOLL_ERROR.RS = x              ! Set osf to this if exit state is undefined.

POLLING_TIME  = 10              ! Wait (seconds) before polling for next 
ENV.OUTPATH   = stis_recalib    ! root directory for calibration directories
MINBLOCKS     = 50000

ENV.DATA_REDUCTION_PATH = data_reduction_path ! where calibration occurs
ENV.REQUEST_FILEEXT = request_work_ext   ! file extension for the OTFC_request
ENV.RESPONSE_FILEEXT = response_file_ext ! file extension for the OTFC response
ENV.RESPONSE_STATUS_OK = COMPLETE   ! OTFC_response status for normal processing
ENV.RESPONSE_STATUS_NOCAL = NOCAL   ! OTFC_response status for bypassed calibration
ENV.RESPONSE_DIRECTORY = DADS_response_dir ! directory for sending OTFC response files
!
ENV.ARCH_SERVER      = ARCH_SERVER
ENV.ARCH_DB          = ARCH_DB
ENV.CAL_STAGE_NAME          = cal_stage_name
ENV.TMP = _tmp  ! temporary file ending for copy to IDR
