Create an Activity
This article will walk you through creating a new workflow activity for Geocortex Mobile applications.
Prerequisites
important
Extending Geocortex Workflow for Mobile requires development and deployment of a custom Geocortex Mobile Application using the Geocortex Mobile SDK
Follow the instructions in the Geocortex Mobile SDK page to set up the environment for extending Workflow for Geocortex Mobile.
note
A working knowledge of C# and the .NET platform is recommended before extending Workflow for Geocortex Mobile
Create the Activity
- Create a new file
CustomActivity.cs
in the platform agnostic project of the Geocortex Mobile Quickstart. - Add a new skeleton workflow activity that implements
IActivityHandler
.
IActivityHandlerFactory
Register the Activity with the - Create a new file,
ActivityLoader.cs
in the platform agnostic project of the Geocortex Mobile Quickstart. - Implement the
IActivityHandlerFactory
interface and register the activity skeleton we created in the constructor.
Use the Activity in a Workflow
Workflows that run in your custom Geocortex Mobile application 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.
The RunActivity
activity can be used to execute your activity by the name defined in CustomActivity.cs
(for this example, your:unique:namespace::CustomActivity
).
note
You can download this demo workflow that runs the custom activity and import it into the Geocortex Workflow Designer.
Next you need to run the workflow you just created in your Geocortex Mobile SDK project.
You can do this by configuring the layout and app config to run a workflow. You will need to copy the ID of the the workflow you created into the app.json
- App Config
- Layout
- UI
Next Steps
Calculate a Logarithm with a Custom Activity
Implement a custom activity that calculates the logarithm of a number
Implement a Custom Form Element
Implement a custom form element for applications like Geocortex Mobile
Add a Callout to the Map through a Custom Activity
Access the map in custom activities for Geocortex Mobile
Use the ArcGIS Runtime SDK for .NET in an activity.
Use the ArcGIS Runtime SDK for .NET in an activity or form element