Creating a document instance


After you define the schema for a document and create a document definition to access individual attributes within the metadata object and use these attributes in an expression within a process, you can create a document instance. For more information about creating a document definition, see Defining-a-document-schema. A document instance is the data created by the application for which the structure is specified by the document definition.

You can create a document instance by using the Create Document element in the Process designer.

For example, you define the following document to get the error details from a third-party application.

Example:

{
"error code": "",
"error message": "",
"Issue area":""
}

The following images show the document instances created for the document definition:

22_1_Document instance.png

Before you begin

Make sure that you have created a document definition. For more information, see Defining-a-document-schema.

To create a document instance

  1. Log in to BMC Helix Innovation Studio. 
  2. From the Workspace tab, navigate to the application for which you want to create a document instance. 
  3. Perform one of the following tasks:
    • If you want to create a new process and add the Create Document element to the process, select Processes > New
    • If you want to add the Create Document element to an existing process, click the Processes tab and select the name of process.
  4. From the Palette, drag the Create Document element on to the canvas according to the process requirements.
  5. In the Element Properties pane, enter the properties for the Create Document element, as described in the following table:

    Property

    Description

    GENERAL

    Label

    Enter a suitable name for the element.

    Description

    Enter details about the element.

    INPUT MAP

    Document Definition Name

    Select the document definition that you want to use for this process.

    Add/Remove Document Nodes

    Select the attributes from the document definition you selected. For each node that you select, click Click to build an expression, and add the value for each node.

    MULTI INSTANCE LOOP

    Loop Type

    Select Parallel or Sequential from the list.For information about Multi instance loop, see Creating-process-steps-or-activities.

  6. Click Save

The following image shows the element properties for the Create Document element:

22_1_Create document configuration.png


Where to go from here

Action

Reference

Access complex objects, array of objects, array of strings, and nested complex objects within the metadata object and use these objects as input or output to an expression within a process.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*