Entity Framework Question
Comments
-
[table][tr][td]* We have the Flow Execution Extension stored on DB
- We have a Setup Process Folder step that generates Keys in the Extension Data.
- I can see the UniqueProcessID on Processdata when doing Input Mapping
But I cannot see the "UniqueProcessID" on the DECISIONS DB Table that storing the FEE? Which table is this "UniqueProcessID" are stored at? And how does it ties to the Assignments on this ID? Where is the assignment stored? [/table]
-
The best way to get assignments related to a given F.E.E. is through their default relationships in the entity framework. In Decisions, all entities excluding simple data structures and types not stored in a database will have the following fields:
[ul][li]a primary key[/li][li]an entity_folder_id - this is the ID of its containing folder[/li][li]an extension_id - this is used for many scenarios, but for this case, it is used to directly relate process folders to a F.E.E., even if the F.E.E object has been moved out of its process folder[/li][/ul]
By default, a F.E.E. object is created inside of its process folder, meaning that its process folders folder_id value will match the objects entity_folder_id value and both the process folder and F.E.E. object will have the same extension_id. (Using the extension_id is slightly more reliable) Process folders will also contain all assignments, comments, documents, etc. related to the flow which created it. With this information, as long as we have the F.E.E. object (such as in input to a user action or even a JSON payload from an API call) we can use these standardized relationships to fetch all assignments related to the F.E.E. The following query would return all assignments related to a given F.E.E. object:[font=Roboto, Arial, Helvetica, sans-serif][b][i]select * from entity_assignment where entity_folder_id in (select ef.folder_id from [myflowexecutionextension] ext join entity_folder ef on ef.extension_id = [a specific extension_id])[/i][/b][/font]
[font=Roboto, Arial, Helvetica, sans-serif][b][i]
[/i][/b][/font]
Note: [myflowexecutionextension] should be replaced with the appropriate table name of your F.E.E. and [a specific extension_id] should be replaced with the extension_id of a F.E.E. object.To do this with regular steps in Decisions itself, you will need two Fetch Entities steps. The first would be configured to fetch Folders with the condition extension_id = [the extension_id of a F.E.E. object] with Show Outcome for One Result selected, and the second would be configured to fetch Assignments with the condition entity_folder_id = [the folder_id of the single result from the previous steps Result path].
Howdy, Stranger!
Categories
- 4.2K All Categories
- 67 General
- 11 Training
- 202 Installation / Setup
- 1.1K Flows
- 106 Rules
- 262 Administration
- 212 Portal
- 490 General Q & A
- 695 Forms
- 333 Reports
- 3 Designer Extensions
- 47 Example Flows
- 52 CSS Examples
- 1 Diagram Tile
- 7 Javascript Controls
- 179 Pages
- 5 Process Mining
- New Features
- 179 Datastructures
- 69 Repository
- 221 Integrations
- 28 Multi-Tenant
- 27 SDK
- 78 Modules
- 56 Settings
- 25 Active Directory
- 12 Version 7
- 35 Version 8
- 83 Lunch And Learn Questions