CogStack/CogStack-NiFi

nlp response groovy script error

Closed this issue · 3 comments

Using the script "parse-anns-from-nlp-response-bulk.groovy" in the nifi annotation workflow gives an error as it cannot validate ann_id using "assert ann_id". I had to convert the ann_id type to string to make it work:

def ann_id = outAnn[annotation_id_field as String]
assert ann_id.**toString()**

I've just tested again but I do not encounter this issue, have you also updated MedCAT service to the latest version ?

That's interesting Vlad. yes, I use the latest version of Medcatservice (Cogstack-Nifi in general) and this error happens in es-to-es workflow.

Well, added the fix anyhow, should work for all cases.