- Updated on 08 May 2019
- 4 minutes to read
An External Entity will take in data that is not stored in Decisions and create an object that is used in the same way an Internal Decisions object is used. This allows the object to be configured and actions to be built in the same way. After the Structure is configured a Configuration Folder is auto-generated. Inside the Configuration Folder , a list of Flows will display in the Designer View. Each Flow represents a different action that can be set up with a simple flow. The External Entity will work properly when each flow has been built. Each flow has been built to demonstrate how to complete the External Entity setup. Depending on how the External Entity is structured, the flows will be unique and may have other variations, depending on what is being configured.
From a designer Folder navigate to Create DataTypes/Integration located on the blue action panel across the bottom of the designer Folder and select User Defined Types/ Integration> External Entity and select Create
Define the External Entity, give the Structure Type a Name and add desired data names.
Structure Type Name: Name the data structure: ToolEntity
- ProductName (String)
- ProductNumber (String)
After the External Entity is created a list of flows that do specific actions appear in theConfiguration Folder. There are six flows that need to be build to perform the actions as follows;Delete, Fetch All, Fetch, Get ID, Save and Search. These Flows are build for example purposes only and are not specific to everyExternal Entity.
1. Example - Delete
- Delete from dbo.ProductData: Integration> Database> dbo.productData
Configure the Steps:
On the Delete From dbo.ProductData step, in the Environment section, check the Run In Defined Environment box. In the Inputs section next to Product Number choose Select From Flow and then Pick under Entity> Product Number.
2. Example - Fetch All
- Start Step
- Get all from dbo.ProductData: Integration> Database> dbo.productData
- List Mapping Step:
- End Step
Configure the steps:
On the Get all From dbo.ProductData Step in the Input section next to Limit count set to Ignore).
In theGet All Fro dbo.ProductData Step in the Inputs section next to Limit Count select Ignore. On the List Mapping Step in theInputs section next to Inputs choose Select From Flow.
On theEnd Step in the Data section underOutput, there will be an output name called Entity. Map the data from the flow to the Entity. Under theInputs section next to Entity choose Select From Flow and select OUTPUTS.
3. Example - Fetch
- Get by Id from dbo.ProductData: Integration> Database> dbo.productData
Configure the Steps
On theGet by Id from dbo.ProdcutData Step under Inputs next toProduct Number choose Select From Flow and then pick ID.
In theInputs section next to theEntity chooseBuild Data . Map the input data, in this example next to Product Name chooseSelect From Flow and pickdbo.ProductData_Result.ProductName . Next to theProduct Number choose Select From Flow and pickdbo.ProductData_Result.ProductNumber.
4. Example - Get ID
On the End Step under the Data section and under Output select Show Editor. Add an Output for Id (string). In the Inputs section next to Id choose Select From Flow and pick Product Number.
5. Example - Save
- Selective Update dbo.ProductData: Integration> Database> dbo.productData
Configure the Steps
On theSelective Update dbo.ProductData under theData section next toProductName chooseSelect From Flow and then pick from Entity>ProductName.
6. Example - Search
On the End Step in the Data section under Output, there will be an output name called Entity. Map the data from the flow to the Entity. Under the Inputs section next to Entity choose Select From Flow and select OUTPUTS .
After the Flows are configured for the External Entities Step, a Flow can be created and the Flows are now steps that can be found in the Flow designer. In the Steps Tab locate the Steps by navigating to, Integration> User Defined Types> External Entities. Each step can be now be dragged and dropped into the flow designer and used in a flow).
After the flows in the configuration folder are built, actions can also be added and used inside the Configuration Folder. For example create a User Action, Validation Rule, Entity Events, State Triggers, Action Visibility Rule and Create Reporting Data Flow .
This completes the example for setting up an External Entity.