Invocation context from Perl package in Ruby app
Calling any method on Runtime Context creates new instance of Invocation Context.
# use activate only once in your app
Javonet.activate('your-license-key')
# create called runtime context
called_runtime = Javonet.in_memory.perl
# construct an invocation context - this invocationContext in non-materialized
invocation_context = called_runtime.get_type('CORE').invoke_static_method("length", "sample text")
# execute invocation context - this will materialize the invocationContext
response = invocation_context.execute
Navigation through the methods on different variations of Invocation Context allows to construct the chain of invocations. Those chains of invocation represent the non-materialized expression of interaction with libraries, types, and any programming entities in target technology.
In order to materialize expression, a call to called technology needs to be invoked with Execute method
Was this article helpful?