use of org.kie.workbench.common.stunner.bpmn.definition.property.notification.NotificationTypeListValue in project kie-wb-common by kiegroup.
the class NotificationsInfos method of.
public static NotificationsInfo of(List<DataInputAssociation> dataInputAssociations) {
NotificationTypeListValue notifications = new NotificationTypeListValue();
dataInputAssociations.forEach(din -> {
DataInput targetRef = (DataInput) (din.getTargetRef());
if (isReservedIdentifier(targetRef.getName())) {
if (!din.getAssignment().isEmpty()) {
Assignment assignment = din.getAssignment().get(0);
if (assignment != null) {
String body = ((FormalExpression) assignment.getFrom()).getBody();
if (body != null) {
Arrays.stream(body.split("\\^")).forEach(b -> {
notifications.addValue(ParsedNotificationsInfos.of(targetRef.getName(), b));
});
}
}
}
}
});
return new NotificationsInfo(notifications);
}
Aggregations