Creating Entity Extension with a Form
  • Updated on 08 Sep 2015
  • 3 minutes to read
  • Print
  • Dark
    Light

Creating Entity Extension with a Form

  • Print
  • Dark
    Light

Overview

This tutorial demonstrates how to create and use Entity Extensions in Decisions . Any Entity type in Decisions may be ‘extended’ . Entity Extension creates a new type that is associated with Entity .

Example

In this example we are going to create an Entity Extension (Address) for the Entity (Person) . For this example we created a simple Person Entity that has First Name andLast Name properties.
entity-6.jpg

In the Designer Folder we click Datatypes/Integrations > User Defined Types > Entity Extension on Folder Actions Panel .
extension.jpg

In the resulting window we define Structure Name and properties. Also, we pick Extension For Type (entity type that we need to extend) . Click Ok to save Entity Extension .

ext.-2.jpg

System creates Entity Extension Data Structure and Configuration Folder for this structure. We navigate to the Configuration Folder of the Entity that we created Extension for (Person Configuration) .
config-person.jpg

In the Person Configuration Folder we click Entity Actions > Entity Action on Folder Actions Panel .
add-entity-action.jpg

Then we Name Action and select Create to proceed to the Flow Designer .
add-address.jpg

In the Flow Designer we add an Address Form Generated from Address Entity Extension data structure.
Note: to learn how to generate Form from a Data Structure, please click here .
Generate Data for a Form from the designer folder : Navigate to the designer folder and right click. 
2018-06-29_150624.jpg

Create-Form-data.jpg

In the Flow Designer we add an Address Form Generated from Address Entity Extension data structure.
address-form.jpg

Generated Address Form
VA-Beach.jpg

Then, we add Create Address step from My Integrations > User Defined Types > Entity Extensions > Address_Person category.
create-add.jpg

Next, we Edit Input Mappings for Create Address Step
create-address-step.jpg

Mention: to create Entity Extension we need to build extension data and entity object. This Flow is an Action for our Person Entity , therefore Person object data is available for us. First, we pick Build Data mapping type for Item To Create . Then, we map Entity data to Person input. Next, we pickBuild Data mapping type for Address property.
buildDataForAddress.png

We map output data from our Form to the Address fields. When finished, we can click Ok to save and close Mapping Editor .
mappingFinished.png

Back in the Flow Designer we locate the Add Address Flow. Navigate to Entity Extension and Person Configuration. Open the flow and connect outcome from Create Address step to the End Step . This completes our Flow . We can save it and close Flow Designer.

new-flow-ho.jpg

We fill out a Form and click Ok to save Entity Extension.
VA-Beach1.jpg

For this example we create a Person Entity…
Charlie-Bucket.jpg

Then, we locate our Person and click Add Address action that we created previously in this tutorial.
user-action.jpg

Finally, we are going to create a simple Flow to use Address Entity Extension . In the Flow Designer we use Get All Address step from Integrations > My Integrations > User Defined Types > Entity Extensions > Address_Person category.

get-all.jpg

Next, we connect the Outcome from Get All Address step to the End Step . This completes our Flow . We click Debug Flow on the top panel of the Flow Designer .
get-all-flow.jpg

Our Flow executes and Get All Address outputs our Entity Extension . We can see Address data and Person data that this Address extends. Note : Entity data is not stored in Entity Extension database table. System creates a relation between Entity table and its Extension.
stepOutput.png

Was this article helpful?