question-circle [Solved] Template/Jython - Documentation of ctxt ?

5 years 7 months ago #2450 by jmfavre
Hi,

Is there some documentation somewhere, or code, or whatever that explain the "ctxt" parameter of the navigate function?

def navigate(elt, index, maxIndex, ctx):
return None

Is there a way to debug such code, to do some print or whatever?

Thanks for all kind of information,
Jean-marie

Please Log in or Create an account to join the conversation.

5 years 7 months ago #2451 by chm

jmfavre wrote: Is there some documentation somewhere, or code, or whatever that explain the "ctxt" parameter of the navigate function?


No, there is none... :whistle:

'ctx' is the iteration context, passed from node to node at execution. Its main usage is to transfer parameters from a node to another, using 'getParameterValue("id")' and 'setParameter("id", object)'.

jmfavre wrote: Is there a way to debug such code, to do some print or whatever?


Of course, it is possible to print trace using the Modelio log api, something like Modelio.getInstance().getLogService().info(None, "this is a trace")

Hope this helps,


Christophe
The following user(s) said Thank You: jmfavre

Please Log in or Create an account to join the conversation.

Moderators: tmachmebr
Time to create page: 0.030 seconds
^ Back to Top