Search in sources :

Example 1 with JSITInvocable

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);
    }
}
Also used : JSITInputData(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITInputData) JSITDecision(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITDecision) JSITInvocable(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITInvocable)

Example 2 with JSITInvocable

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);
}
Also used : JSITInputData(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITInputData) JSITInformationItem(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITInformationItem) JSITDecision(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITDecision) JSITInvocable(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITInvocable)

Aggregations

JSITDecision (org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITDecision)2 JSITInputData (org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITInputData)2 JSITInvocable (org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITInvocable)2 JSITInformationItem (org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITInformationItem)1