Mapping a Complex Object
  • Updated on 05 Mar 2019
  • 2 minutes to read
  • Print
  • Dark
    Light

Mapping a Complex Object

  • Print
  • Dark
    Light

Use theMapping Editor to create a complex object from multiple step inputs. For example, map the output of data entered in form fields to the inputs of an internal service to transform user-entered information into a Knowledge Base article.
To map a complex object within the Mapping Editor , drag the anchors for selected outputs to the inputs which should be populated with that data.

Example

2017-12-29_104305-1.png

Our example flow will create an Article object based on information collected from a form. The example assumes the Add Article Form already exists. It simply contains two input fields, one Text Box and one RichText field, and a Submit button.
1.png

Begin by navigating to a Designer Folder and selecting the Create Flow button. Give the new flow a name, for example, "Create KB Article," and click OK .

Begin building the flow by adding the step that displays our form - [Form] Add Article Form .
In the Flow Designer's startup window, in the categoryFlows, Rules, Forms and Reports > Forms [Interaction] > [Current Folder] , select an Add Article Form component and click Add to add it to the workspace.

2017-12-29_104444-1.png

Our next step will transform the output of**[Form] Add Article Form** into an Article object that can be saved in the database. To do this, add the Add Article component.
In the Toolbox panel, in the categoryIntegration > Internal Services > KnowledgeBaseService , select an AddArticle component and drag it to the workspace. Connect the outcome paths in the flow.
2017-12-29_104606-1.png

2.png

To map the inputs which will create the Article object, double-click  Add Article step and selectEdit Input Mapping .
2017-12-29_104748-1.png

Our Article object has three properties: the folder containing the entity, the title, and the description. Because the folder containing the entity is not provided by our form, enter it manually by changing the mapping type of entityFolderId to Constant . . .
2017-12-29_104838-1.png

. . . and giving it the value: "SYSTEM/KNOWLEDGE BASE."
Our Article object's remaining properties will be created from the output of [Form] Add Article Form . To map these outputs, drag the anchor from each output to the field that will receive it as input.
2017-12-29_104946-1.png

This completes the mapping for our Account object. ClickOK to save this mapping and close the Mapping Editor .
This completes our flow, so save it and run it in the Debugger.
Note that in Decisions version 3.5 and above, you’ll need to click on Debug Flow to access the Debugger.
2017-12-29_115256.png

The flow runs, opening the Add Article form. Complete the fields and click Add Article .
2017-12-29_115712.png

The information entered into this form is sent  to the Add Article step, which will, in turn, create an Article object
We click the FLOW tab to view the flow's execution.
2017-12-29_115731.png

To verify that the article is added, return to the portal and select the Knowledge Base folder, where the article displays.
2017-12-29_120000.png

Was this article helpful?