Generate notifications when the project status is changed.
One possible use of this function could be to send an e-mail to someone when projects are set to Completed and to someone else when projects are set to Rejected.
Input
Parameter | Type | Description |
|---|---|---|
p_project_id | INTEGER | The ID of project being modified |
p_project_status_id | INTEGER | The ID of the project_status that the project now has |
Example
The following example shows the use of this function:
procedure ProjectStatusUpdate( |
p_project_id in project.pj_id%type, |
p_project_status_id in project_status.PROJECT_STATUS_ID%type |
) is |
-- v_NAME PROJECT_STATUS.NAME%TYPE; |
begin |
/* |
|
-- Example code |
SELECT NAME INTO v_NAME |
FROM PROJECT_STATUS |
WHERE PROJECT_STATUS_ID = p_project_status_id; |
|
IF v_NAME = 'REJECTED' THEN |
-- Send an email |
NULL; |
END IF; |
*/ |
|
NULL; |
end ProjectStatusUpdate; |