Skip to content
Snippets Groups Projects
Commit c36d3b18 authored by Jonas Blatt's avatar Jonas Blatt :ant:
Browse files

Add decisionId in action value

parent 49c07372
No related branches found
No related tags found
No related merge requests found
......@@ -65,7 +65,10 @@ public class MissingRuleVerifier extends AbstractVerifier {
.collect(Collectors.joining(" / ")));
sb.append(" }");
Action.Builder fixActionBuilder =
Action.getBuilder().withActionScope(ActionScope.RULE).withActionType(ActionType.CREATE);
Action.getBuilder()
.withActionScope(ActionScope.RULE)
.withActionType(ActionType.CREATE)
.addValue("decisionId", missingRule.getVDmnDecision().getDecisionId().getValue());
for (VDmnInputValue v : missingRule.getVDmnInputValues()) {
fixActionBuilder.addValue(
v.getVDmnInputColumn().getInputId().getValue(), v.getBoundary().getParsedText());
......@@ -99,14 +102,14 @@ public class MissingRuleVerifier extends AbstractVerifier {
private VDmnRuleChangeableImpl constructPseudoMissingRule(List<VDmnInputColumn> inputs) {
Builder b =
VDmnRuleImpl.getBuilder()
.withRuleId(new RuleId("TODO")) // TODO
.withRuleId(new RuleId("TODO"))
.withVDmnDecisionTable(inputs.get(0).getVDmnDecisionTable())
.withRowNumber(new RowNumber(INITIAL_ROW_NUMER));
for (VDmnInputColumn col : inputs) {
b.addVDmnInputValue(
VDmnInputValueImpl.getBuilder()
.withInputEntryId(new InputEntryId("TODO")) // TODO
.withInputEntryId(new InputEntryId("TODO"))
.withText("")
.withVDmnInputColumn(col)
.withVDmnRuleFromBuilder(b)
......
......@@ -157,7 +157,10 @@ public class PartialReductionVerifier extends AbstractVerifier {
.get());
}
Action.Builder fixActionBuilder =
Action.getBuilder().withActionScope(ActionScope.RULE).withActionType(ActionType.CREATE);
Action.getBuilder()
.withActionScope(ActionScope.RULE)
.withActionType(ActionType.CREATE)
.addValue("decisionId", inColumns.get(0).getVDmnDecision().getDecisionId().getValue());
for (int i = 0; i < inColumns.size(); i++) {
fixActionBuilder.addValue(
inColumns.get(i).getInputId().getValue(), boundaries.get(i).getParsedText());
......
......@@ -214,7 +214,7 @@ function performVerificationFixCREATE(verificationEntry, fixAction) {
* @param {Action} fixAction
*/
function createRule(verificationEntry, fixAction) {
openViewWithId(verificationEntry.elements[0].identifier['decisionId']);
openViewWithId(fixAction.actionValues['decisionId']);
const modeler = getCurrentModeler();
const rule = modeler.addRow({type: "dmn:DecisionRule"});
const {cells} = rule;
......@@ -298,7 +298,7 @@ function performVerificationFixDELETE(verificationEntry, fixAction) {
* @param {Action} fixAction
*/
function deleteRule(verificationEntry, fixAction) {
openViewWithId(verificationEntry.elements[0].identifier['decisionId']);
openViewWithId(fixAction.actionValues['decisionId']);
const modeler = getCurrentModeler();
for (const [key, value] of Object.entries(fixAction.actionValues)) {
if (key === 'ruleId') {
......@@ -314,7 +314,7 @@ function deleteRule(verificationEntry, fixAction) {
* @param {String} columnIdName
*/
function deleteColumn(verificationEntry, fixAction, columnIdName) {
openViewWithId(verificationEntry.elements[0].identifier['decisionId']);
openViewWithId(fixAction.actionValues['decisionId']);
const modeler = getCurrentModeler();
verificationEntry.elements.forEach(function (el) {
let col = getSheetElementWithId(el.identifier[columnIdName]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment