Object not committing?

1
Hi all, I have an odd issue that I am trying to resolve.  We have a PlannedActivity entity, with other entities associated to it, one for each category of daily support records (hindsight has taught me that a generalisation may have been for this but we are always learning… Categories of PlannedActivity could be Food, Correspondence, GeneralActivity plus many others.  Using GeneralActivity as an example, when the user creates one of these records, it creates the PlannedActivity entity, then the GeneralActivity entity but does not commit either of them, it displays them in a form which the user completes and fills out. They click save and then both records are committed, also on the save microflow, if required, it generates a notification to some users.  part of the GeneralActivity save microflow:   Notification microflow.   In this microflow, it creates a “CoreNotification” object, which has an after commit action which will retrieve the users required and create a “UserNotification” object for each as they individually need to mark that they have read the notification. The issue I am having is that in some cases when a user clicks on a notification, the PlannedActivity entity does not exist it’s empty. I have searched the database and cannot see it. However a notification has been created for it, which is done in the same microflow the notification object is created, so in theory, it should not happen.  Every test I have completed saves each entity correctly, I am unable to replicate the problem.    Troubleshooting steps:  – I have completed a “Find usages in actions” search for all instances of PlannedActivity being deleted or rolled back, (we do not allow users to delete records). I have added an audit log of this and none of the reported cases has an entry for being deleted or rolled back. - I have added the Activity Category to the Core Notification to see if it’s specific categories that are getting this issue, that’s going live soon.  Does the order in which the PlannedActivity, General Activity and SUB_PlannedActivityNotification are committed/executed? Does anyone have any thoughts on what could be causing this? It’s strange that the notification is in the database but the corresponding PlannedActivity is not, when they are committed in the same microflow.  This may mean that the planned activity is being deleted somewhere else, but I can't find any evidence to suggest this is happening.    
asked
1 answers
1

Garion,

I have a couple of thoughts:

  • have you checked security access rules for each entity to see if you’re running into an issue there?
  • if, at some point, one of the microflows ends with an error and you don’t have error handling defined (or you have error handling with rollback) it could be that in some instances the created objects are removed as part of the rollback of the transaction created for all of the microflow activities.

Maybe one of those will help you pinpoint the issue.

Mike

answered