Base class for custom activities that wants to use EventTrackingService to track which instances that currently is waiting for a specific event

Namespace:  EPiServer.WorkflowFoundation.Activities
Assembly:  EPiServer.WorkflowFoundation (in EPiServer.WorkflowFoundation.dll) Version: 5.2.375.236

Syntax

C#
[SerializableAttribute]
[DefaultEventAttribute("Invoked")]
public abstract class CompositeCustomBase<T> : CompositeEventBase<T>
where T : new(), HandleExternalEventActivity

Type Parameters

T
activity inherited from HandleExternalActivity

Examples

Shows a sample over how a custom event activity uses this class to register itself with EventTrackingService
CopyC#
[ExternalDataExchange]
public interface ICustomInterface
{
    event EventHandler<ExternalDataEventArgs> CustomEvent;
}
public sealed class CustomActivity : HandleExternalEventActivity
{
    public CustomActivity()
    {
        base.InterfaceType = typeof(CodeSamples.WorkflowFoundation.Activities.ICustomInterface);
        base.EventName = "CustomEvent";
    }
}
public sealed class CustomCompositeActivity : CompositeCustomBase<CustomActivity>
{
}
And this shows how EventTrackingService can be used to query which instances that currently is registered for the event
CopyC#
public static class Sample
{
    public static IList<Guid> GetWaitingInstances()
    {
        return EPiServer.WorkflowFoundation.Services.EventTrackingService.GetInstancesForEvent("ICustomInterface.CustomEvent");
    }
}

Inheritance Hierarchy

See Also