Flow Steps (Simple)

Last Updated: 06/18/2018 Introduced in Version: 2.0

Summary

You can easily create new steps to be used in Decisions by creating public static methods in a class file project. This article will show you how to accomplish this.
 
*Note custom codes are located here: C:\Program Files\Decisions\Decisions Services Manager\Instances\Control\CustomReferences
 
Example
In this example Visual Studio 2017 is being used. Create a new Class Library project in Visual Studio. To add the Decisions SDK, in the Project Solution window, right click your project and go to Manage NuGet Packages. Under the browse tab search for DecisionsSDK
 
downloaddecisionssdk
 
 
Decorate your class with the following attribute: [AutoRegisterMethodsOnClass(true, "Sample Category", "Example Steps from Class File", RegisterForAgents = true)] 
 
Create a public static method in your class that will represent what process will take place. This method will become a step in Decisions. The name of your method will be the name of your step. Also the inputs and outputs of your method will become the inputs and outputs of your step. See the following code for two example methods that we will use to create steps inside of Decisions.

 After you have written your methods build your project. To add your project to Decisions, follow the steps here: Deploying server side extensions

 
After using the above steps to deploy your code, log into the Decisions portal and create a new flow. You will now see the methods from your class in the Steps Toolbox.
 
createdsteps
 
Add the Add Two Numbers step into the flow. Connect the start and end steps and add input data to your start step.
 
inputdatestartstep
 
Once the Start Step input data is mapped to the Add Two Numbers step, click the Debug Flow button.
 
debugflow
 
Provide the debugger with input data and click the Run button.
 
rundebugger
 
On the output of the Add Two Numbers step you will see that the two numbers provided as inputs are added together.
 
stepoutput

Additional Resources