Java function call from <arg-node-set > ==> function called twice!

Hello everyone!

I've detected very strange behavior and want to ask if somebody also detected it. (IDM 4.6). Maybe I'm doing something in a wrong way and you will return me on the right way.

I'm calling my very simple static java function from the driver policy. And when I use <arg-node-set > instead of <arg-string>, my function is called twice!

--------------

My function:

public static String callTestFunc(String driverDN) { Trace tracer = new Trace("dxqueue"); tracer.trace("Starting Test Func with DriverDN: " driverDN, 4); tracer.trace("Test Func finished.", 4); return "success"; }

When I make the following call from the driver policy:

<do-set-local-variable name="send-result" scope="policy"> <arg-node-set> <token-xpath expression="dxqueue:callTestFunc('test driver')"/> </arg-node-set> </do-set-local-variable>

 I see the following traces:

[08/15/2020 17:18:29.145] Driver ST: Action: do-set-local-variable("send-result",scope="policy",arg-node-set(token-xpath("dxqueue:callTestFunc('test driver')"))).
[08/15/2020 17:18:29.145] Driver ST: arg-node-set(token-xpath("dxqueue:callTestFunc('test driver')"))
[08/15/2020 17:18:29.145] Driver ST: token-xpath("dxqueue:callTestFunc('test driver')")
[08/15/2020 17:18:29.145] Driver ST: dxqueue: Starting Test Func with DriverDN: test driver
[08/15/2020 17:18:29.145] Driver ST: dxqueue: Test Func finished.
[08/15/2020 17:18:29.145] Driver ST: dxqueue: Starting Test Func with DriverDN: test driver
[08/15/2020 17:18:29.145] Driver ST: dxqueue: Test Func finished.
[08/15/2020 17:18:29.145] Driver ST: Token Value: "success".
[08/15/2020 17:18:29.145] Driver ST: Arg Value: {"success"}.

----------------------------------

And when I make the following call:

<do-set-local-variable name="send-result" scope="policy"> <arg-string> <token-xpath expression="dxqueue:callTestFunc('test driver')"/> </arg-string> </do-set-local-variable>

Traces show the following:

[08/15/2020 17:24:47.427] Driver ST: arg-string(token-xpath("dxqueue:callTestFunc('test driver')"))
[08/15/2020 17:24:47.427] Driver ST: token-xpath("dxqueue:callTestFunc('test driver')")
[08/15/2020 17:24:47.427] Driver ST: dxqueue: Starting Test Func with DriverDN: test driver
[08/15/2020 17:24:47.427] Driver ST: dxqueue: Test Func finished.
[08/15/2020 17:24:47.427] Driver ST: Token Value: "success".
[08/15/2020 17:24:47.427] Driver ST: Arg Value: "success".