Persist Shape Not working as expected

Hi All,

In the Flow, we used Persist Case smart shape which saves case instance to work table, and later in the flow we are saving data into few other table for instance say TABLE_B,

now when we trigger the flow to create case, TABLE_B has the new case record but Work table doesnt have the newly created case instance.

This happens once in a while ( less than 10 cases in a month),

I have verified the pxPersistCase activity its OOTB and no customization made, I also verified Logs to check if there is any exceptions but couldnot find any, so it would help me if I can get answers to

  1. What are the scenarios where Persist smart shape would not work/ not save data to work table

  2. How to Log/ Record the exception in case data is not saved to work table, after exiting persist case shape in the flow.

*More about the flow in attachment: start shape → Persist smart Shape → sub process to save data in other related tables → and so on

Thanks in advance

@suryavamshid

Save as the GenerateID activity to your application and add Debugger to print the ID being used and see if it exists in the system.

Next, enable Logger for activity pxPersistCase to Debug and see the difference in steps execution from the logs and look for any exceptions in logs.

Hi

Thanks karthik for the pointers.

In general assumption is persist case shape persists data into WORK table, but in actual work object persisting is happening when the flow reaches assignment shape.

In our scenario we observed that case jumps into final stage skipping all the intermediate stages, in the final stage before reaching assignment shape there is a utility which tries to do obj-open-by-handle, this step caused exception as the work record is not saved into table until this point, as an exception handling the flow takes end path, hence the work object is not saved into WORK table as it not reached any assignment shape.

so as part of solution we added an Utility just after Persist shape to Save (not commit) the Primary Page ( backend table is WORK table ), later in the flow when the utility tries to perform obj-open-by-handle it did not cause exception as record now present in deffered save WORK table, later flow advanced to reach assignment shape where OOTB commit happened to persist work object into WORK table.