Interface IActivityBehavior
Base contract for controlling the execution of activities.
Namespace: Kephas.Workflow.Behaviors
Assembly: Kephas.Workflow.dll
Syntax
public interface IActivityBehaviorMethods
| Improve this Doc View SourceAfterExecuteAsync(IActivityContext, CancellationToken)
Interception called after invoking the service to execute the activity.
Declaration
Task AfterExecuteAsync(IActivityContext context, CancellationToken token)Parameters
| Type | Name | Description | 
|---|---|---|
| IActivityContext | context | The execution context. | 
| System.Threading.CancellationToken | token | The cancellation token. | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task | The asynchronous result. | 
Remarks
The context will contain the response returned by the service. The interceptor may change the response or even replace it with another one.
BeforeExecuteAsync(IActivityContext, CancellationToken)
Interception called before invoking the service to execute the activity.
Declaration
Task BeforeExecuteAsync(IActivityContext context, CancellationToken token)Parameters
| Type | Name | Description | 
|---|---|---|
| IActivityContext | context | The execution context. | 
| System.Threading.CancellationToken | token | The cancellation token. | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task | The asynchronous result. |