apiAccessor in Groovy Function

I'm writing a very simple Groovy Function to return a list, example below:

Bonita says apiAccessor is undefined

In my diagram I have several connectors where I call apiAccessor, on personal tasks, but in one of them I get this error:

Groovy Script Function apiAccessor in Error

Hi there,

basic I know and really annoying for me, new to Groovy...

I'm writing the following function to return the process name...but apiAccesor and processRuntimeAPI keep getting flagged as follows:

Groovy:Apparent variable 'apiAccessor' was found in a static scope but doesn't refer to a local variable, static field or class. Possible causes:

How do I declare the calls? I've lost patience... :)

thanks and regards Seán