Error using the get_do() function on the State Class

I am attempting to use the get_do function under the State class however I receive an error when I use it that the Method doesn’t exist has anyone else received this error?

This is my code, where elem_ms is a Mode or State object:
involved_do_SysFnc = elem_ms.get_do()

This is the error which is returned:
org.eclipse.ease.ScriptExecutionException: Traceback (most recent call last):
File “workspace://Python4Capella/sample_scripts/Export_system_functions_to_xslx.py”, line 187, in
module = _pyease_ast.Module(tree.body[:-1], type_ignores=[])
File “workspace://Python4Capella/sample_scripts/Export_system_functions_to_xslx.py”, line 109, in getModesandStates
# Strings can be send directly
File “workspace://Python4Capella/simplified_api/capella.py”, line 1914, in get_do
File “C:\Users\fhewson\Documents\Capella 1.4.2\Capella 1.4.2\eclipse\plugins\py4j-python_0.10.9.3-bnd-2odeag\src\py4j\java_gateway.py”, line 1322, in call
answer, self.gateway_client, self.target_id, self.name)
File “C:\Users\fhewson\Documents\Capella 1.4.2\Capella 1.4.2\eclipse\plugins\py4j-python_0.10.9.3-bnd-2odeag\src\py4j\protocol.py”, line 332, in get_return_value
format(target_id, “.”, name, value))
py4j.protocol.Py4JError: An error occurred while calling o1734.getDo. Trace:
py4j.Py4JException: Method getDo([]) does not exist
at py4j.reflection.ReflectionEngine.getMethod(ReflectionEngine.java:318)
at py4j.reflection.ReflectionEngine.getMethod(ReflectionEngine.java:326)
at py4j.Gateway.invoke(Gateway.java:274)
at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)
at py4j.commands.CallCommand.execute(CallCommand.java:79)
at py4j.ClientServerConnection.sendCommand(ClientServerConnection.java:244)
at py4j.CallbackClient.sendCommand(CallbackClient.java:384)
at py4j.CallbackClient.sendCommand(CallbackClient.java:356)
at py4j.reflection.PythonProxyHandler.invoke(PythonProxyHandler.java:106)
at com.sun.proxy.$Proxy30.executeScript(Unknown Source)
at org.eclipse.ease.lang.python.py4j.internal.Py4jScriptEngine.internalExecute(Py4jScriptEngine.java:240)
at org.eclipse.ease.lang.python.py4j.internal.Py4jScriptEngine.execute(Py4jScriptEngine.java:227)
at org.eclipse.ease.AbstractScriptEngine.inject(AbstractScriptEngine.java:189)
at org.eclipse.ease.AbstractScriptEngine.run(AbstractScriptEngine.java:242)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

It seems the Java method is called getDoActivity().

You can replace the following line in the capella.py:

return create_e_list(self.get_java_object().getDo(), AbstractAction)

by

return create_e_list(self.get_java_object().getDoActivity(), AbstractAction)

And they are supposed to return AbstractEvent and not AbstractAction so you might want to change it to:

return create_e_list(self.get_java_object().getDoActivity(), AbstractEvent)

The same return type should be used for State.get_entry() and State.get_exit().

I opened an issue:

Thank you for your help!