Skip to content

How do you concatenate strings in a BPA workflow — for example, building a KeyRef string like 'CompanyId=210^' from a literal prefix plus a variable set earlier in the workflow?

Answer

Use a Script Task (not a Service/System Task expression) to build the concatenated string with plain JavaScript string concatenation — for example execution.setVariable('KeyRef', 'CompanyId=' + execution.getVariable('CompanyId') + '^'). There's no need to wrap the concatenated pieces in the ${...} expression-language syntax inside a script task the way you would in some other workflow fields — plain JavaScript string concatenation with + is what actually works there.

← Browse Workflows and automation questions