Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

id766750406

...

id766750427

...

id766750405

On this page

Table of Contents
maxLevel4

...

id766750416

Calling a specific behavior

You can use the following APIs to call any Behavior by its name.
 

Code Block
languagetext
object callBehavior(String name)
object callBehavior(String name, List<?> arguments)
object callBehavior(String name, List<?> arguments, boolean isSynchronous)

The following example shows how to call the "test" specified Behavior in ALH API


Code Block
languagetext
value = ALH.callBehavior("test");

You can also give initial parameter values in which the arguments lists must be created.


Code Block
languagetext
arguments = ALH.createList();
arguments.add("value1");
arguments.add("value2");
value = ALH.callBehavior("test", arguments);

If a found Behavior value is null or an argument's size is not equal to the in or inout parameter's size of the found Behavior, an IllegalArgumentException will be thrown.


Calling a specific operation

You can use the following APIs to call an operation
 

Code Block
languagetext
object callOperation(String name)
object callOperation(String name, List<?> arguments)
object callOperation(Object_ object, String name)
object callOperation(Object_ object, String name, List<?> arguments)
object callOperation(Object_ object, String name, List<?> arguments, boolean isSynchronous)

If the object is omitted then context (self) is used automatically.

The following example shows how to call a specified operation in ALH API by passing the operation's name

Code Block
languagetext
value = ALH.callOperation("test"); 


You can also give initial parameter values in which the arguments lists must be created by executing the following code

Code Block
languagetext
arguments = ALH.createList();
arguments.add("value1");
arguments.add("value2");
value = ALH.callOperation("test", arguments);

If a found Behavior value is null or an argument's size is not equal to the in or inout parameter's size of the found Behavior, an IllegalArgumentException will be thrown.