Flow steps and rule steps (simple) : default parameters and custom editorsLast Updated: 06/18/2018 Introduced in Version: 2.0
When creating simple decisions steps by registering public methods, you may also set default values for the inputs of those methods. This allows Designers to still change these input values, but populates the inputs with default values when the step is first used.
*Note custom codes are located here: C:\Program Files\Decisions\Decisions Services Manager\Instances\Control\CustomReferences
If you were writing a step to upload a file to an FTP server and wanted the FTP server address and port populated by default you would create options paramenters for those two inputs. Your method would look something like this:
public void FtpUpload(string username, string password, string serverAddress = "myftpserver.com", int serverPort = 21)
//upload files to ftp site
When Designers first place this step in a flow, the serverAddress and serverPort inputs will be populated as shown below.
Custom editors can also be supplied on property values in the same manner.
public static void CreateUserAdvanced(
[PropertyClassification(0, INPUT_NAME_SYSTEM_USER_NAME, PROPERTY_NODE_ROOT, PROPERTY_NODE_LDAP_SETTINGS)]
[PropertyClassification(1, INPUT_NAME_SYSTEM_PASSWORD, PROPERTY_NODE_ROOT, PROPERTY_NODE_LDAP_SETTINGS)]
[PropertyClassification(2, INPUT_NAME_LDAP_SERVER_ADDRESS, PROPERTY_NODE_ROOT, PROPERTY_NODE_LDAP_SETTINGS)]