Question
· Apr 1, 2016

iKnow - loading metadata programmatically

I have a class which, in the previous instance, was able to extract metadata field names and data from a text file, and load this information into a domain. I am trying to run this in the field test instance, but it is not loading the metadata - only the field names. I am not getting an error, but the data is not loaded.

The few changes I made to the original class:

Previously, this class also ran iTables. I commented all that code out.

To create the domain, I replaced the line:

  set tSC = ##class(HSTA.DomainExpert.utils.DomainUtils).%CreateDomain(dname,.domoref,ikcfgName)

with two lines:
  set domoref = ##class(%iKnow.Domain).%New(dname)
  set tSC = domoref.%Save()

Also, the newly created domain does not show in the iKnow Architect "Open" menu, but it IS available in the Knowledge Portal.

Are there other changes I need to make in order to create a domain using %iKnow now? Thank you.

Discussion (1)0
Log in or sign up to continue

Hi Terri,

[a little late perhaps (and we spoke briefly in Phoenix as well), but for the sake of completeness, here's your response]

The iKnow Architect page only shows domains based on domain definitions, subclasses of %iKnow.DomainDefinition. The ones created "the old way" (programmatically) through the %iKnow.Domain class do not carry the declarative information about where to load data from, hence the majority of the Architect GUI wouldn't be available on those.

As to the metadata loading question: I'm not sure which part of the script you're referring to was taking care of that metadata loading, but maybe this comes back to your question in a separate thread.

regards,

benjamin