Get Documentation from Service Task

cancel
Showing results for 
Search instead for 
Did you mean: 
arag
Active Member II

Get Documentation from Service Task

Jump to solution

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 Solution

Accepted Solutions
daisuke-yoshimo
Senior Member

Re: Get Documentation from Service Task

Jump to solution

Does it work?

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

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

View solution in original post

4 Replies
daisuke-yoshimo
Senior Member

Re: Get Documentation from Service Task

Jump to solution

public class TestJavaDelegate implements JavaDelegate {

  @Override

  public void execute(DelegateExecution execution) {

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

      System.out.println(documentation);

  }

}

arag
Active Member II

Re: Get Documentation from Service Task

Jump to solution

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 ?

daisuke-yoshimo
Senior Member

Re: Get Documentation from Service Task

Jump to solution

Does it work?

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

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

arag
Active Member II

Re: Get Documentation from Service Task

Jump to solution

Yes!!! It's working 

Thanks for help me!!!!