I am using a Decision component to confirm if a record exists. If it does not exists, then an insert is done. If records does exists, then update. Works fine, except when two records for the same patient and reference ID process together in the Process Execution.
If I rerun each record separately then an insert is completed on the first record and then update on second. However, when processed together they provide two inserts.
Please note: I am using a Process Flow that processes each record individually. It is almost as if the commit on the SQL DB does not process prior to the second record processing.
I have also modified the Database Profile to identify which fields should be unique and which are mandatory.
Any recommendations are welcomed.