Assert Is True Activity

Description:

Asserts that a condition is true. If the condition evaluates to false the activity throws an InvalidOperationException.

Inheritance Hierarchy:

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

Function:

This activity provides a mechanism to check that a specific condition is true and to fail if it is not.

In a Workflow:

This activity provides a convenient mechanism to verify assumptions in your workflow that must be true. If an assumption is false the workflow should fail. Typically failures would represent misconfiguration of the workflow or missing resources that your workflow depends. For example, if your workflow depends on the presence of a particular layer, but that layer cannot be found the workflow cannot continue. This activity lets you validate that the layer exists and provide helpful failure messages to end users and administrators.

This activity is functionally equivalent to an If activity with an empty Else branch and a Then branch that contains Log and Throw activities.

Properties:

Name Description

In Arguments

Condition

The condition to evaluate.

If the condition evaluates to false the activity throws a System.InvalidOperationException.

Friendly Message

A message to present to the end user.

Log Message

A message to write to the system log.

Misc

Display Name

AssertIsTrue

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.

Version Information:

Supported from: Geocortex Essentials 4.0.