Create an Activity
This article will walk you through creating a new workflow activity for Geocortex Workflow Server.
Prerequisites
important
Extending Geocortex Workflow with server side components requires an on-premises installation of Geocortex Workflow. You will need administrative access to this installation.
Follow the instructions in the Geocortex Workflow Server page to set up your development environment and Geocortex Workflow Server extension project.
note
A working knowledge of C# and the .NET platform is recommended before extending Geocortex Workflow Server
Create the Activity
- Create a new file
CustomActivity.cs
in the root of your Geocortex Workflow Server extension project. - Add a new skeleton workflow activity that implements
IActivityHandler
.
Register the Activity with an Assembly Attribute
- Create a new file,
Properties\AssemblyInfo.cs
- Add the custom Geocortex Workflow attribute to
AssemblyInfo.cs
:
This registers the assembly to a namespace that Geocortex Workflow Server can discover.
note
By convention, assembly attributes are typically added to a file called "Properties\AssemblyInfo.cs"
, but they can be added to any code file.
Deploy the Activity
Follow the instructions to deploy Geocortex Workflow Server activities.
Use the Activity in a Workflow
Server workflows that run on your Geocortex Workflow Server deployment can now run this custom activity.
tip
Registering stubs for .NET activities provides a user friendly interface for your custom activities in Geocortex Workflow Designer.
You can run the custom activity by referencing it by action with the RunActivity
activity. The custom activity created in this article takes no inputs but produces an output with the property "test".
note
You can download this demo server workflow that runs the custom activity and import it into the Geocortex Workflow Designer.