SaaS CMS has officially launched! Learn more now.

Interface IWorkflowCommunication

Specifies the events/invokes in host-Workflow communication. This interface is not meant to program directly against rather it is used as base for the communication activities used to communicate between host and workflow instances.

Namespace: EPiServer.WorkflowFoundation.Interfaces
Assembly: EPiServer.WorkflowFoundation.dll
Version: 7.19.2
Syntax
public interface IWorkflowCommunication

Methods

AddHistoryItem(String, String, String, Guid)

Adds a history item to an workflow instance. Useful when an workflow instance wants to log something

Declaration
void AddHistoryItem(string ItemSubject, string ItemDescription, string User, Guid InstanceId)
Parameters
Type Name Description
System.String ItemSubject

The subject of the item to be logged

System.String ItemDescription

The description of the item to be logged

System.String User

The user associated with this item (if any)

System.Guid InstanceId

The instance id.

AddUserData(String, Object, Boolean, Guid)

Adds a serializable custom object to the UserData collection of the workflow instance. Can be used to pass data from an workflow instance so it's accessible through host.

Declaration
void AddUserData(string Key, object Value, bool LogAction, Guid InstanceId)
Parameters
Type Name Description
System.String Key

The key.

System.Object Value

The value.

System.Boolean LogAction

if set to true this action is added to History items for workflow instance

System.Guid InstanceId

The instance id.

Remarks

passed object must be serializable. If custom object is stored, schema for type should be registered with object store

AssociateWithPage(PageReference, Boolean, Guid)

Associates the workflow instance with a EPiServer page.

Declaration
void AssociateWithPage(PageReference PageLink, bool LogAction, Guid InstanceId)
Parameters
Type Name Description
PageReference PageLink

The page link.

System.Boolean LogAction

if set to true this action is added to History items for workflow instance

System.Guid InstanceId

The instance of the workflow

Remarks

A instance associated with a page will only recieve page related events

CreateTask(String, String, String, DateTime, PageReference, String, Boolean, Boolean, Boolean, Dictionary<String, Object>, Guid)

Represents the CreateTask activity. Used when Workflow instances will create a task inside EPiServer

Declaration
void CreateTask(string AssignTo, string TaskSubject, string TaskDescription, DateTime DueDate, PageReference PageLink, string EventActivityName, bool NotifyByEmail, bool LogAction, bool ActivityRelated, Dictionary<string, object> StateBag, Guid InstanceId)
Parameters
Type Name Description
System.String AssignTo

Who the task should be assigend to

System.String TaskSubject

Subject for the task

System.String TaskDescription

Description for the task

System.DateTime DueDate

The due date.

PageReference PageLink

If the task is associated with a page

System.String EventActivityName

Name of the event activity.

System.Boolean NotifyByEmail

if set to true a notification is sent to assignedTo by email

System.Boolean LogAction

if set to false this action is added to History items for workflow instance

System.Boolean ActivityRelated

if set to true [activity related].

System.Collections.Generic.Dictionary<System.String, System.Object> StateBag

The state bag on the task

System.Guid InstanceId

The id of the Workflow instance, which task will be related to

DeleteTask(Int32, Boolean, Guid)

Deletes the task.

Declaration
void DeleteTask(int TaskId, bool LogAction, Guid InstanceId)
Parameters
Type Name Description
System.Int32 TaskId

The task id.

System.Boolean LogAction

if set to true this action is added to History items for workflow instance

System.Guid InstanceId

The instance id.

DeleteTasksForInstance(Boolean, Guid)

Deletes all tasks related to the instance.

Declaration
void DeleteTasksForInstance(bool LogAction, Guid InstanceId)
Parameters
Type Name Description
System.Boolean LogAction

if set to true this action is added to History items for workflow instance

System.Guid InstanceId

The instance id.

Initialize()

Event listening towards DataFactory, file system and task should be setup

Declaration
void Initialize()

ReleaseResources()

Clean up resources

Declaration
void ReleaseResources()

UpdateTask(Int32, TaskStatus, String, String, String, Boolean, Boolean, Guid)

Represents the UpdateTask activity. Used when Workflow instances will update a task inside EPiServer

Declaration
void UpdateTask(int TaskId, TaskStatus Status, string AssignTo, string TaskSubject, string TaskDescription, bool NotifyByEmail, bool LogAction, Guid InstanceId)
Parameters
Type Name Description
System.Int32 TaskId

The task id

TaskStatus Status

The status of the task

System.String AssignTo

Who the task should be assigend to

System.String TaskSubject

Subject for the task

System.String TaskDescription

Description for the task

System.Boolean NotifyByEmail

if set to true [notify by email].

System.Boolean LogAction

if set to true this action is added to History items for workflow instance

System.Guid InstanceId

The id of the Workflow instance, which task will be related to

Events

DirectoryAdded

Event to signal to OnFileAdded activity

Declaration
event EventHandler<WorkflowFileSystemEventArgs> DirectoryAdded
Event Type
Type Description
System.EventHandler<WorkflowFileSystemEventArgs>

DirectoryCopied

Event to signal to OnDirectoryCopied activity

Declaration
event EventHandler<WorkflowFileSystemEventArgs> DirectoryCopied
Event Type
Type Description
System.EventHandler<WorkflowFileSystemEventArgs>

DirectoryDeleted

Event to signal to OnDirectoryDeleted activity

Declaration
event EventHandler<WorkflowFileSystemEventArgs> DirectoryDeleted
Event Type
Type Description
System.EventHandler<WorkflowFileSystemEventArgs>

DirectoryMoved

Event to signal to OnDirectoryMoved activity

Declaration
event EventHandler<WorkflowFileSystemEventArgs> DirectoryMoved
Event Type
Type Description
System.EventHandler<WorkflowFileSystemEventArgs>

FileAdded

Event to signal to OnFileAdded activity

Declaration
event EventHandler<WorkflowFileSystemEventArgs> FileAdded
Event Type
Type Description
System.EventHandler<WorkflowFileSystemEventArgs>

FileCheckedIn

Event to signal to OnFileCheckedIn activity

Declaration
event EventHandler<WorkflowFileSystemEventArgs> FileCheckedIn
Event Type
Type Description
System.EventHandler<WorkflowFileSystemEventArgs>

FileCheckedOut

Event to signal to OnFileCheckedOut activity

Declaration
event EventHandler<WorkflowFileSystemEventArgs> FileCheckedOut
Event Type
Type Description
System.EventHandler<WorkflowFileSystemEventArgs>

FileCopied

Event to signal to OnFileCopied activity

Declaration
event EventHandler<WorkflowFileSystemEventArgs> FileCopied
Event Type
Type Description
System.EventHandler<WorkflowFileSystemEventArgs>

FileDeleted

Event to signal to OnFileDeleted activity

Declaration
event EventHandler<WorkflowFileSystemEventArgs> FileDeleted
Event Type
Type Description
System.EventHandler<WorkflowFileSystemEventArgs>

FileMoved

Event to signal to OnFileMoved activity

Declaration
event EventHandler<WorkflowFileSystemEventArgs> FileMoved
Event Type
Type Description
System.EventHandler<WorkflowFileSystemEventArgs>

FileSystemEvent

Event that will be signaled for all FileSystem events (both files and Directories)

Declaration
event EventHandler<WorkflowFileSystemEventArgs> FileSystemEvent
Event Type
Type Description
System.EventHandler<WorkflowFileSystemEventArgs>

PageCheckedIn

Event to signal to OnPageCheckedIn activity

Declaration
event EventHandler<WorkflowPageEventArgs> PageCheckedIn
Event Type
Type Description
System.EventHandler<WorkflowPageEventArgs>

PageCreated

Event to signal to OnPageCreated activity

Declaration
event EventHandler<WorkflowPageEventArgs> PageCreated
Event Type
Type Description
System.EventHandler<WorkflowPageEventArgs>

PageDeleted

Event to signal to OnPageDeleted activity

Declaration
event EventHandler<WorkflowPageEventArgs> PageDeleted
Event Type
Type Description
System.EventHandler<WorkflowPageEventArgs>

PageEvent

Event that will be signaled for all page events

Declaration
event EventHandler<WorkflowPageEventArgs> PageEvent
Event Type
Type Description
System.EventHandler<WorkflowPageEventArgs>
Remarks

Will only be fired to instances that has page associated

PageLanguageDeleted

Event to signal to OnPageLanguageDeleted activity

Declaration
event EventHandler<WorkflowPageEventArgs> PageLanguageDeleted
Event Type
Type Description
System.EventHandler<WorkflowPageEventArgs>

PageMoved

Event to signal to OnPageMoved activity

Declaration
event EventHandler<WorkflowPageEventArgs> PageMoved
Event Type
Type Description
System.EventHandler<WorkflowPageEventArgs>

PagePublished

Event to signal to OnPagePublished activity

Declaration
event EventHandler<WorkflowPageEventArgs> PagePublished
Event Type
Type Description
System.EventHandler<WorkflowPageEventArgs>

PageSaved

Event to signal to OnPageSaved activity

Declaration
event EventHandler<WorkflowPageEventArgs> PageSaved
Event Type
Type Description
System.EventHandler<WorkflowPageEventArgs>

TaskDeleted

Event to signal to OnTaskDeleted activity

Declaration
event EventHandler<WorkflowTaskEventArgs> TaskDeleted
Event Type
Type Description
System.EventHandler<WorkflowTaskEventArgs>

TaskStatusChanged

Event to signal to OnTaskStatusChanged activity

Declaration
event EventHandler<WorkflowTaskEventArgs> TaskStatusChanged
Event Type
Type Description
System.EventHandler<WorkflowTaskEventArgs>

Extension Methods