Hi, I’m working on a Unit test using FlowableRule. I have a TaskListener configured as follows:
<userTask id="myTask" name="My Task" >
<extensionElements>
<flowable:taskListener
event="complete"
class="com...MyTask" />
</extensionElements>
</userTask>
Test:
TaskService taskService = FlowableRule.getTaskService();
String taskId = taskService.createTaskQuery().singleResult().getId();
taskService.complete(taskId);
List<Attachment> taskAttachments = FlowableRule.getTaskService().getTaskAttachments(taskId);
AttachmentEntity attachment = (AttachmentEntity) taskAttachments.get(0);
Assert.assertNotNull(attachment.getContent());
id is not null
content is null
How can I get the content populated in FlowableRule tests?
Thanks