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

Fetching Structure Definitions within Property.getChildProperties() #682

Closed
travislukach opened this issue Jul 3, 2017 · 4 comments
Closed

Comments

@travislukach
Copy link
Collaborator

@travislukach travislukach commented Jul 3, 2017

When processing a StructureMap with StructureMapUtilities.analyse methods, there is a reference to another class within a referenced StructureDefinition. Using the the StrucutreDefinitions provided with DefaultProfileValidiationSupport I was working on a map using the Coding structure. At some point I wanted to utilize Coding.extension for a value. Extension is present in the DefaultProfileValidiationSupport's StructureDefinitions, so theoretically there shouldn't be any problems. But when I enter the getChildProperties method within the Property object, there is an issue.
When it calls the fetchResource method with the context, it doesn't feed in the full URL for Extension, it just feeds in "Extension", returning null as a value and causing the DefinitionException to be thrown when it doesn't, so the map analysis isn't getting completed in the end. So just making sure it feeds the full URL in would be a good fix unless there was another way of working around this.
fetchstructuredefinitionerror

@grahamegrieve
Copy link
Collaborator

@grahamegrieve grahamegrieve commented Jul 3, 2017

@travislukach
Copy link
Collaborator Author

@travislukach travislukach commented Jul 5, 2017

Of course, I shared the following code snippet with James as well. The code builds the structure definition and the structure map and then executes the Structure Map Utility call.
testSnippet.zip

jamesagnew added a commit that referenced this issue Jul 12, 2017
@jamesagnew
Copy link
Owner

@jamesagnew jamesagnew commented Jul 12, 2017

@grahamegrieve This actually appears to be an issue with HAPI's worker context implementation, not with the Property.java. I guess the contract for IWorkerContext#fetchResource allows logical IDs such as Extension but HAPI is requiring a FQN.

Will see about a fix for this.

jamesagnew added a commit that referenced this issue Jul 12, 2017
@jamesagnew
Copy link
Owner

@jamesagnew jamesagnew commented Jul 13, 2017

Build was successful, this is fixed as of 1a6b3ea. Woohoo!

@jamesagnew jamesagnew closed this Jul 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.