Modeling Automated ActivitiesLocate this document in the navigation structure

Use

An automated activity is a type of flow object in the process that illustrates an activity that the system performs. First, you create an automated activity as a part of your process. To make the automated activity work, proceed as follows:

  1. Assign a service interface definition (WSDL file) of a Web service and an operation to the automated activity.

    When you create an automated activity, it has a SampleTimer service interface assigned to it by default. The default service interface enables you to model executable processes more easily and quickly. You can replace the default SampleTimer service interface with a new one.

    When the process is executed at runtime, the respective Web service is called and the automated activity is executed. You make service interface definitions available either by importing or manually creating them. You also create Service Groups for the service interfaces.

  2. Define input and output data mappings for the automated activity.

Prerequisites

You have opened the Process Development perspective in the SAP NetWeaver Developer Studio and have expanded your project in Project Explorer view.

Procedure

1. Create the Automated Activity

  1. Expand Process Modeling , then expand Processes .

  2. In the context menu of a process, choose Open .

  3. Expand Flow Objects from Palette .

  4. Choose Automated from the dropdown menu, containing all the activities, and click the modeling surface.

    The automated activity appears in the place you clicked.

  5. Choose General in the Properties view and specify a name of the activity in the Name field.

  6. (Optional) Specify a description of the activity in the Documentation field.

Note

You can drag a WSDL file from the Project Explorer view to the modeling surface. A new automated activity is created with the particular service interface and its first operation assigned to the automated activity.

You can also drag an operation from the Project Explorer view to the modeling surface. A new automated activity is created with the particular operation and service interface assigned to the automated activity.

2. Make Service Interfaces Available

You make service interfaces available in one of the following ways:

3. Assign Service Interfaces to Automated Activities

  1. Expand Process Modeling , then expand Processes .

  2. In the context menu of a process, choose Open .

  3. In the modeling surface, choose an automated activity.

  4. In the Properties view, open the Interface tab page.

  5. In the Service Interface field, select a service from the dropdown menu.

  6. In the Operation field, select an operation from the dropdown menu.

Note

Alternatively, drag a WSDL file from the Project Explorer view to an automated activity. The particular service interface and its first operation are assigned to the automated activity.

You can also drag an operation from the Project Explorer view to an automated activity. The particular operation and service interface are assigned to the automated activity. You can also assign services when you drag them from the Search Console view and drop them on automated activities.

Note

For testing purposes, you can simulate the execution of an automated activity without actually connecting to the back end server by using a mock service. To assign a mock service to your automated activity, from the context menu of the activity choose Start of the navigation path Service Mocking Next navigation step Replace with Mock Service End of the navigation path. After you test the service, you revert to the original back end service by choosing Start of the navigation path Service Mocking Next navigation step Revert to Original Service End of the navigation path from the context menu of the activity.

For more information about creating a mock service and using it, refer to Creating Mock Services .

Note

If you use SAP enterprise services to assign them to automated activities, you can avoid unintentional multiple requests to the service provider system by using service idempotency. When idempotency is enabled, the service provider system checks the requests it receives by their unique ID and discards these with the same ID. For more information about configuring idempotency, see Configuring Web Service Connectivity Options to Logical Ports .

4. Create Service References

You create service references for the service interfaces you have assigned to automated activities. Service references enable the connection at runtime to the particular systems that provide the necessary Web services. You create service references to Service Groups, which you use to configure all Web services included in the group when you deploy your process. For more information, see Working with Service Groups .

If you use the default SampleTimer service interface in an automated activity, you do not have to create a Service Group and a service reference for this service interface. The Service Group for this service interface exists by default in your project and the service reference to it is created automatically.

Recommendation

In case you have used logical destinations for Web service consumption in process models created with a SAP NetWeaver version prior to SAP NetWeaver 7.2, we recommend that you switch to using Service Groups instead of a logical destination. This allows you to use the new features such as RFC import. Note that once you switch to using Service Groups, you will not be able to go back to using logical destinations.

Consumption of Web services with logical destination configured is still possible, but you will not be able to change the logical destination you configured initially.

5. Define Data Mappings

More information: Defining Data Mappings .