Search Results check_duration




Overview

AS_SALES_METH_WF is an Oracle E-Business Suite PL/SQL package owned by the APPS schema and classified as an "OTHER" API within the ETRM repository. It belongs to the Oracle Sales (AS) product family and supports the Sales Methodology feature set, which allows organizations to model repeatable, staged selling processes. The package encapsulates the workflow-oriented logic that drives sales methodology execution: it evaluates the current stage of a methodology, determines which tasks exist or should exist for the current and subsequent stages, and generates the corresponding task instances in the JTF task framework. It also emits notes to inform sales users when tasks are created, when durations are exceeded, or when task creation fails.

The package body carries a version header dated 2003, indicating it is a long-standing component carried forward into both EBS 12.1.1 and 12.2.2 without material signature changes. Its private portion contains utility routines — Add_Error_Message, Print_Message, and Get_Error_Message — that manage the FND message stack and debug output. Get_Error_Message in particular retrieves the most recent message from FND_MSG_PUB for downstream error reporting.

Key Procedures and Functions

The package exposes eight documented procedures and functions, which together form the methodology execution lifecycle:

  • START_METHODOLOGY — Initiates a sales methodology for a given sales lead or opportunity, establishing the starting context for subsequent task generation.
  • CHECK_TASK_FOR_CURRENT — Evaluates whether tasks exist for the current stage of the methodology, providing the basis for task creation decisions.
  • CHECK_TASK_EXIST_FOR_NEXT — Determines whether tasks have been defined or instantiated for the next stage, supporting progression logic.
  • CREATE_TASKS — Creates the JTF task instances associated with the applicable methodology stage map.
  • CHECK_DURATION — Assesses the elapsed duration of methodology tasks against configured thresholds. This is the procedure most commonly referenced in searches, and it underpins the duration-monitoring behavior of the methodology workflow.
  • CREATE_NOTE_FOR_DURATION — Generates a note when a task duration threshold is exceeded, alerting the sales user.
  • CREATE_NOTE — Produces a generic note associated with methodology activity.
  • CREATE_NOTE_FOR_TASKS_FAILURE — Logs a note when task creation fails, preserving an audit trail of the failure for the sales user.

Tables Accessed

The package reads and writes methodology configuration data and JTF task data through APPS synonyms. AS_SALES_METHODOLOGY_B and AS_SALES_METHODOLOGY_WF_S hold the methodology definition and its workflow state. AS_SALES_METH_STAGE_MAP and AS_SALES_METH_TASK_MAP define the mapping between stages and the tasks that must be generated. JTF_TASKS_B, JTF_TASK_TEMPLATES_B, and JTF_TASK_STATUSES_B provide the task instance, template, and status reference data. AS_LEADS_ALL supplies the lead/opportunity context in which a methodology runs. Party and resource data come from HZ_CONTACT_POINTS, HZ_PARTY_SITES, and JTF_RS_RESOURCE_EXTNS for task assignment and notification. FND_PROFILE_OPTIONS and FND_PROFILE_OPTION_VALUES are queried to obtain profile-driven behavior, while DUAL and PLITBLM support PL/SQL-level utility operations.

Usage Notes

AS_SALES_METH_WF is invoked indirectly by the Sales Methodology user interface and by concurrent or workflow-driven processing rather than being called directly by end users. It is referenced by at least one other package, confirming its role as a shared service layer. In both 12.1.1 and 12.2.2, the package operates alongside the JTF task framework, and any customizations should preserve the documented procedure interfaces. Because CHECK_DURATION and the note-creation routines depend on the FND message stack, error conditions are surfaced through FND_MSG_PUB conventions.