Content Extended Operations example 3: Create a document, folder, or custom object

To create a document

The following steps create a document, complete with content and properties. The content must be specified as a string. Almost any data with a text/* MIME type is possible: for example, text/plain, text/html, text/xml. The object is filed into the specified folder.

NOTE  Content Extended Operations are available for the Component step only.

  1. Select the Component step to bring up the Properties pane.
  2. On the Properties pane, click Add in the Operations section.
  3. Click createDocument to create a new document.
  4. Specify the following expression values in the Operation Parameters section:
  5. {"DocumentTitle", "STRING", "New Expense Report",
    "FirstName", "STRING", fName,
    "LastName", "STRING", IName}

    When specifying a value for a non-string property, you must convert the value to a string in order to place it within the array. For example:

    {"DocumentTitle", "STRING", "New Loan Application",
    "LoanAmount", "DOUBLE", numbertostring(loanAmt),
    "AppDate", "DATETIME", timetostring(appDate)
    "SpecialLoan", "BOOLEAN", convert(spclLoan, string)}

    You cannot modify multi-valued properties using a properties array. To modify multi-valued
    properties, you must use the setMulti<type>Property operations.

    The following table describes the possible data types, as well as which function you should use for converting each type to a string.

    Data Type Conversion function
    BOOLEAN convert(bool_value, string)
    DATETIME timetostring(time_value)
    DOUBLE numbertostring(float_value)
    INTEGER numbertostring(int_value)
    OBJECT convert(attachment, string)

    createDocument example

  6. After specifying the parameters, click OK.

To create a folder

The following steps create a folder, either at the root of the object store or as a child of an attached folder.

  1. Select the Component step to bring up the Properties pane.
  2. On the Properties pane, click Add in the Operations section.
  3. Click createFolder to create a new folder.
  4. Specify the following expression values in the Operation Parameters section:
  5. For the specified document property, you must create three elements within the array: the document's symbolic name, data type and value. An example:

    {"FolderName", "STRING", "Foo"}

  6. After specifying the parameters, click OK.

To create a custom object

The following steps create a custom object using a specified class, and property values. The object is filed into the specified folder.

  1. Select the Component step to bring up the Properties pane.
  2. On the Properties pane, click Add in the Operations section.
  3. Click createCustomObject to create a new custom object.
  4. Specify the following expression values in the Operation Parameters section:
  5. After specifying the parameters, click OK.