Class CreateTask

Activity that creates an Task for a user/role in EPiServer.

Inheritance
System.Object
CreateTask
Namespace: EPiServer.WorkflowFoundation.Activities
Assembly: EPiServer.WorkflowFoundation.dll
Version: 8.11.0
Syntax
public class CreateTask : InvokesBase<CreateTask>
Remarks

AssignTo and TaskSubject are mandatory and if not seet in runtime an WorkflowException will be thrown

It is possible to specify which UI should be loaded when the user who has been assigned the task clicks on the task link. To associate a task with a specific user control the property AssociatedActivity can be used. The related activity must have ActivityPlugInAttribute attribute with a valid URL to a usercontrol. If AssociatedActivity is not set for a task, the corresponding workflow instance will be searched for waiting activities (event based activities) when the task link is clicked. The usercontrol specified by the attribute will be loaded if any of the waiting activities has a valid ActivityPlugIn attribute set. If no valid attribute is found the default edit task control will be loaded.

Constructors

CreateTask()

Initializes a new instance of the CreateTask class.

Declaration
public CreateTask()

Fields

ActivityRelatedProperty

Register ActivityRelated property so it can be databound

Declaration
public static DependencyProperty ActivityRelatedProperty
Field Value
Type Description
System.Workflow.ComponentModel.DependencyProperty

AssignToProperty

Register AssignTo property so it can be databound

Declaration
public static DependencyProperty AssignToProperty
Field Value
Type Description
System.Workflow.ComponentModel.DependencyProperty

AssociatedActivityProperty

Register AssociatedActivity property so it can be databound

Declaration
public static DependencyProperty AssociatedActivityProperty
Field Value
Type Description
System.Workflow.ComponentModel.DependencyProperty

DueDateProperty

Register DueDate property so it can be databound

Declaration
public static DependencyProperty DueDateProperty
Field Value
Type Description
System.Workflow.ComponentModel.DependencyProperty

LogActionProperty

Register LogAction property so it can be databound

Declaration
public static DependencyProperty LogActionProperty
Field Value
Type Description
System.Workflow.ComponentModel.DependencyProperty

NotifyByEmailProperty

Register NotifyByEmail property so it can be databound

Declaration
public static DependencyProperty NotifyByEmailProperty
Field Value
Type Description
System.Workflow.ComponentModel.DependencyProperty

PageLinkProperty

Register PageLink property so it can be databound

Declaration
public static DependencyProperty PageLinkProperty
Field Value
Type Description
System.Workflow.ComponentModel.DependencyProperty

StateBagProperty

Register LogAction property so it can be databound

Declaration
public static DependencyProperty StateBagProperty
Field Value
Type Description
System.Workflow.ComponentModel.DependencyProperty

TaskDescriptionProperty

Register TaskDescription property so it can be databound

Declaration
public static DependencyProperty TaskDescriptionProperty
Field Value
Type Description
System.Workflow.ComponentModel.DependencyProperty

TaskSubjectProperty

Register TaskSubject property so it can be databound

Declaration
public static DependencyProperty TaskSubjectProperty
Field Value
Type Description
System.Workflow.ComponentModel.DependencyProperty

Properties

ActivityRelated

if set to false, general task UI is shown instead of looking for event activity related UI

Declaration
public bool ActivityRelated { get; set; }
Property Value
Type Description
System.Boolean

AssignTo

Gets or sets who this task is assigned to

Declaration
public string AssignTo { get; set; }
Property Value
Type Description
System.String

The assign to.

AssociatedActivity

States which external activity this task should use to fetch UI user control from.

Declaration
public Activity AssociatedActivity { get; set; }
Property Value
Type Description
System.Workflow.ComponentModel.Activity
Remarks

The activity should have ActivityPlugIn attribute

DueDate

Gets or sets the due date for the task.

Declaration
public DateTime DueDate { get; set; }
Property Value
Type Description
System.DateTime

LogAction

Gets or sets if this action should be logged to history items for workflow instance

Declaration
public bool LogAction { get; set; }
Property Value
Type Description
System.Boolean

NotifyByEmail

Gets or sets if a mail should be sent to assigned user

Declaration
public bool NotifyByEmail { get; set; }
Property Value
Type Description
System.Boolean

Gets or sets the PageLink that should be associated with this task. If a page is associated with a task that page will be loaded when assigned user clicks on task.

Declaration
public PageReference PageLink { get; set; }
Property Value
Type Description
PageReference

The task description.

If no page is given the taks is not related to a page.

StateBag

Gets or sets the state bag for the task

Declaration
public Dictionary<string, object> StateBag { get; set; }
Property Value
Type Description
System.Collections.Generic.Dictionary<System.String, System.Object>

The state bag.

Remarks

The saved objects must be serializable

TaskDescription

Gets or sets the task description.

Declaration
public string TaskDescription { get; set; }
Property Value
Type Description
System.String

The task description.

TaskSubject

Gets or sets the task subject.

Declaration
public string TaskSubject { get; set; }
Property Value
Type Description
System.String

The task subject.

Methods

OnMethodInvoking(EventArgs)

Provides a hook for derived classes to set System.Workflow.Activities.CallExternalMethodActivity.ParameterBindings. This method is called just before the external method is run.

Declaration
protected override void OnMethodInvoking(EventArgs e)
Parameters
Type Name Description
System.EventArgs e

An System.EventArgs that contains the data for the System.Workflow.Activities.CallExternalMethodActivity.MethodInvoking event.