cancel
Showing results for 
Search instead for 
Did you mean: 

Get Documentation from Service Task

arag
Confirmed Champ
Confirmed Champ

Hello !!

Please i need help ... again

I need to obtain de Documentation from my Service Task.... is there anyway to do this?

Thanks for your time Smiley Happy

1 ACCEPTED ANSWER

Does it work?

BpmnModel bpmnModel = repositoryService.getBpmnModel(execution.getProcessDefinitionId());

String documentation = bpmnModel.getFlowElement(execution.getCurrentActivityId()).getDocumentation();

View answer in original post

4 REPLIES 4

daisuke-yoshimo
Star Collaborator
Star Collaborator

public class TestJavaDelegate implements JavaDelegate {

  @Override

  public void execute(DelegateExecution execution) {

      String documentation = execution.getCurrentFlowElement().getDocumentation();

      System.out.println(documentation);

  }

}

Thanks daisuke-yoshimoto  but im working with activiti 5.22 and the code doesn´t works

"cannot find symbol
symbol: method getCurrentFlowElement()
location: variable execution of type DelegateExecution"

Please help me !! is there another way ?

Does it work?

BpmnModel bpmnModel = repositoryService.getBpmnModel(execution.getProcessDefinitionId());

String documentation = bpmnModel.getFlowElement(execution.getCurrentActivityId()).getDocumentation();

Yes!!! It's working 

Thanks for help me!!!!