Flow steps and rule steps (simple) default parameters and custom editors
  • Updated on 11 Dec 2013
  • 1 minute to read
  • Print
  • Dark
    Light

Flow steps and rule steps (simple) default parameters and custom editors

  • Print
  • Dark
    Light

Summary
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

Example
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. 

![simpleDefaultInputs-243x300.png](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/simpleDefaultInputs-243x300.png){height ="300" width="243"}


Custom editors can also be supplied on property values in the same manner.

public static void CreateUserAdvanced(
string ouPath,
string loginName,
[PasswordText]
string userPassword,
string email,
string firstName,
string lastName,
string department,
[PropertyClassification(0, INPUT_NAME_SYSTEM_USER_NAME, PROPERTY_NODE_ROOT, PROPERTY_NODE_LDAP_SETTINGS)]
string systemUserName,
[PasswordText]
[PropertyClassification(1, INPUT_NAME_SYSTEM_PASSWORD, PROPERTY_NODE_ROOT, PROPERTY_NODE_LDAP_SETTINGS)]
string systemPassword,
[PropertyClassification(2, INPUT_NAME_LDAP_SERVER_ADDRESS, PROPERTY_NODE_ROOT, PROPERTY_NODE_LDAP_SETTINGS)]
string ldapServerAddress)




Was this article helpful?