V11 SP8
Loading...

Workflow Configuration - Configure Workflow Properties

Table of Contents

Overview

Workflow properties can be set when the Workflow is created or edited. These properties can be found in the Workflow Properties pane, located at the bottom of your Workflow editor window. To see the Workflow Properties pane, click the white space in the Workflow editor window.

Setting General Properties

  1. From the Workflow window, go to the Workflow Properties pane.

  2. On the General tab, in the Value column for the Name property, type the Workflow name.
  3. In the Value column for the Description property, type the purpose of the Workflow.
  4. If the Workflow requires user input during execution, in the Value column, set the Start Interactive Session property to True.
  5. In the Value column for the Mode property, select one of the following:
    • Job - Assigns a job ID to the Workflow when it is run. You can see the Workflow in the Job Controller and Workflow Job History windows. If services are restarted, the Workflow will automatically restart.
    • API - Runs the Workflow completely in memory (no job ID is assigned). Because API Workflows run completely in memory, they run faster than Workflows run as jobs. REST APIs that run Workflows as APIs are available: Executing a Workflow as an API (POST) and Executing a Workflow as an API (GET).
  6. If this is a business logic workflow, set the following properties:
    • In the Value column for the Message Name property, type the top-level element for the XML message you want to connect to the workflow.

      For example, to connect the workflow to the XML message used to create a user, type App_CreateUserRequest.

    • In the Value column for the Execute When property, select one of the following:
      • Request - Runs the workflow when the XML message is sent to the server.
      • Response - Runs the workflow when the XML message is returned by the server.

    For information on business logic workflows, see Creating a Business Logic Workflow.

Viewing the System Variables

  1. From the Workflow window, go to the Workflow Properties pane.

  2. Click the System tab.

    You can see all the system variables defined (by default) for the Workflow.

Defining Workflow Inputs

The Workflow inputs you define are the inputs the user will be prompted to enter during workflow execution. If you have inputs that apply to the workflow the majority of the time it is run, consider using configuration values instead of inputs. For information on configuration values, see Setting Configuration Values.

You can define the following types of input:

  • string
  • integer
  • boolean
  • date/Time
  • double
  • float
  • long
  • short
  • XML
  • Binary
  • <Other>, such as pre-defined CommCell entity types (for example, ClientEntity)

The sections below describe the steps to add a workflow input using a string and an <other> input type as examples.

Add a String Type Input

  1. From the Workflow window, go to the Workflow Properties pane.

  2. On the Inputs tab, click Add.
  3. In the Variable Name box, enter the name of the string input, for example, email_ID.
  4. From the Variable Type list, select string.
  5. If you want to define more than one value for this input, keep the Create as list check box selected to store all values in a list.
  6. Click OK.

Add an <Other> Type Input

The following steps create an input that will recognize client groups in the CommCell:

  1. From the Workflow window, go to the Workflow Properties pane.

  2. On the Inputs tab, click Add.
  3. In the Variable Name box, specify a name for the client group variable.
  4. From the Variable Type list, select <Other ...>.
  5. From the Select Type dialog box, select ClientGroupEntity and click OK.
  6. If you want to define more than one value for this input, keep the Create as list check box selected to store all values in a list.
  7. Click OK.

Customizing Workflow Inputs

When workflows are executed in the CommCell or used in the Web Console as forms, the input screen can be customized to make it easier for users to enter data. For example, you can mark a field as required.

Procedure

  1. From the properties pane, click the Inputs tab and click Customize.

    The properties dialog box is displayed.

  2. From the left pane of the Inputs tab, select the input to customize.

    The right pane displays the options for the selected input.

  3. By default, the Type list shows the input type defined when the input was added. It can be changed by selecting a new value from the Type list.
  4. Enter a name in the Display Name box.

    This is the name users see when prompted to enter the input value during workflow execution. If a name is not entered, the input variable name is used.

  5. Enter a value in the Default box.

    The default value prepopulates the input field during workflow execution. If a default value is not set, the input field is blank.

    Note:

    • The default value for boolean input types must be entered as either true or false.
    • If values are added to the Possible Values box, only those values may be used for the Default box.
  6. Select a value from the Control Type list to define how the input field appears to a user during workflow execution.

    The Control Type list changes depending on the input type:

    Type Control Type
    string TEXTBOX, MULTILINE, DROPDOWN, RADIOBUTTON, CHECKBOX
    integer, double, float, long, short TEXTBOX, DROPDOWN, RADIOBUTTON, CHECKBOX
    boolean CHECKBOX
    date CALENDAR, DROPDOWN, RADIOBUTTON, CHECKBOX
    dateTime DATETIME_PICKER, DROPDOWN, RADIOBUTTON, CHECKBOX
    time TIME_PICKER, DROPDOWN, RADIOBUTTON, CHECKBOX
    XML TEXTBOX, MULTILINE
    Binary FILE_PICKER, TEXTBOX

    For information on FILE_PICKER, see Customizing Inputs Using the FILE_PICKER Control Type.

    <Other> Changes depending on what is selected as the <Other> input type.
  7. Select Optional, Required, Read Only, or Hidden.
    • Required input fields are marked with an asterisk during workflow execution.
    • Mark an input field as Hidden when the input is passed in and users do not need to see it. For example, workflow inputs can be passed in when you use App Studio. For information about App Studio, see App Studio Overview.
  8. Enter values in the Possible Values box to define the data for the following control types:
    • DROPDOWN: The possible values are listed inside the drop-down box. Users are limited to these values during workflow execution.
    • RADIOBUTTON: The possible values are used as labels for the radio buttons.
    • CHECKBOX: The possible values are used as labels for the check boxes. During workflow execution, users can select multiple possible values if Create as list was selected when the input was first added. Users can select one of the possible values if Create as list was not selected.

  9. Click OK.

Validating Workflow Inputs

When workflows are used in the Web Console as forms, user interaction activities are added to the workflow so that data can be entered by users. The user data can be validated using JavaScript. For example, you can check the data for special characters. For information on workflow forms, see Running Workflows from the Web Console. For information on the activities used in workflow forms, see Activities - User Interaction.

When inputs are added to user interaction activities, you assign the input a name. When the workflow form is created and displayed in the Web Console, the input name becomes the HTML DOM ID property on the form and can be referenced by cascading style sheet (CSS) selectors or by JavaScript code.

Procedure

  1. For a user interaction activity that has user inputs, from the properties pane, on the Inputs tab, select the input, and click Customize.

    The properties dialog box is displayed.

  2. If you have style information for your input, on the Look and Feel tab, in the CSS box, enter code for your styles.

    Example: The following code sets the color for an input to blue:

    #input_name {
      color: blue;
    }

  3. On the Look and Feel tab, in the JavaScript box, enter code that validates the user input.

    Important: Reference your inputs by prefixing them with a number sign (#). For example, if your input is emailAddress, reference it as #emailAddress in your code.

    Example: The following code uses jQuery and checks for a valid email address by checking that an at sign (@) and a period (.) are present in the user input. This code also changes the text color when an incorrect email address is entered:

  4. Click OK.

Creating Workflow Variables

Variables allow you to hold a specific value type and use it anywhere in the workflow process. For example, you can insert a variable in an activity containing a message to indicate the resulting value of the variable.

The creation of variables is very similar to creation of inputs. However, in terms of usage, they differ: workflow variables are used internally in the Workflow and are never seen by the user during execution. Workflow inputs are exposed to the user during execution as they require a value provided by the user.

You can define the following types of variable:

  • string
  • integer
  • boolean
  • date/Time
  • double
  • float
  • long
  • short
  • XML
  • other, such as pre-defined CommCell entity types (for example, ClientEntity)

Use the following steps to add a variable:

  1. From the Workflow window, go to the Workflow Properties pane.

  2. On the Variables tab, click Add.
  3. In the Variable Name box, type the name of the variable.
  4. From the Variable Type list, select the type, for example, string.
  5. To store all processed values in a list, select the Create as list check box.
  6. Click OK.

Setting Configuration Values

You can enter configuration values to act as variables or to hold information users need to understand the workflow. After the configuration values are created, they are available in the workflow properties dialog box and can be edited there. Users are not prompted to change the values when the workflow is run.

Use configuration values instead of workflow inputs in the following cases:

  • Values apply to the workflow the majority of the time it is run
  • You do not want to redeploy the workflow when the values change (the workflow version is not updated)
  1. From the Workflow window, go to the Workflow Properties pane.

  2. On the Configuration tab, click Add.

    The Add workflow configuration dialog box appears.

  3. In the Variable Name box, type the name of the variable.
  4. From the Variable Type list, select the type, for example, string.
  5. To store all processed values in a list, select the Create as list check box.
  6. Click OK.

Setting an OnStart Script

You can execute a script written in Java or JavaScript at the beginning of the workflow execution. For example, you can specify a script to help you determine if the elements involved in the Workflow are ready before execution.

  1. From the Workflow window, go to the Workflow Properties pane.

  2. Click the OnStart Script tab.
  3. Enter the code to be used.

    Tip: Click Insert Variable to add a workflow variable as needed.

Setting an OnComplete Script

You can execute a script written in Java or JavaScript at the end of the workflow execution. For example, you can specify a script to check that a certain Workflow activity completed successfully.

  1. From the Workflow window, go to the Workflow Properties pane.

  2. Click the OnComplete Script tab.
  3. Enter the code to be used.

    Tip: Click Insert Variable to add a workflow variable as needed.