Using ternary operator while configuring output process variable

Hi,

I want to create an output variable ‘publisher’ from a result Map object.
I am using Variable assignment type as ‘Expression and String’

In expression, I want to something like this:
${ result.get(‘publisherType’) != ‘’ ? ${${result.get(‘publisherType’)}-${result.get(‘publisher’)}} : null}

Can someone help on how to write the correct expression?

In java code, it would be like this:
String publisher;

if (result.get(‘publisherType’) != ‘’) {
publisher = result.get(‘publisherType’) + “-” + result.get(‘publisher’);
} else {
publisher = null
}