CDT vs Record Type


I am very new to Appian and i am going through some of the courses, which i think are very helpful.

I am reading and learning about CDT and Record Type. They look similar to me but i am sure there is something that i am missing. When would you use one vs another (example)? Appreciate your help and comments as i navigate and learn Appian.

Thank you!

  Discussion posts and replies are publicly visible

  • A CDT is just a data structure which can be used in various places in applications. Examples are: customer data, invoice data, request data

    A record type is the connector for data, UI and processes and typically reflects the main business objects. Examples are similar to above, but are not just the data structure, but the data itself including UI representation and processes acting on that data.

    1. CDTs. All data in the world of programming needs to be "typed". You have "primitive" types (String, Boolean, Integer etc) that cannot be decomposed into anything smaller. And then you have "complex" types which are assemblies of primitive and/or other complex types. An "Address" might be a complex type, made up of, say, 4 lines of the address, a zip code and a country, all of which can be of a string type. You can use CDTs to map to database entities (tables, views). Note: not all CDTs HAVE to map to database entities. You can have a CDT in your application layer that is juts used locally to hold a set of related data for the purposes of processing locally.
    2. Records. I think of these as "entry points for processing". This is where you can surface you key business entities for the purposes of conducting some form of processing against them. Records can have different sources of data. They can be mapped directly to a database entity, or be sourced from a "service"; or can be sourced from in-flight process instances in Appian I've never seen this last one used but I include it for completeness). Most commonly they are database entity-backed. Note that not all of you entities needs to be surfaced as records. Consider which make most sense to surface for the purposes of finding something and then launching a process against that entity.
  • The other explanations are great, but I also have a quick rule of thumb:

    • Use a record type when viewing / displaying data
    • Use a CDT when editing / inserting data