C# Script Activity

Description:

Executes a C# script.

Inheritance Hierarchy:

System.Object
  System.Activities.Activity
    System.Activities.CodeActivity
      Geocortex.Workflow.Activities.CSharpScript

Function:

This activity allows you to include a block of C# code in your workflow.

In a Workflow:

You would use this activity to execute a C# code block on the server. This may be useful in cases where it is simpler to write a few lines of code than it is to assemble a complex series of activities that perform the same function.

This is a server side activity. Since the script executes on the server it does not have access to the client-side object model.

The script is compiled each time this activity executes. Therefore this activity is less efficient that a precompiled activity containing the same logic. This activity should be used sparingly. It is not intended to replace compiled activities.

Properties:

Name Description

In/Out Arguments

Parameters

The parameters of the C# script. Use parameters to make workflow variables available inside the script.

When you configure the Parameters property, Workflow Designer opens a pop-up dialog where you enter the list of parameters. The parameters must agree with the script's parameters in name and type.

Parameter values must be serializable.

Misc

Display Name

CSharpScript

You can change the name of an activity to one that describes what it does. A descriptive name can make a workflow easier to interpret and maintain.

Script

The C# script to execute. The script will be compiled when the activity executes. If the script contains compilation errors the activity will throw an exception.

Version Information:

Supported from: Geocortex Essentials 3.11.

© 2019 Latitude Geographics Group Ltd. All Rights Reserved.

Documentation Version 4.11