Adding variables to user task name/documentation


#1

I’m using the Eclipse designer to create my diagrams. How do I go about using variables in my task name or documentation/description?

I’ve tried setting the documentation field of the task to:
New {employeeType} staff: {firstName} ${lastName}

I’ve also tried the same with the Name field with no luck.

I’m starting the process using the REST API call to start process instance by key and passing along the variables above.

When the task is created, the variables are created, but they are not plugged into the documentation/name fields.

Am I doing this correctly? What am I missing?

Thanks!


#2

I was able to figure this out. I simply replaced the $ symbol with # and referenced the variable name instead of the variable ID, but it didn’t work with spaces in the variable name so I had to rename them.

New #{employeeType} staff: #{firstName} #{lastName} starting #{startDate}

Now I’m just trying to figure out how to format the datetime variable when displayed in this manner. Currently it is displaying as “2018-11-07 12:00:00 AM”, but I would like to cut off the time portion. Anyone know how to do this?