cancel
Showing results for 
Search instead for 
Did you mean: 

get Service Task name

jbbond
Champ in-the-making
Champ in-the-making
Hi,

I am trying to get the service task name and not its id using execution listeners.

<serviceTask id="servicetask1" name="Service A" activiti:class="classes.ServiceTask1">

executionEntity .getActivityId(); Returns Id which is 'servicetask1' for the above example

many thanks
4 REPLIES 4

jbbond
Champ in-the-making
Champ in-the-making
Could someone please look into this for me

many thanks

trademak
Star Contributor
Star Contributor
Which version of Activiti are you using? You should be able to get the name using the getCurrentActivityName method on the DelegateExecution interface.

Best regards,

jbbond
Champ in-the-making
Champ in-the-making
thanks for your response.

I am using Activiti 5.8 and Unfortunately, I have to stick to this version.
I can't find getCurrentActivityName on 5.8 and do not any other method

jbarrez
Star Contributor
Star Contributor
In that case you can probably cast the execution to the ExecutionImpl or ExecutionEntity and call the method there.