SaaS CMS has officially launched! Learn more now.

Class WorkflowCompiler

Compiles xoml based Workflows

Inheritance
System.Object
WorkflowCompiler
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.WorkflowFoundation
Assembly: EPiServer.WorkflowFoundation.dll
Version: 7.19.2
Syntax
public static class WorkflowCompiler
Remarks

Before xoml based workflows can be registered the account aspnet is running as must have read/write accessto the BinDirectory specified

Fields

DllPrefix

Prefix for all generated xoml assemblies. Value is "Workflow"

Declaration
public const string DllPrefix = "Workflow"
Field Value
Type Description
System.String

Properties

BinDirectory

Directory where compiled assemblies for xoml based workflows is placed. Default is siteroot/workflowfoundation/bin

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

The bin directory for xoml based workflows

Remarks

The reason to not put them in bin directory for site is to avoid to get AppDomain reloaded

Methods

CompileWorkflow(String, String, String, String, out CompilerErrorCollection)

Compiles a Workflow to assembly from xoml, rules and cs

Declaration
public static Type CompileWorkflow(string assemblyName, string xoml, string rules, string cs, out CompilerErrorCollection errors)
Parameters
Type Name Description
System.String assemblyName

name of the compiled assembly

System.String xoml

xoml

System.String rules

rules

System.String cs

cs

System.CodeDom.Compiler.CompilerErrorCollection errors

The errors from compilation

Returns
Type Description
System.Type

Compiled type

Remarks

The compiled assembly will be created in directory specified by BinDirectory so it can be loaded by runtime

TestCompileWorkflow(String, String, String, out CompilerErrorCollection)

Test compiles a Workflow

Declaration
public static bool TestCompileWorkflow(string xoml, string rules, string cs, out CompilerErrorCollection errors)
Parameters
Type Name Description
System.String xoml

xoml

System.String rules

rules

System.String cs

cs

System.CodeDom.Compiler.CompilerErrorCollection errors

compilation errors

Returns
Type Description
System.Boolean

compilation success

Remarks

Makes an in-memory compilation of the workflow