Concatenate strings in Input Data Mapping Expressions

264 views
Skip to first unread message

Gio M

unread,
Nov 20, 2014, 9:07:21 AM11/20/14
to jbpm-...@googlegroups.com

I would like to concatenate multiple string variables inside 'Input Data Mapping' using expression, but so far it doesn't work. It always interprets the whole expression as string and does not apply any operators or methods.


I have tried:

"bla" + variable

return ("bla" + variable);

getProcessVariable(variable)

 

Do I make something wrong, or is the Expression for Input Data Mappings buggy?

Is there any workaround? E.g. using a script task?

Maciej Swiderski

unread,
Nov 20, 2014, 9:11:07 AM11/20/14
to Gio M, jbpm-...@googlegroups.com
Take a look at evaluation sample process data input assignments [1] that shows how to concatenate string with variable

Maciej


--
You received this message because you are subscribed to the Google Groups "jBPM Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jbpm-usage+...@googlegroups.com.
To post to this group, send email to jbpm-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jbpm-usage/22172c29-c831-46a4-9873-bcb554c9075c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Gio M

unread,
Nov 20, 2014, 9:36:22 AM11/20/14
to jbpm-...@googlegroups.com, modeg...@gmail.com
Thanks for the link, but I cannot find proper example of concatenation in the given example: neither in the given line, nor in the whole text.

Maciej Swiderski

unread,
Nov 20, 2014, 9:50:16 AM11/20/14
to Gio M, jbpm-...@googlegroups.com
Here it is:

<bpmn2:from xsi:type="bpmn2:tFormalExpression" id="_zV4PwenxEeKBkvsKLqPxuw"><![CDATA[You need to evaluate #{employee}.]]></bpmn2:from>

this is equivalent to 

“You need to evaluate” + processInstance.getVariable(“employee”)

Maciej

Gio M

unread,
Nov 20, 2014, 10:11:32 AM11/20/14
to jbpm-...@googlegroups.com, modeg...@gmail.com
Thanks a lot. Works like charm.
Reply all
Reply to author
Forward
0 new messages