Processing Package - lucienlazar/plsql-application-locking GitHub Wiki

The processing package has two procedures: start process that starts a process with status running and end process that completes a process run and updates its status to successful or failed.

Procedure start_process

Description

Procedure start_process starts a process with status running. It inserts a record in the process runs table with process name given as input parameter, run id from sequence, start time as current timestamp, end time null and status running.

Parameters

pi_process_name in varchar2 – name of the process

Call example

begin processing.start_process('P1'); end;

Procedure end_process

Description

Procedure end_process ends a process run by setting its status to successful or failed. It updates a record in the process runs table identified by process run id given as input parameter with end time as current timestamp and status successful or failed given as input parameter.

Parameters

pi_run_id in integer – run id of the process

pi_run_status in integer – completion status of the process: 1 = successful or 2 = failed

Call example

begin processing.end_process(1, 1); end;