Concordion > Commands >

execute

An execute command lets you run a method in the Java fixture code.

Example - no argument

The following instrumentation:

<p concordion:execute="myMethod()">Some text goes here.</p>

Will call myMethod() in the Java fixture code.

Example - single static argument

The following instrumentation:

<p concordion:execute="myMethod('arg')">Some text goes here.</p>

Will call myMethod('arg') in the Java fixture code with argument arg.

Example - map as argument

The following instrumentation:

<p concordion:execute="myMethod(#{'arg':'value', 'arg2': 'value2'})">Some text goes here.</p>

Will call myMethod(#{ 'arg': 'value', 'arg2': 'value2'}) in the Java fixture code with argument {(arg:value)(arg2:value2)}.

Example - list as argument

The following instrumentation:

<p concordion:execute="myMethod({'arg', 'value','arg2','value2'})">Some text goes here.</p>

Will call myMethod({'arg', 'value','arg2','value2'}) in the Java fixture code with argument [(arg)(value)(arg2)(value2)].

Further Details