Show / Hide Table of Contents

Class DefaultWorkflowProcessor

The default implementation of the IWorkflowProcessor service contract.

Inheritance
System.Object
Loggable
DefaultWorkflowProcessor
Implements
ILoggable
IWorkflowProcessor
Inherited Members
Loggable.Logger
Loggable.GetLogger()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Kephas.Workflow
Assembly: Kephas.Workflow.dll
Syntax
[OverridePriority(Priority.Low)]
public class DefaultWorkflowProcessor : Loggable, ILoggable, IWorkflowProcessor

Constructors

| Improve this Doc View Source

DefaultWorkflowProcessor(ICompositionContext, ICollection<IExportFactory<IActivityBehavior, ActivityBehaviorMetadata>>)

Initializes a new instance of the DefaultWorkflowProcessor class.

Declaration
public DefaultWorkflowProcessor(ICompositionContext compositionContext, ICollection<IExportFactory<IActivityBehavior, ActivityBehaviorMetadata>> behaviorFactories)
Parameters
Type Name Description
ICompositionContext compositionContext

Context for the composition.

System.Collections.Generic.ICollection<IExportFactory<IActivityBehavior, ActivityBehaviorMetadata>> behaviorFactories

The behavior factories.

Properties

| Improve this Doc View Source

CompositionContext

Gets a context for the composition.

Declaration
public ICompositionContext CompositionContext { get; }
Property Value
Type Description
ICompositionContext

The composition context.

Methods

| Improve this Doc View Source

ApplyAfterExecuteBehaviorsAsync(IEnumerable<IActivityBehavior>, IActivityContext, CancellationToken)

Applies the behaviors invoking the AfterExecuteAsync(IActivityContext, CancellationToken) asynchronously.

Declaration
protected virtual Task ApplyAfterExecuteBehaviorsAsync(IEnumerable<IActivityBehavior> behaviors, IActivityContext context, CancellationToken cancellationToken)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<IActivityBehavior> behaviors

The behaviors.

IActivityContext context

The execution context.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

An asynchronous result.

| Improve this Doc View Source

ApplyBeforeExecuteBehaviorsAsync(IEnumerable<IActivityBehavior>, IActivityContext, CancellationToken)

Applies the behaviors invoking the BeforeExecuteAsync(IActivityContext, CancellationToken) asynchronously.

Declaration
protected virtual Task ApplyBeforeExecuteBehaviorsAsync(IEnumerable<IActivityBehavior> behaviors, IActivityContext context, CancellationToken cancellationToken)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<IActivityBehavior> behaviors

The behaviors.

IActivityContext context

The execution context.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

An asynchronous result.

| Improve this Doc View Source

ExecuteAsync(IActivity, Object, IExpando, IActivityContext, CancellationToken)

Executes the activity asynchronously, enabling the activity execution behaviors.

Declaration
public Task<object> ExecuteAsync(IActivity activity, object target, IExpando arguments, IActivityContext context, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
IActivity activity

The activity to execute.

System.Object target

The activity target.

IExpando arguments

The execution arguments.

IActivityContext context

The execution context.

System.Threading.CancellationToken cancellationToken

Optional. The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<System.Object>

A promise of the execution result.

| Improve this Doc View Source

GetActivityInfo(IActivity, IActivityContext)

Gets the IActivityInfo for the activity to execute.

Declaration
protected virtual IActivityInfo GetActivityInfo(IActivity activity, IActivityContext activityContext)
Parameters
Type Name Description
IActivity activity

The activity to execute.

IActivityContext activityContext

Context for the activity.

Returns
Type Description
IActivityInfo

The activity information.

| Improve this Doc View Source

GetExecutionArgumentsAsync(IActivityInfo, IExpando, IActivityContext, CancellationToken)

Gets the activity arguments asynchronously.

Declaration
protected virtual Task<IExpando> GetExecutionArgumentsAsync(IActivityInfo activityInfo, IExpando input, IActivityContext activityContext, CancellationToken cancellationToken)
Parameters
Type Name Description
IActivityInfo activityInfo

Information describing the activity.

IExpando input

The input.

IActivityContext activityContext

Context for the activity.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<IExpando>

An asynchronous result that yields the activity arguments.

| Improve this Doc View Source

GetOrderedBehaviors(IActivityInfo, IActivityContext)

Gets the behaviors for execution.

Declaration
protected virtual (IEnumerable<IActivityBehavior> behaviors, IEnumerable<IActivityBehavior> reversedBehaviors)GetOrderedBehaviors(IActivityInfo activityInfo, IActivityContext context)
Parameters
Type Name Description
IActivityInfo activityInfo

Information describing the activity.

IActivityContext context

The execution context.

Returns
Type Description
System.ValueTuple<System.Collections.Generic.IEnumerable<IActivityBehavior>, System.Collections.Generic.IEnumerable<IActivityBehavior>>

An enumerator that allows foreach to be used to process the behaviors in this collection.

Implements

ILoggable
IWorkflowProcessor

Extension Methods

DynamicObjectExtensions.SetPropertyValue(Object, String, Object)
DynamicObjectExtensions.TrySetPropertyValue(Object, String, Object)
DynamicObjectExtensions.GetPropertyValue(Object, String)
DynamicObjectExtensions.TryGetPropertyValue(Object, String, out Object)
DynamicObjectExtensions.GetRuntimeTypeInfo(Object)
DynamicObjectExtensions.ToDynamic(Object)
DynamicObjectExtensions.ToExpando(Object)
BehaviorValue.ToBehaviorValue<TValue>(TValue)
CollectionExtensions.AddRange<T, TItem>(T, IEnumerable<TItem>)
LoggingExtensions.GetLogger(Object, IContext)
TypeExtensions.GetAbstractType(Object)
TypeExtensions.GetAbstractTypeInfo(Object)
ReflectionHelper.GetTypeInfo(Object)
EntityEntryExtensions.TryGetAttachedEntityEntry(Object)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX