Synced record Types and referential integrity

Certified Senior Developer

Hi Gurus,

The Appian documentation (https://docs.appian.com/suite/help/22.4/record-type-relationships.html )states:

If you use a process model to delete a Customer from the database table, any Orders referencing that Customer would have an invalid foreign key. Therefore, the database will either cause the delete operation to fail and nothing will be deleted, or it will delete both the Customer and all Orders associated with that Customer. If the delete operation fails, no sync is needed because data has not changed. If it succeeds, Appian will immediately sync the deletions from both record types.

We defined a one to many relationship in the record type and a cascading delete in the database (mariadb) however data in the Orders table is not synced, do I miss something here? Btw not having a cascading delete in the database leaves the Orders records orphaned.

Any ideas?

  Discussion posts and replies are publicly visible

Parents
  • I agree with the recommended approach by Mike utilizing soft-deletes. 
    But maybe in your case it might be a time issue as mentioned in the documentation:

    "If you enforce referential integrity on the sources of your related record types, it's recommended to keep these record types on a similar sync schedule. This way, you can be sure that your foreign key relationships are consistently reflected in the synced data, and any changes to the data as a result of referential integrity are synced at the same time."

    On the other hand, if you are looking more for a sync in 'real-time'  you could trigger that in the process model after waiting for a second.

Reply
  • I agree with the recommended approach by Mike utilizing soft-deletes. 
    But maybe in your case it might be a time issue as mentioned in the documentation:

    "If you enforce referential integrity on the sources of your related record types, it's recommended to keep these record types on a similar sync schedule. This way, you can be sure that your foreign key relationships are consistently reflected in the synced data, and any changes to the data as a result of referential integrity are synced at the same time."

    On the other hand, if you are looking more for a sync in 'real-time'  you could trigger that in the process model after waiting for a second.

Children
No Data