Hello,
It's too late, but after spending few time of searching and testing I've found how to call JavaScript / EcmaScript from the routing strategy, and it's interesting to share this with you (Unfortunately! no genesys documentation about how!!!!)
First, the JS / ES code must be prepared in a MACRO inside IRD as "complex macro". The macro can be defined with input parameters and , in the other side the result can be retrieved by using "ReturnData []" function juste after the macro bloc in routing strategy.
Here is an example JS which validates a regular expression on string and returns OK or KO according to the match of RegExp:
[b]- Macro Definition[/b]
[img width=640 height=407]http://i64.tinypic.com/14o189d.jpg[/img]
[url=http://i64.tinypic.com/14o189d.jpg]http://i64.tinypic.com/14o189d.jpg [/url]
[b]- Strategy Integration[/b]
[img width=404 height=480]http://i67.tinypic.com/28qxil3.jpg[/img]
[url=http://i67.tinypic.com/28qxil3.jpg]http://i67.tinypic.com/28qxil3.jpg [/url]
[b]- Here URS logs:[/b]
[table]
[tr]
[td]
18:05:31.807_I_I_350b029c2f5bd1f5 [09:05] >>>>>>>>>>>>resume interp(0), func:CallStrategy
_I_I_350b029c2f5bd1f5 [09:04] ASSIGN: var_exp(LOCAL) <- STRING: "^[123]$"
_I_I_350b029c2f5bd1f5 [09:04] ASSIGN: var_value(LOCAL) <- STRING: "2"
18:05:31.807_I_I_350b029c2f5bd1f5 [07:48] func will be continued(0,0000000031600006)
18:05:31.807_I_I_350b029c2f5bd1f5 [09:04] <<<<<<<<<<<<suspend interp(JUMPING), func:CallStrategy timers:00001
18:05:31.807_I_I_350b029c2f5bd1f5 [07:49] func is continued(0,0000000031600006)
_I_I_350b029c2f5bd1f5 [07:43] call strategy *0x1*(TRAN-22)macroRegExp (level=2, crc=3774866085)
18:05:31.807_I_I_350b029c2f5bd1f5 [09:06] >>>>>>>>>>>>start interp()
_I_I_350b029c2f5bd1f5 [07:46] no error mode for this call
_I_I_350b029c2f5bd1f5 [09:04] ASSIGN: v:0:this(LOCAL) <- OBJECT:0000000001B8DBF0[Global]={"Class":"Global"}
_I_I_350b029c2f5bd1f5 [09:04] ASSIGN: v:0:in_exp(LOCAL) <- STRING: "^[123]$"
_I_I_350b029c2f5bd1f5 [09:04] ASSIGN: v:0:in_value(LOCAL) <- STRING: "2"
_I_I_350b029c2f5bd1f5 [09:04] ASSIGN: v:0:regex(LOCAL) <- OBJECT:0000000002E4DB60[RegExp]={"source":"^[123]$","global":false,"ignoreCase":false,"multiline":false,"lastIndex":0}
_I_I_350b029c2f5bd1f5 [09:04] ASSIGN: v:0:resultat(LOCAL) <- STRING: "OK"
18:05:31.807_I_I_350b029c2f5bd1f5 [07:48] func will be continued(0,0000000005600012)
18:05:31.807_I_I_350b029c2f5bd1f5 [09:04] <<<<<<<<<<<<suspend interp(JUMPING), func:ReturnEx timers:00001
18:05:31.807_I_I_350b029c2f5bd1f5 [07:49] func is continued(0,0000000005600012)
_I_I_350b029c2f5bd1f5 [07:44] return to strategy *0x1*IXN_E-mail Pre-Route (level=1, crc=68874202)
18:05:31.807_I_I_350b029c2f5bd1f5 [09:05] >>>>>>>>>>>>resume interp(0), func:CallStrategy
_I_I_350b029c2f5bd1f5 [09:04] ASSIGN: var_trace(LOCAL) <- STRING: "OK"
[/td]
[/tr]
[/table]