Start of Content Area

Process documentation Correlating Objects  Locate the document in its SAP Library structure

Purpose

A correlation enables you to identify objects that belong together, for example, a quotation and the relevant sales order. This involves correlating the objects by using one or more common elements, for example, the quotation number. When you define a Workflow, you can specify the object that the Workflow must wait for, without having to enter the ID of the object.

Process Flow

You define a correlation with the correlation editor. To use the correlation in the Workflow you must first activate (instantiate) it. To do so, use a process control. A subsequent wait step can then use the correlation to determine the object that it must wait for. You can use a correlation when waiting for an event and when waiting for an event by using Workflow.

Defining a Correlation

       1.      To start the correlation editor, in the Workflow Builder choose Environment  ® Development  ® Correlation Editor (transaction SWF_CRL1) and enter a name for the correlation.

       2.      In the screen area on the left of the correlation editor, select the object types that are involved in the correlation.

       3.      In the screen area on the right, define the container elements that make up the correlation.

       4.      In the lower screen area on the right, define the assignment for each container element to the relevant object (binding between object and correlation container).

Activating a Correlation

...

       1.      Insert a Process Control step into the Workflow at the required location.

       2.      Choose the Control tab page and in the Function field, enter Activate Correlation.

       3.      Select the event for which the correlation is to be activated and the correlation to be activated.

       4.      Specify how the correlation value is to be determined.

¡        Using Basis Element: If you have defined the binding in the correlation definition, you can specify a container element that references the corresponding basis element from the correlation definition.

¡        Using Binding: Select this entry if you want to define a binding between the Workflow container and the correlation container.

       5.      In the Correlation Instance field, select the container element that is to include the correlation object.

The correlation object points to the value of the correlation. The container element for the correlation object must have the predefined data type CL_SWF_MOD_CORRELATION.

Defining a Wait Step: Wait for Event with Correlation

...

       1.      Navigate to the wait step and choose the Control tab page. In the Wait field, enter Wait for Event and select Correlation.

       2.      Choose the object type for the event as well as the event itself. 

       3.      Select the correlation and specify how you want the value of the correlation to be determined.

¡        Using Basis Element: Select this entry if you have defined the binding in the correlation definition.

¡        Using Binding: Select this entry if you want to define a binding between the Workflow container and the correlation container.

Defining a Wait Step: Wait for Event By Using Workflow with Correlation

...

       1.      In the version-specific basic data of the Workflow, define the event that the Workflow is to wait for.

In the Wait Type field, select the entry Wait for Event By Using Correlation and in the Receiver Type field, select the entry Event for Wait Step.

       2.      On the Control tab page in the wait step, select the event that you defined earlier.

       3.      Under Correlation Instances, select the container element or container elements that contain the values of the correlations that the event must fulfill.

 

 

End of Content Area