In this article, you will learn how to create a custom activity that calculates the logarithm of a number with a given base.
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.
Set up the Activity Skeleton
- Create a new file
CalculateLog.csin the platform agnostic project of the Geocortex Mobile Quickstart.
- Add a new skeleton workflow activity that implements
Register the Activity with the
- Create a new file,
ActivityLoader.csin the platform agnostic project of the Geocortex Mobile Quickstart.
- Implement the
IActivityHandlerFactoryinterface and register the activity skeleton we created in the constructor.
Learn more about activity registration in the activity reference.
Implement the Custom Activity
We now have a empty activity that Geocortex Mobile can use that takes no inputs and produces no outputs. By changing the inputs, outputs, and execute logic, you can create your own custom activity that calculates the logarithm of a number.
First, let's change the execute logic to parse inputs that make sense for a logarithm activity.
Next, modify the
Execute method of the activity to calculate the logarithm of a number given an optional base
Test your Activity
Now you can build a workflow for Geocortex Mobile that uses your new activity!
If you want your custom activity to show up with a friendly user interface in Geocortex Workflow Designer, check out Registering .NET Activities with Geocortex Workflow Designer.
RunActivity activity can be used to execute your activity by the name defined in
CalculateLog.cs (for this example,
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
Relevant SDK Sample
Check out the relevant Geocortex Mobile SDK Sample:
Now you know how to build a basic Workflow activity for Geocortex Mobile. Next, you can learn how to access app properties in an activity, build custom form elements, use the ArcGIS Runtime SDK for .NET in your activities and more.
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
Reference other Third Party Libraries
Reference other third party libraries in your activities and form elements