Should I always convert my entity to a Flow Structure when presenting it on a form?

Hi,

Generally I like the idea of separating my dataobject (entity) from my presentation of it (forms), such that a form can manipulate a representation of the data before committing it to the database.

One recommendation I've adapted is to make converter flows every time I present the data in a form, to convert the data type into a Flow Structure. This requires me to have a "From Entity To FS" and a "From FS To Entity" flow for each datatype I want to manipulate through a form.

My understanding is that if my forms directly input my entity instead of a FS, this can affect the performance of the lock-mechanisms for the entity. Am I wrong in this understanding?

Doesn't the "Get by Id" flowstep just return an editable "snapshot" of the data from the database? Wouldn't that suffice, instead of going through the design of several converter flows,?

Let me know your thoughts on this :)

Comments

  • Thanks for posting to the Decisions forum!

    Your understanding of using converter flows to separate data objects from their presentation in forms is generally correct. This approach can help manage data manipulation without directly affecting the database entity, which can be beneficial for performance and data integrity.

    Regarding the "Get by Id" flow step, it retrieves a snapshot of the data from the database, allowing you to work with this data without immediately locking the entity. This can be sufficient for many scenarios, as it provides a way to manipulate data without directly interacting with the database entity. However, if your operations require frequent updates or complex manipulations, using a Flow Structure (FS) might still be beneficial to avoid potential locking issues and to maintain a clear separation between data manipulation and data persistence.

    Here are some links to our documentation you may find useful.

    Get All Steps In Flow

    https://documentation.decisions.com/step-library/docs/get-all-steps-in-flow

    Creating Flow Structures

    https://documentation.decisions.com/docs/creating-flow-structures?#overview

    Creating Case Entities

    https://documentation.decisions.com/docs/creating-a-case-entity-data-structure#overview

    Thank you again for reaching out to us!

    Best regards,

    Andrew | Decisions Support

Sign In or Register to comment.