Form forwarding

Hi all,

I had a few questions about how the new (to me) data integration features
work. Relevant documentation:

https://confluence.dimagi.com/display/commcarepublic/Enabling+Data+Integration

I am trying to understand the expected use case and what happens in the
event of a failure in order to see if this is something I can/should adopt
in my workflow.

  • What happens in the event of failure? (e.g., network issues, or my server
    is down etc..) Does CCHQ continue to try to send the form? At some point I
    assume it gives up. Does it maintain a list of forms where forwarding
    failed?

  • Is the expected use case:

  • Completely replace form fetching via export API. That is, the
    token/export system is no longer necessary.

  • Used in conjunction with fetching via the export API. This makes a lot of
    sense with the Form Stub forwarding. That is, receive a form stub, then
    fetch forms with the latest token to ensure no forms are missed.

  • Completely separate from the export API. This is meant as a non-bullet
    proof alert system. That is, if it works and and forms are successfully
    forwarded, great. If not, that's ok because the export API should be run in
    the background on a regular basis as a catch-all.

Just trying to get a little bit better sense of how these things should
work. Apologies if I missed something in the docs.

Thanks,
Brian

  • What happens in the event of failure? (e.g., network issues, or my
    server is down etc..) Does CCHQ continue to try to send the form? At some
    point I assume it gives up. Does it maintain a list of forms where
    forwarding failed?

CommCare HQ will try again 30 minutes later, and then at less and less
frequent intervals. That means that if your endpoint is down, forms could
come back out of order. We do not currently expose a list of forms that
have so far failed to send, however.

  • Is the expected use case:
  • Completely replace form fetching via export API. That is, the
    token/export system is no longer necessary.

  • Used in conjunction with fetching via the export API. This makes a lot
    of sense with the Form Stub forwarding. That is, receive a form stub, then
    fetch forms with the latest token to ensure no forms are missed.

  • Completely separate from the export API. This is meant as a non-bullet
    proof alert system. That is, if it works and and forms are successfully
    forwarded, great. If not, that's ok because the export API should be run in
    the background on a regular basis as a catch-all.

It's meant as an alternative to the export APIs but can also be used in
conjunction with them. For example, some people use the form stub
forwarding to just get the form_id, and then immediately make a request to
the form api[1] and/or the case api[2].

Cheers,
Danny

[1] Form Data - CommCare Public - CommCare Public
[2] Case Data - CommCare Public - CommCare Public