@Named
@Dependent
public class Description implements Supplier<String> {
@Inject
private BusinessProcess businessProcess;
@Override
public String get() {
return "description for " + businessProcess.getTask().getTaskDefinitionKey();
}
}
and this the bpmn:
<bpmn2:userTask id="UserTask_1" camunda:assignee="#{assignee.get()}" name="Do Something">
<bpmn2:documentation>#{description.get()}</bpmn2:documentation>
<bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
</bpmn2:userTask>
assignee works, description doesnt.
I also tried it without the BusinessProcess inject but #{description.get(task}, but with the same result.Jan
<bpmn2:documentation>#{description.get()}</bpmn2:documentation>