3

I'm attempting to define some relationships between entity values, using metadata.

I've uploaded metadata to an entity value using the Watson API v1. When I list the entities through the same API I can see the metadata. I have not been able to access the metadata from Watson Assistant though.

As a test I changed the entity value and checked through Watson Assistant it was changed, so I know I'm working with the correct workspace. I've also checked the entity using the JSON editor to verify it was defined and tried assigning the entity to a context variable.

I've tried several methods including: @Room.building, @Room.metadata.building, entities['Room']?metadata?.building, entities['Room']?.building (all within the < ? tags). Using @Room and entities['Room']?.value returns the entity value correctly. It's accessing the metadata where it fails.

The metadata for building should not be returning null, but I"m either receiving a null or, depending on how I'm attempting to retrieve the value, a SPEL exception - no property on undefined.

Joe M.
  • 33
  • 4

1 Answers1

1

Unfortunately, it is not possible to access metadata defined on user entities in the WA runtime at this moment. The metadata are only returned when making the direct API call. You could use cloud functions call though to get the metadata in WA although that is not ideal either.

Michal Bida
  • 1,316
  • 9
  • 24
  • 1
    Thanks - that's what I was afraid of. In some cases calling through the API may still be faster than the external system, so possibly a solution, if not ideal. – Joe M. May 31 '19 at 15:38