-
Notifications
You must be signed in to change notification settings - Fork 14
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
Support Endpoints for Instance Datums #1312
Conversation
throw new InvalidStructureException( | ||
"argument containing a non-null instance-id must define an instance-src", parser); | ||
} | ||
arguments.add(new EndpointArgument(argumentID, argInstanceId, argInstanceSrc)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to make sure I understand correctly, is the idea here that EndpointArgument
also handles single case selection where <argument id="case_id"/>
? So if there is no argInstanceId
and no argInstanceSrc
the functionality from this point is essentially the same as before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, spot on.
Vector<String> missingArguments = new Vector<String>(endpointArguments.subList(args.size(), endpointArguments.size())); | ||
Vector<String> missingArguments = new Vector<>(); | ||
for (int i = args.size(); i < endpointArguments.size(); i++) { | ||
missingArguments.add(endpointArguments.get(i).getId()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you always depend on the ordering of args
and endpointArguments
to match up? I see that it was working with the same logic before when calling endpointArguments.subList
, but not clear how the ordering works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah we expect the arguments to be passed in order when it's passed as a list without using the argument keys (arg1=val1&arg2=val2
vs val1,val2
). Web Apps uses the fuirst format with names but Android can use both those formats. The ordering matters only in the later format.
3b3db6f
to
ebfbaf4
Compare
we already do so, this just makes it more apparent that we are passing SessionWrapper
…d entities instance
ebfbaf4
to
c13843c
Compare
storageReferenceId = guid; | ||
} | ||
|
||
private void validateEntitiesInInstance(ExternalDataInstance instance) throws CommCareSessionException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is currently an issue with this validation that I am verifying with delivery
duplicate this PR |
See dimagi/formplayer#1431
Special deploy instructions
Rollback instructions
Review
Duplicate PR
Automatically duplicate this PR as defined in contributing.md.