Table of Contents

Class Workflow

Namespace
Acuit.Pinpoint.Workflows
Assembly
Acuit.Pinpoint.Workflows.dll

Provides a WorkflowSource that loads workflows from various sources.

public class Workflow : WorkflowSource
Inheritance
Workflow
Inherited Members

Remarks

Note that this class exists as the implementation for WorkflowSource to enable converting various sources into loaded workflows, primarily from XAML. It is not necessary to otherwise create or load workflows for execution (i.e., via the WorkflowXamlServices methods).

Once loaded, the workflow should be executed via RootActivity.

Properties

RootActivity

Gets the root activity of the workflow.

public override IActivity RootActivity { get; }

Property Value

IActivity

Methods

Create(IActivity)

Creates a new Workflow from a given root activity.

public static Workflow Create(IActivity rootActivity)

Parameters

rootActivity IActivity

The root activity.

Returns

Workflow

A Workflow from the given root activity.

Exceptions

ArgumentNullException

rootActivity is null.

Create(Stream)

Creates a new Workflow from a given Stream.

public static Workflow Create(Stream stream)

Parameters

stream Stream

The Stream that is used to construct the Workflow.

Returns

Workflow

A Workflow from a given Stream.

Exceptions

ArgumentNullException

stream is null.

InvalidOperationException

The loaded XAML does not contain a workflow.

Exception

The workflow object graph could not be created. Potential causes include: the file content is not well-formed and valid XML, or the file content is not valid XAML at the language level, or the XAML types that are specified in the source XAML did not resolve to backing types in the relevant XAML namespaces. The specific possible exceptions are not documented, but they include XmlException, various exceptions derived from XamlException, and various exceptions derived from IOException.

Create(Uri, string)

Creates a new Workflow from a given Uri.

public static Workflow Create(Uri uri, string originalString = null)

Parameters

uri Uri

The Uri that is used to construct the Workflow.

originalString string

The original string representation of this source (e.g., the source file name), or null to use the string representation of uri.

Returns

Workflow

A Workflow from a given Uri.

Remarks

Pack URIs specifying resources are supported as long as they are in an absolute form like: pack://application:,,,/YourAssemblyShortName;component/Subfolder/ResourceFile.xaml

Other workflows referenced from the workflow via relative WorkflowSource references are supported.

Exceptions

ArgumentNullException

uri is null.

InvalidOperationException

The loaded XAML does not contain a workflow.

Exception

The workflow object graph could not be created. Potential causes include: the file content is not well-formed and valid XML, or the file content is not valid XAML at the language level, or the XAML types that are specified in the source XAML did not resolve to backing types in the relevant XAML namespaces. The specific possible exceptions are not documented, but they include XmlException, various exceptions derived from XamlException, and various exceptions derived from IOException.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.