-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 7.10, 8.2
-
Component/s: Automation
-
Tags:
-
Backlog priority:400
-
Sprint:nxfit 8.3.6
-
Story Points:3
Create a script called kSendMailToSupplier with parameters as param1 and param2:
function run(input, params) {
Console.info(params.param1);
Console.info(params.param2);
Console.info(ctx.ChainParameters.param2);
Console.info("Informations");
}
and an automation chain calling it:
- Context.FetchDocument - Context.SetVar: name: mavar value: zevaliou - javascript.kSendMailToSupplier: param1: valeurendur param2: "coucou @{\"lalala\".toString()} hohoho"
This can be triggered with a button for example, this is not important.
The MVEL is not evaluated and even putting string litterals around it like coucou in this case, does not force the String conversion.
The current script displays the following:
2016-06-03 14:33:39,855 WARN [http-bio-0.0.0.0-8080-exec-39] [org.nuxeo.automation.scripting.helper.Console] [INFO] valeurendur
2016-06-03 14:33:39,855 WARN [http-bio-0.0.0.0-8080-exec-39] [org.nuxeo.automation.scripting.helper.Console] [INFO] org.nuxeo.ecm.automation.core.scripting.MvelTemplate@1ab74a19
2016-06-03 14:33:39,856 WARN [http-bio-0.0.0.0-8080-exec-39] [org.nuxeo.automation.scripting.helper.Console] [INFO] null
2016-06-03 14:33:39,856 WARN [http-bio-0.0.0.0-8080-exec-39] [org.nuxeo.automation.scripting.helper.Console] [INFO] Informations
- is duplicated by
-
NXP-19797 Fix mvel expression resolution when passing parameter to Automation scripts
- Resolved