use of org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITInvocable in project kie-wb-common by kiegroup.
the class DMNMarshallerImportsClientHelper method setInformationItem.
private void setInformationItem(final JSITDRGElement drgElement, final JSITInformationItem informationItem) {
if (JSITDecision.instanceOf(drgElement)) {
final JSITDecision decision = Js.uncheckedCast(drgElement);
decision.setVariable(informationItem);
} else if (JSITInputData.instanceOf(drgElement)) {
final JSITInputData inputData = Js.uncheckedCast(drgElement);
inputData.setVariable(informationItem);
} else if (JSITInvocable.instanceOf(drgElement)) {
final JSITInvocable invocable = Js.uncheckedCast(drgElement);
invocable.setVariable(informationItem);
}
}
use of org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITInvocable in project kie-wb-common by kiegroup.
the class DMNMarshallerImportsClientHelper method getInformationItem.
private Optional<JSITInformationItem> getInformationItem(final JSITDRGElement drgElement) {
final JSITInformationItem variable;
if (JSITDecision.instanceOf(drgElement)) {
final JSITDecision decision = Js.uncheckedCast(drgElement);
variable = Js.uncheckedCast(decision.getVariable());
} else if (JSITInputData.instanceOf(drgElement)) {
final JSITInputData inputData = Js.uncheckedCast(drgElement);
variable = Js.uncheckedCast(inputData.getVariable());
} else if (JSITInvocable.instanceOf(drgElement)) {
final JSITInvocable invocable = Js.uncheckedCast(drgElement);
variable = Js.uncheckedCast(invocable.getVariable());
} else {
return Optional.empty();
}
return Optional.of(variable);
}
Aggregations