Interface IWorkflowTaskControl
Interface that usercontrols associated with a task should implement. The control can e.g. communicate with a custom event activity.
Namespace: EPiServer.WorkflowFoundation.UI
Assembly: EPiServer.WorkflowFoundation.dll
Version: 8.11.0Syntax
public interface IWorkflowTaskControl
Remarks
To communicate with a custom event activtiy a custom service should have been registered with ExternalDataExchangeService in workflow runtime. This can be done in web.config (under section externalServices) or through API
Examples
Shows a sample implementation of interface
Properties
InvokeButtonText
Gets the text the invoke button should have. If null or string.Empty is returned, default text "Send" (language dependent) is used
Declaration
string InvokeButtonText { get; }
Property Value
Type | Description |
---|---|
System.String | The invoke button text. |
Methods
ContextData(Guid, Int32, String, PageReference)
Will be called at startup of the control to sets the context for the task.
Declaration
void ContextData(Guid workflowInstanceId, int taskId, string eventQualifiedName, PageReference pageLink)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | workflowInstanceId | The workflow instance id. |
System.Int32 | taskId | The task id. |
System.String | eventQualifiedName | The Qualified name of the event activity that specified usercontrol |
PageReference | pageLink | The page that is currently loaded in beside action window |
InvokeEvent(Guid, Int32, String)
Method that is called when user clicks "Send" button. Can e.g. be used to invoke event on custom service
Declaration
bool InvokeEvent(Guid workflowInstanceId, int taskId, string eventQualifiedName)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | workflowInstanceId | workflow instance |
System.Int32 | taskId | id of related task |
System.String | eventQualifiedName | The Qualified name of the event activity that specified usercontrol |
Returns
Type | Description |
---|---|
System.Boolean | true if task should be deleted, else false |
Remarks
Before InvokeEvent are called Page.IsValid() is called so any custom validators will have chance to validate input. Since other actions might cause validation as well, validators might get called several times.
PageHasChanged(PageReference, PageReference)
If the page loaded beside Task (that is in edit panel/mode) has changed since the control was loaded then this method is called before InvokeEvent is called (it is called before Page.Validate as well). This means the user has done some browsing in edit panel, e.g. may have shifted a page version.
Declaration
void PageHasChanged(PageReference previousPageLink, PageReference newPageLink)
Parameters
Type | Name | Description |
---|---|---|
PageReference | previousPageLink | The previous page link. |
PageReference | newPageLink | The currently loaded page version loaded |