Entering content frameBackground documentation Service Provider for SAP Business Workflows Locate the document in its SAP Library structure

The service provider for SAP Business Workflows can insert workflows from all SAP application systems into Records Management.

In the service provider for workflows, one element type corresponds to exactly one workflow definition. By assigning the element type to model nodes, you can therefore incorporate a workflow definition into a record model. In a record that is based on this record model, you can start the corresponding workflow instance or search for an existing workflow instance. The number of the appropriate workflow instance is inserted in the record. You can use this number to display the current log of the workflow instance from the record at any time.

SP POID Parameters

WF_INSTANCE_ID: ID of the workflow instance

Connection Parameters

WF_DEFINITION: Workflow definition (obligatory)

Enter the ID of a workflow definition. Every element type that you create will thus be related to one workflow definition. The elements of this element type are the only workflow instances of this workflow definition. The entry must begin with WS, followed by the 8-digit number of the workflow definition.

RFC DESTINATION: RFC destination of the target system (obligatory)

Enter the RFC destination of the system from which the workflow definitions or workflow instances should be incorporated. To determine an RFC destination, or to create a new one, choose the following in the Implementation Guide (IMG): SAP Web Application Server ® Application Link Enabling (ALE) ® Sending and Receiving Systems ® Systems in Network ® Define Target Systems for RFC Calls.

If you are including a workflow definition from the local system, enter NONE.

RFC-DESTINATION_CALLBACK: RFC destination of the calling system (obligatory)

Enter the RFC destination of the system in which Records Management is running. The RFC destination must be specified from the system in which the workflow definition is created. This enables you to return from the target system (system where the workflow was created) to the outbound system (system where Records Management is running). This is necessary, for example, if a workflow is defined that executes functions for a record.

If you are including a workflow definition from the local system, enter NONE as a value for the parameter.

FUNCTION_START_WORKFLOW: Function module for starting the workflow (optional)

Enter the name of a function module that starts the workflow, and therefore creates an instance of the workflow.

By implementing a function module, you can include your own dialog step for entering the input parameter that may be required for the workflow. If you do not enter a value, the system uses the SAP function module SRM_SP_WFL_START_WORKFLOW. This generates a dialog step for entering a value for the workflow input parameter.

Note If you implement your own function module, this must have the same interface as the respective SAP function module.

The parameters listed below are automatically assigned values by the SAP function module. They are displayed in a dialog box after the workflow has started.

Prerequisite: The parameters are import elements of the workflow container and are typed there as specified below.

Typing: Business object RECORD.

This parameter is always required if the workflow functions are to be performed in a record. The function module provides both the key fields of the business object with values. The business object is identified for the record from which the workflow is started.

Typing: Character datatype <= 255 characters.

This parameter is required if a BAPI is called within a workflow that the record manipulates. This requires the value as an import parameter. The function module provides the parameter with the ID of the record from which the workflow is started.

Typing: Character datatype <= 255 characters.

This parameter is required if a BAPI is called within a workflow that the record manipulates. This requires the value as an import parameter. The function module provides the parameter with the document class of the record from which the workflow is started.

Typing: Character datatype <= 255 characters.

This parameter is required if a BAPI is called within a workflow that the record manipulates. This requires the value as an import parameter. The function module provides the parameter with the RMS ID of the RMS to which the record belongs that is used as a starting point for the workflow.

Typing: Character datatype <= 255 characters.

This parameter is required if a BAPI is called within a workflow that the record manipulates. The function module provides the parameter with the element type of the record from which the workflow is started.

Typing: WFSYST-ACT_AGENT

This parameter is required if the user who started the workflow from the record is to have the option to determine the agent for the first work item. In the standard setting, the function module provides the parameter with the current user name. You can, however, overwrite this setting in the dialog box that displays the parameter values.

Typing: Character datatype <= 255 characters.

This parameter is required if the workflow is in a separate system to the Records Management system, and activities are to be performed using the record during the workflow. Example: During the workflow, elements are created that are automatically inserted into the record from which the workflow is started. The function module provides the parameter with the RFC destination that you have entered as a value for the connection parameter RFC_DESTINATION_CALLBACK.

The following three parameters are the context parameters. For more information, see Context Parameters below.

Typing: Character datatype <= 255 characters.

This parameter has more than one line. It is required to enable automatic insertion of an element created within the workflow, at a defined position in the record.

The function module provides the parameter with the value/s for the context attribute TARGET_ANCHOR. Prerequisite: You have set the context attribute TARGET_ANCHOR in the record model for the model node to which you have assigned the element type of the corresponding workflow.

Typing: Character datatype <= 255 characters.

This parameter has more than one line. It is required because the element type of the element must be known before an element can be inserted into a record.

The function module provides the parameter with the value/s for the context attribute TARGET_SPS. Prerequisites: You have set the context attribute TARGET_SPS in the record model for the model node. This is the model node to which you have assigned the element type of the corresponding workflow.

Note: If you want to insert the elements into the record from which the workflow is started. The element type that you enter as a value for the context attribute TARGET_SPS in the record model must belong to the same RMS as the record .

Typing: Character datatype <= 255 characters.

This parameter has more than one line. It is required because the documents that have been created within the workflow are business objects.

The function module provides the parameter with the value/s for the context attribute TARGET_TYPE. Prerequisite: You have set the context attribute TARGET_TYPE in the record model for the model node to which you have assigned the element type of the corresponding workflow.

FUNCTION_PROCESS_WF_LOG: Function module for log display (optional)

Enter the name of a function module that displays the workflow log for a workflow instance.

You can implement a function module to generate your own version of the log display. If you do not enter a value, the system uses the SAP function module SRM_SP_WFL_PROCESS_LOG. This displays the log in the standard version.

Note If you implement your own function module, this must have the same interface as the respective SAP function module.

FUNCTION_QUERY_WORKFLOW: Function module for search (optional)

Enter the name of a function module that searches for workflow instances.

You can implement a function module to individually format the restrictions for creating a hit list, the hit selection, and the columns of the hit list. If you do not enter a value, the system uses the SAP function module SRM_SP_WFL_F4_WIID. This structures the hit list according to a standard template.

Note If you implement your own function module, this must have the same interface as the respective SAP function module.

FUNCTION_INSTANCE_DESCRIPTION: Function module for assigning names (optional)

Enter the name of the function module that determines the names of the individual workflow instances incorporated in the record.

You can implement a function module to determine which variables are used to form the name of a workflow instance when it is created. (Example options: Workflow instance ID, workflow description, user name of the agent). If you do not enter a value, the system uses the SAP function module SRM_SP_WFL_GET_INST_DESCR. This function module uses the ID of the workflow instance and the workflow description as variables for creating a name.

Note If you implement your own function module, this must have the same interface as the respective SAP function module.

Context Parameters

The context parameters of the service provider for workflows enable you to automatically insert work item attachments, or elements that are otherwise related to a work item, into the record. They are inserted into the record from which the workflow instance was created.

Prerequisite: A step is included in the workflow definition for filtering interesting elements for the record and inserting them.

The following text describes the three context parameters for the service provider for workflows.

Note You have to assign values for all three context parameters. The entries for the three parameters are related to each other. The identical line number links them to each other. This is not checked when the parameters are entered.

TARGET_ANCHOR: Marker in the record

Enter a name of your choice. You also enter this name as a value for the attribute ANCHOR for the model node to which the element from the workflow is to be assigned.

TARGET_SPS: Element type

Enter the element type ID of the node to which you want to assign the attachments.

TARGET_TYPE: Business object type

Enter the name of the business object type underlying the element type (in the example below: SOFM).

Through selection of the element type (TARGET_SPS), the business object type has already been selected, because an element type in the service provider for business objects only represents one object type. You need to specifically name the business object type again, (TARGET_TYPE), because the workflow instance only knows the business object type of the attachment, but not of the element type.

Example The following explains the insertion procedure using the example of attachments for a work item:

The agent enters one or more attachments during processing of the work item. In the workflow definition, the subsequent step also inserts these attachments into the record. The attachments cannot be added below the same node as workflow instances, they need their own node. The context parameter values inform the workflow instance under which nodes the attachments are to be added.

Attachments that are added to a work item are business objects, and are instances of the business object type SOFM. The following steps are required for adding attachments to records:

  1. In the service provider for business objects, create an element type that supports the business object type SOFM.
  1. Create a model node in the record model and assign it an element type from the service provider for workflows. For this model node, you need to assign values for the three context parameters. You can enter any number of values for the parameters. This means it is possible to insert different elements that are relevant to a workflow instance into the record.

3. Create a model node in the record model and assign it the element type that you created in step 1. As a value for the attribute ANCHOR for this model node, you must assign the name that you have already assigned to the context attribute TARGET_ANCHOR.

Leaving content frame