Skip to content
Process Control - Task Configuration

Process Control - Task Configuration

Overview

This page introduces the steps to create Task IDs in IMG and configure tasks for the Change Record context in BRF+.

  1. Task IDs are a unique concept introduced by XCM. In standard SAP Process Control, users typically create multiple process route templates to due a small variations in the process. This often leads to duplication of tasks across multiple templates.
  2. To address this, XCM provides a more flexible approach using Task IDs.
  3. With Task IDs, you define common tasks once and configure them based on various business conditions.
  4. This allows the same task to be reused across different CR statuses. In BRF+, these tasks can be maintained efficiently in a single rule line, incorporating all relevant conditions.

XCM BAdI Usage

Enhancement Spot /XCM/PR_ES_BACKGROUND_SRV
BAdI /XCM/PR_EX_BACKGROUND_SRV
Interface /XCM/PR_IF_BACKGROUND_SRV

Description: A background task in the process route carries no dialog step. The activity that the task performs is supplied by an own implementation.
The method EXECUTE receives the object ID and object type of the change record together with the route ID, the position and the task ID of the step being processed.
The implementation performs the activity and reports the outcome back through EXCEPTION_SCENARIO, ERROR_MESSAGE and SEVERITY. Where a severity indicating an error is returned, the process exception handling described in the exception handling topic is triggered.

This allows an own check or an update in a connected system to be carried out as a step of the process route, without a user having to confirm a work item.

Signature for reference

METHODS execute
  IMPORTING object_id   TYPE /plmb/gos_internal_key OPTIONAL
            object_type TYPE /plmb/gos_object_type OPTIONAL
            actarea     TYPE srmactar OPTIONAL
            route_id    TYPE /plmb/process_route_id OPTIONAL
            posid       TYPE /plmb/pr_posid OPTIONAL
            posid_wiid  TYPE /plmb/pr_item_wii OPTIONAL
            task_id     TYPE /xcm/pr_task_id OPTIONAL
  CHANGING  exception_scenario TYPE /xcm/pr_exception_scenario
            error_message      TYPE swf_t100ms
            severity           TYPE /plmb/spi_msg_severity .

Enhancement Spot /XCM/PR_ES_TASK_CREATION
BAdI /XCM/PR_EX_TASK_CREATION
Interface /XCM/PR_IF_TASK_CREATE_EXIT

Description: The list of tasks determined for a status can be adjusted before the tasks are created, where the required task cannot be expressed through the decision table alone.
The method MODIFY_TASKS_FOR_CREATION receives the object type and object ID of the change record, an indicator whether the process was started from the Process Builder, and the process route. The task list determined so far is supplied in TASK_FOR_CREATION.
The implementation can add tasks, remove tasks or change the business parameter values of a task in TASK_FOR_CREATION. The list returned is the one that XCM uses to create the tasks.

This exit is called for every task determination, including the runs triggered from the Process Builder. Kindly keep the implementation restricted to the change record types where the adjustment is required.

Signature for reference

class-methods MODIFY_TASKS_FOR_CREATION
  importing
    !OBJECT_TYPE        type /PLMB/GOS_OBJECT_TYPE
    !OBJECT_ID          type /PLMB/GOS_INTERNAL_KEY
    !IS_PROCESS_BUILDER type BOOLE_D optional
    !PROCESS_ROUTE      type /PLMB/S_PROCESS_ROUTE_WI_SP optional
  changing
    !TASK_FOR_CREATION  type /XCM/PR_TASKS_WITH_PARAM_VALUE .

See Also

IMG Customization
BRF Customization
Advanced Process Control Framework

Keywords

Process Route, Process Control, Task IDs, Agent Determination, BRF+

Prerequisites

BRF+ Generation - Process Control