@Override
public Object getValue() {
if (baos != null && StringUtil.hasText(receivedFileName) && StringUtil.hasText(receivedMimeType)) {
if (instanceAttachment == null) {
instanceAttachment = new ProcessInstanceAttachmentAttribute();
}
instanceAttachment.setData(baos.toByteArray());
instanceAttachment.setFileName(receivedFileName);
instanceAttachment.setMimeType(receivedMimeType);
}