Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Headless mode not able to create autoqueries, calls timeout #35

Open
pbowen-oc opened this issue Apr 19, 2023 · 2 comments
Open

Headless mode not able to create autoqueries, calls timeout #35

pbowen-oc opened this issue Apr 19, 2023 · 2 comments
Assignees
Milestone

Comments

@pbowen-oc
Copy link

6.0.0.oc-5

Headless mode is able to open forms and save data (if a calculation calls for it), but it is not able to save autoqueries. This occurs for forms opened with POST /instance/headless or POST /instance/headless/rfc

Steps:

  1. Open this XForm ( Headless failure XForm.xml.txt ) with this instance ( Headless failure instance.xml.txt ) using POST /instance/headless

Expected:
The form adds an autoquery to the data item that violates the constraint and the call completes without error.

Actual:
No autoquery is added. The call returns an error code after 5 minutes (which is our current headless timeout).

@pbowen-oc pbowen-oc added this to the Next milestone Apr 19, 2023
@MartijnR
Copy link
Member

MartijnR commented Apr 19, 2023

failing (with autoquery)

curl --user enketorules: -d "server_url=http://localhost:3000&form_id=Headless.failure&ecid=a&instance_id=b&instance=<data xmlns:oc=\"http://openclinica.org/xforms\"  xmlns:enk=\"http://enketo.org/xforms\" ><int1>100</int1><observation_id>test</observation_id><meta><instanceID>uuid:1234</instanceID><instanceID_comment/></meta><int1_comment>{\"queries\":[],\"logs\":[{\"type\":\"audit\",\"message\":\"Value changed from \\\"\\\" to \\\"100\\\"\",\"user\":\"root\",\"date_time\":\"2023-04-19 17:18:59.068 Z\"}]}</int1_comment><observation_id_comment/></data>" http://localhost:8005/oc/api/v1/instance/headless

not failing (no autoquery):

curl --user enketorules: -d "server_url=http://localhost:3000&form_id=Headless.failure&ecid=a&instance_id=b&instance=<data xmlns:oc=\"http://openclinica.org/xforms\"  xmlns:enk=\"http://enketo.org/xforms\" ><int1>151</int1><observation_id>test</observation_id><meta><instanceID>uuid:1234</instanceID><instanceID_comment/></meta><int1_comment>{\"queries\":[],\"logs\":[{\"type\":\"audit\",\"message\":\"Value changed from \\\"\\\" to \\\"100\\\"\",\"user\":\"root\",\"date_time\":\"2023-04-19 17:18:59.068 Z\"}]}</int1_comment><observation_id_comment/></data>" http://localhost:8005/oc/api/v1/instance/headless

headless URL: http://localhost:8005/edit/fs/headless/154315abe283fcd7be162a203c8b701e?ecid=a&instance_id=b

findings

  • gui.confirm function is no longer overridden - actually it's the new gui.confirmAutoqueries
  • some unreachable code for RFC views with incomplete records

failing with rfc:

curl --user enketorules: -d "server_url=http://localhost:3000&form_id=Headless.failure&ecid=a&instance_id=b&instance=<data xmlns:oc=\"http://openclinica.org/xforms\"  xmlns:enk=\"http://enketo.org/xforms\" oc:complete=\"true\"><int1>100</int1><observation_id>test</observation_id><meta><instanceID>uuid:1234</instanceID><instanceID_comment/></meta><int1_comment>{\"queries\":[],\"logs\":[{\"type\":\"audit\",\"message\":\"Value changed from \\\"\\\" to \\\"100\\\"\",\"user\":\"root\",\"date_time\":\"2023-04-19 17:18:59.068 Z\"}]}</int1_comment><observation_id_comment/></data>" http://localhost:8005/oc/api/v1/instance/headless/rfc

headless RFC URL: http://localhost:8005/edit/fs/rfc/headless/154315abe283fcd7be162a203c8b701e?ecid=a&instance_id=b

@kkrumlian
Copy link

Can we verify this is also working properly on the master branch as part of validation.

@MartijnR MartijnR transferred this issue from OpenClinica/enketo-express-oc May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants