Rest service not triggered after updating a submission

Hello everyone, I have a rest service called when I submit a form for the first time. However, when I select one of the submission and make some changes, the Rest service is not called at all. I would expect my service to be called with the updated submission.
Is there anything I can change to make this work?

aside: the XLSForm function uuid does not work with a param in a calculated field is this correct?

Conversation continued:

@jnm:

To simply POST the whole thing again after editing should be a quick hack that you can apply to your instance if you need this urgently:

https://github.com/kobotoolbox/kobocat/blob/3de1e6396021c815c3c642b5fc9ac692effb2cf3/onadata/apps/viewer/models/parsed_instance.py#L339-L340

Try removing the and created condition.

To do this properly would be more involved; I think we’d have to:

  1. Add a new option for re-submitting edits in the KPI UI;

  2. Somehow communicate that option to KC so that KC knows whether to resubmit edits to KPI;

    • Or, have KC always resubmit edits to KPI, but have them somehow tagged as edits instead of new submissions. Then, KPI can decide whether to re-send them to the external server;
  3. Decide whether to use PUT or POST (or make it configurable?)

  4. Make sure duplicate submission IDs don’t cause a problem with KPI’s REST service logging;

  5. Be done and enjoy?

1 Like

I find that it is happening sporadically; there are edits which do actually trigger a REST call.

I actually filed this bug in KPI assuming it was happening there:
https://github.com/kobotoolbox/kpi/issues/2515

When it does go through, I see the “meta/deprecatedID” field for the replaced instance as I was expecting.