--------------------------------------------------------
--  DDL for Package PKG_WORKFLOW_COORDINATOR
--------------------------------------------------------

  CREATE OR REPLACE EDITIONABLE PACKAGE "ENVX_OPER"."PKG_WORKFLOW_COORDINATOR" AS

------------- FUNCTIONS ------------------
    FUNCTION next_step_flow (
        pi_id_action     IN  NUMBER,
        pi_id_step_flow  IN  NUMBER
    ) RETURN NUMBER;
   --------------------------------------
    FUNCTION next_step_category_b (
        pi_id_action_category IN NUMBER
    ) RETURN BOOLEAN;
   --------------------------------------   
    FUNCTION chg_prof_h (
        pi_id_sys_profile      IN  NUMBER,
        pi_id_sup_sys_profile  IN  NUMBER,
        pi_id_role             IN  NUMBER
    ) RETURN NUMBER;
   --------------------------------------
    FUNCTION chg_env_dir (
        pi_id_enviroment         IN  NUMBER,
        pi_id_parent_enviroment  IN  NUMBER,
        pi_id_enviroment_type    IN  NUMBER
    ) RETURN NUMBER;
------------ PROCEDURES ------------------
    PROCEDURE change_step_order (
        pi_id_step_flow  IN   NUMBER,
        pi_new_position  IN   VARCHAR2,
        po_new_order     OUT  NUMBER,
        po_warning       OUT NOCOPY VARCHAR2
    );
   --------------------------------------
    PROCEDURE change_status_flow (
        pi_id_req_flow      IN   NUMBER,
        pi_new_status_flow  IN   NUMBER,
        po_result           OUT  NUMBER
    );
   --------------------------------------
    PROCEDURE manage_enviroment_group (
        pi_id_preset_group  IN  NUMBER,
        pi_id_enviroment    IN  NUMBER,
        po_warning          OUT NOCOPY VARCHAR2
    );
   --------------------------------------
    PROCEDURE exec_action_workflow (
        pi_id_request    IN  NUMBER,
        pi_id_action     IN  NUMBER,
        pi_user_name     IN  VARCHAR2,
        pi_id_next_user IN  NUMBER,
        pi_observations  IN  VARCHAR2,
        po_warning       OUT NOCOPY VARCHAR2
    );

END pkg_workflow_coordinator;


/
