Documentation Center

Importing and declaring items in your Automatic Activity C# script or Activity expiration C# script

Automatic Workflow Activities and Activity expiration scripts are written in C# and interact with the Core Service. This topic describes how the API works that you work with in the Script Editor in Visio Workflow Designer.

Importing namespaces

To import classes, add the following directive in the Script Editor text field:

<%@Import Namespace="NAMESPACE"%>

where NAMESPACE is the name of the namespace you want to import. The classes must be present in the Global Assembly Cache.

Declaring methods, constants and classes
Enclose methods, constants and classes you want to use in the fragment between <!% and %> delimiters. (The item you declare may not contain the string '%>'.)
Referring to a system .NET assembly

To refer to a system .NET assembly, include the following directive:

<%@Assembly Name="System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"%>

where the value of the Name attribute specifies the assembly. The assembly you import must be in the Global Assembly Cache.