Function documentationObject Type WF_TASK Locate this document in the navigation structure

 

The object type WF_TASK provides methods for finding and assigning agents for steps in the workflow. An object of the type WF_TASK is a task specified with type (two characters) and number (eight digits).

Features

Method AllAgentsOfTaskGetAndDispatch

The method AllAgentsOfTaskGetAndDispatch (Determine all agents and select) enables you to select recipients for the work item of a step. The task referenced in the step is an import parameter of the method.

The method determines a list of all possible agents for the task, if it is not a general task. The agent of the method can make their choice from this list. This selection list is an export parameter of the method.

The method requests a recipient list from the agent of the method for a general task. This list can be made up of user names or distribution lists.

Since the system only searches for distribution lists if it was not able to find a name, you must ensure that you only use distribution lists whose names are not also used as user names.

Parameters of method AllAgentsOfTaskGetAndDispatch

The method AllAgentsOfTaskGetAndDispatch ( Determine all agents and select) enables you to select recipients for the work item of a step.

Parameter

Type

Explanation

Weg_ID

Import

Evaluation path - positions and users should be the result of the evaluation.

Act_Org_Obj

Import

Starting point of the evaluation - any organizational object can be specified here.

Task_ID

Import

Task ID (two-character task type and eight-digit number) - the possible agents of this task are used for reconciliation.

SelectMultiple

Import

Flag: Multiple selection allowed

If the indicator is set, the result of the selection is returned in the multiline element SelectedObjectList. Otherwise the result is returned in the single-line element SelectedObject.

SelectedObject

Export

Recipient - the recipient is identified using either a two-character code and an eight-digit number, or the two-character code US and the twelve-character user name.

SelectedObjectList

Export

List of recipients - the recipients in the list are identified in a similar manner to the parameter SelectedObject.

When the method is used in a task, container elements with the same names as the method parameters are created in the task container and the relevant binding is defined from/to the task container as standard.

Note Note

If it is not necessary to reconcile the agents determined using the evaluation path with the possible agents of the task, the evaluation path can be chosen so that only the possible agents are determined in the first place.

  • Use the same task as in Task_ID as Act_Org_Obj.

  • Use the evaluation path SAP_TAGT as Weg_ID.

End of the note.
Method Dispatch

The method Dispatch (Display and select agents) enables recipients to be selected from a list. The list must be passed to the method as an import parameter.

Process flow when executing the method Dispatch
  1. The method receives a list of agents as import parameter. These agents can be organizational units, jobs, positions, and users.

  2. This list is reconciled with the possible agents of the task for which the recipients are to be determined.

    The list then contains only the users who both result from the evaluation path and are possible agents.

    Note Note

    The reconciliation only works if the evaluation path only returns positions and users.

    End of the note.
  3. This (reduced) list is provided to the actual agent of the method so that they can determine the recipients from the users.

  4. The result is made available as an export parameter of the method.

Parameters of method Dispatch

The parameters of the method Dispatch (Display and select agents) are listed and explained in the table below.

Parameter

Type

Description

ObjectList

Import

List of users as a basis for the reconciliation - the users in the list are identified using either a two-character code and an eight-digit number, or the two-character code US and the twelve-character user name.

Task_ID

Import

Task ID (two-character task type and eight-digit number) - the possible agents of this task are used for reconciliation.

SelectMultiple

Import

Flag: Multiple selection allowed - if the indicator is set, the result of the selection is returned in the multiline container element SelectedObjectList, otherwise the result is returned in the single-line element SelectedObject.

SelectedObject

Export

Recipient - the recipient is identified using either a two-character code and an eight-digit number, or the two-character code US and the twelve-character user name.

SelectedObjectList

Export

List of recipients - the recipients in the list are identified in a similar manner to the parameter SelectedObject.

Note Note

The method Dispatch is called internally by the method GetListAndDispatch.

End of the note.
Method Resolve

The method Resolve resolves a list of organizational objects consisting of two-character type and eight-digit number by evaluating the organizational plan up to user level. The resolved list is returned sorted alphabetically, with any duplicates being omitted.

Parameters of method Resolve

Parameter

Type

Description

ObjectList

Import

List of organizational objects - the objects in the list are identified using their two-character code and eight-digit number or twelve-character user name.

ResolvedObjectList

Export

List of user names - the objects in the list are identified using the two-character code US and the twelve-character user name.

Methode ResolveAndDispatch

The method ResolveAndDispatch combines the methods Resolve and Dispatch and processes the following steps:

  1. A list of organizational objects consisting of two-character type and eight-digit number is resolved up to user level by evaluating the organizational plan.

  2. This list is passed to the selection screen.

  3. The selection constitutes the return code of the method.

It is not the organizational objects in the task definition that are offered for selection in the selection screen, but the users connected with these organizational objects.

You should use the virtual attribute AllAgentsOfTask to read the task definition and as an import parameter for the method.

Parameters of method ResolveAndDispatch

Parameter

Type

Description

ObjectList

Import

List of the organizational objects that are offered for selection, resolved to user level.

The objects in the list are identified using their two-character codes and eight-digit numbers or twelve-character user names.

Title

Import

Title of the dialog box for agent selection.

SelectMultiple

Import

Flag: Multiple selection allowed

If the indicator is set, the result of the selection is returned in the multiline container element ResolvedSelectedObjectList. Otherwise the result is returned in the single-line element ResolvedSelectedObject.

ResolvedSelectedObject

Export

Recipient - the recipient is identified using the two-character code US and the twelve-character user name.

ResolvedSelectedObjectList

Export

List of recipients - the recipients are identified using the two-character code US and the twelve-character user name.

Method AllAgtsOfTskGetDispatchResolve

The method AllAgtsOfTskGetDispatchResolve executes the methods AllAgentsOfTaskGetAndDispatch and Resolve in succession, meaning that the recipients returned are all user names.

It is possible to restrict the organizational objects offered for selection and deactivate multiple selection within this list. However, a multiline container element is always returned irrespective of the status of multiple selection.

Parameters of method AllAgtsOfTskGetDispatchResolve

Parameter

Type

Description

SelectMultiple

Import

Flag: Multiple selection allowed - multiple selection refers to selection on the screen. The return value of the method is always a multiline container element.

Title

Import

Title of the dialog box for agent selection.

AllowedAgentTypes

Import

List of the Organizational Management types that can be selected, for example "O" for "organizational unit".

SelectedObjectList

Export

List of recipients - the recipients are identified using the two-character code US and the twelve-character user name.

Attribut AgentsOfTask

The (multiline) virtual attribute provides all possible agents of the task by reading the task definition.