- 03 Jun 2022
- 3 Minutes to read
- Print
- DarkLight
External Entities
- Updated on 03 Jun 2022
- 3 Minutes to read
- Print
- DarkLight
Overview
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 basic 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.
Example
- From a Designer Folder, select CREATE DATATYPES/INTEGRATION (bottom action bar), then 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.
- Name: ProductName (String) and ProductNumber (String).
- After the External Entity is created, a list of Flows that do specific actions appear in the Configuration Folder.
- There are six flows that need to be built in order to perform the corresponding actions, as follows: Delete, Fetch All, Fetch, Get ID, Save, and Search. These Flows are built for example purposes only and are not specific to every External Entity.
Delete
Steps:
- Delete from 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 Entity> Product Number.
Get All
Steps
- Get all from dbo.ProductData
- List Mapping Step
Configure the steps:
- In the Inputs section of the Get all From dbo.ProductData step, set the Limit count to Ignore.
- In the Outputs section of the Get All From dbo.ProductData Step, expand Done and set Product Data_Result to Rename.
- Then specify a corresponding result name (ex: ProductData_Result).
- On the List Mapping Step, in the Inputs section, set the INPUTS to Select From Flow.
- Pick the previously renamed result (ProductData_Result).
- 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, then Pick OUTPUTS.
Fetch
Steps
- Get by Id from dbo.ProductData
Configure the Steps
- On the Get by Id from dbo.ProdcutData step, under Inputs, next to Product Number, choose Select From Flow and then pick ID.
End Step
- In the Inputs section, set Entity to Build Data.
- Map the input data.
- In this example, set Product Name to Select From Flow and pick dbo.ProductData_Result.ProductName.
- Set Product Number to Select From Flow and pick dbo.ProductData_Result.ProductNumber.
Get ID
Configure
- In the Data section of the End step, click Show Editor beneath Output.
- Add an Output for Id (string).
- In the Inputs section, set Id to Select From Flow and Pick Product Number.
Save
Steps
- Selective Update dbo.ProductData
Configure the Steps
- On the Selective Update dbo.ProductData, under the Data section, set ProductName to Select From Flow and Pick Entity>ProductName.
Search
Configure
- In the Data section of the End step, under Output, there will be an output name called Entities([]). Map the data from the Flow to the Entity.
- Under the Inputs section, set Entities to 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 Panel, locate the steps by navigating to Integration > User-Defined Types > External Entities.
- Each step can 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.
- Enabling User Actions
There are a couple of steps that need to be performed to enable user actions on External Entities:
- Have a report created that has its data sourced from the Integrated Database Table.
- Once that has been done, configure the following properties under the 'Actions' category in the Report Designer.
Override Action Context Action Context TypeThe Composite Type that User Actions will be applied to.Action Context Id FieldThe Data Field users right-click to. - Once the Override Action Context is checked, Action Context Type declared, and the Action Context ID Field has been configured, users will have right clickable actions on External Entities.
- Define the External Entity, give the Structure Type a Name and add desired data names.