Previous  Next          Contents  Index  Navigation  Glossary  Library

Writing Budget Workflow Extensions

Oracle Projects provides a template package and procedure that you use as the basis of your budget workflow extension procedures. The name of the template package is pa_client_extn_budget_wf.

Print out the following files before you begin writing budget verification extensions. The files are located in the Oracle Projects admin/sql directory.

PAWFBCEB.pls Budget Workflow Extension Package Body Template. This file contains the procedures that you can modify to implement the extension.
PAWFBCES.pls Budget Workflow Extension Package Specification Template. If you create procedures outside the predefined procedure within the pa_client_extn_budget_wf package, you must also modify this file to include those new procedures.

Suggestion: After you write the procedures, do not forget to compile the extension and store it in the database. See: Writing PL/SQL Procedures.

Package Procedures

budget_wf_is_used

When Oracle Projects determines whether to call Oracle Workflow for a budget status change, it bases the decision on the settings in the budget type and the project type. You can use this procedure to override those settings and/or add additional requirements.

Table 1 - 129 lists the parameters that Oracle Projects provides for the budget_wf_is_used.

Parameter Usage Type Description
p_draft_version_id IN NUMBER The identifier of the version of the budget.
p_project_id IN NUMBER Identifier of the project.
p_budget_type_code IN VARCHAR2 The budget type code.
p_pm_product_code IN VARCHAR2 The project management product code.
p_result IN OUT VARCHAR2 Result of the procedure. Value is either Y or N.
p_err_code IN OUT NUMBER Error handling code.
p_err_stage IN OUT VARCHAR2 Error handling stage.
p_err_stack IN OUT VARCHAR2 Error handling stack.

start_budget_wf

This procedure starts the workflow process for budget status changes. The procedure also contains the name of the workflow process that is called. The process indicated in the default procedure is PABUDWF.

Table 1 - 130 lists the parameters that Oracle Projects provides for the start_budget_wf procedure.

Parameter Usage Type Description
p_draft_version_id IN NUMBER The identifier of the version of the budget.
p_project_id IN NUMBER Identifier of the project.
p_budget_type_code IN VARCHAR2 The budget type code.
p_mark_as_original IN VARCHAR2 Indicates whether the user has requested that the budget be marked as the original budget.
p_item_type OUT VARCHAR2 The workflow item type.
p_item_key OUT VARCHAR2 The workflow item key.
p_err_code IN OUT NUMBER Error handling code.
p_err_stage IN OUT VARCHAR2 Error handling stage.
p_err_stack IN OUT VARCHAR2 Error handling stack.

verify_budget_rules

You can use this procedure to specify budget verification rules that are applied only when Oracle Workflow is used for budget status changes. This procedure is called by the procedure pa_budget_wf.baseline_budget.

Table 1 - 131 lists the parameters that Oracle Projects provides for the verify_budget_rules procedure.

Parameter Usage Type Description
p_item_type IN VARCHAR2 The workflow item type.
p_item_key IN VARCHAR2 The workflow item key.
p_project_id IN NUMBER Identifier of the project.
p_budget_type_code IN VARCHAR2 The budget type code.
p_workflow_ started_by_id IN NUMBER Identifier of the person who submitted the project status change.
p_event IN VARCHAR2 Identifies the requested status of the budget. Value is either SUBMIT or BASELINE.
p_warnings_only_flag OUT VARCHAR2 Indicates the level of errors the procedure generated.
Y indicates that only warnings were generated.
N indicates that one or more errors were generated.
p_err_msg_count OUT NUMBER Number of warnings and errors.

select_budget_approver

This procedure is called by Oracle Workflow to determine the budget approver. You can use this procedure to add rules for determining who will approve a budget. The default procedure returns the ID of the supervisor of the person who requested the budget status change.

Table 1 - 132 lists the parameters that Oracle Projects provides for the select_budget_approver procedure.

Parameter Usage Type Description
p_item_type IN VARCHAR2 The workflow item type.
p_item_key IN VARCHAR2 The workflow item key.
p_project_id IN NUMBER Identifier of the project.
p_budget_type_code IN VARCHAR2 The budget type code.
p_workflow_ started_by_id IN NUMBER Identifier of the person who requested the budget status change.
p_budget_baseliner_ id OUT NUMBER Identifier of the person selected to approve the budget status change.

See Also

Budget Calculation Extensions


         Previous  Next          Contents  Index  Navigation  Glossary  Library