Definition as Synchronous or Asynchronous Method
When deciding whether you want to define a method as synchronous or asynchronous, consider the environment of the subsequent use of the method in a single-step task:
Definition as … |
Use |
Asynchronous method |
A single-step task that refers to an asynchronous object method must be defined with at least one terminating event. If you define an asynchronous method, you must ensure that one of the terminating events is triggered after execution of the method. At runtime, the relevant work item is only terminated if one of the defined terminating events occurs. |
Synchronous method |
A single-step task that refers to a synchronous object method can be defined with terminating events. At runtime, the relevant work item is generally terminated when the synchronous method has been successfully executed. But the work item is also terminated if one of the defined terminating events occurs. |
When do you define asynchronous methods?
You define a method as an asynchronous method if you want a single-step task that uses this method to be terminated only via events. The following are possible reasons for defining a method as asynchronous:
The function within the method uses the update task
The method is terminated by an event generated when the update task is successful.

If you nevertheless define the method as a synchronous method under these circumstances, inconsistencies between the workflow and the current status in the database can arise because of update terminations or delays.
The method can also be called outside the workflow
If it is possible that a user may call the function encapsulated in the method outside the workflow although the object is also being processed under the control of a workflow at the same time, you should implement the method as an asynchronous method.
The feedback to the workflow system then takes place via an event. It is therefore irrelevant whether the call took place inside or outside the workflow system. This event must be defined for the object type and its generation must be guaranteed.
An asynchronous method with comprehensive functionality is called in the single-step task
This single-step task gets its specific character from the terminating events.

In a single-step task, a specific order is to be released for billing. In the single-step task, call the (general) method Process order and enter the event Billing block deleted as terminating event.
It is also to be possible for the single-step task to be terminated by events not necessarily from method processing

The single-step task in which the method Process sales order is executed is also terminated by the event Customer unable to pay.
When do you define synchronous methods?
You define a method as a synchronous method if you want to use the processing results as
method parameters or results.The following are also possible reasons for defining a method as synchronous:
The function within the method does not use an update task
The method is "just" to be executed

The method Display for displaying an object.
It is to be possible to call the method several times while the single-step task is being processed
Processing of the task is not completed until the agent sets the processing status to done in their Business Workplace.

The method Write letter.
There are no suitable events available
There are no events available that are suitable as terminating events and you have no way of creating the missing events.