Skip to content

Commit

Permalink
Quantum Token Simulation (#132)
Browse files Browse the repository at this point in the history
* Add linter script and fix errors

* Apply prettier

* Add workflow executing linters

* Add working directory for npm ci

* Remove unknown working-directory from linting action

* Update linting workflow

* Fix linting command

* Fix NOTICE file

* Fix licence years

* Fix name in Github workflow

* Enable unused variable linting rule

* Run prettier

* Enable unnecessary espace rule

* Add .eslintignore

* Adapt path to public folder

* Update ignore rules for linters

* Lint changes after merging master

* Start fixing Readme

* Lint changes from merge

* Lint master merge

* Lint changes after merge with origin/master

* Replace renderer with correct file

* Lint changes

* Lint changes

* Run linter

* Fix lint error

* Add badges to readme

* add token simulation

* add quantme task handling

* add handling of quantme subprocesses

* fix layout change

* change font & position

* update token simulation

* remove white rendering of elements

---------

Co-authored-by: Benjamin Weder <benjamin.weder@iaas.uni-stuttgart.de>
  • Loading branch information
LaviniaStiliadou and wederbn authored Dec 18, 2023
1 parent 36068d1 commit 4e81b4f
Show file tree
Hide file tree
Showing 14 changed files with 960 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import "./editor/ui/notifications/Notification.css";
import "./editor/resources/styling/camunda-styles/style.css";
import "bpmn-js-bpmnlint/dist/assets/css/bpmn-js-bpmnlint.css";
import "./modeler.css";
import "./editor/resources/styling/bpmn-js-token-simulation.css";

import React from "react";
import { createRoot } from "react-dom/client";
Expand Down
6 changes: 4 additions & 2 deletions components/bpmn-q/modeler-component/editor/ModelerHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ import {
getAdditionalModules,
getModdleExtension,
} from "./plugin/PluginHandler";
import ModelerRulesModule from "./rules/";
import ModelingModule from "./modeling/";
import LintModule from "bpmn-js-bpmnlint";
import bpmnlintConfig from "../../.bpmnlintrc";
import TokenSimulationModule from "bpmn-js-token-simulation";

import Clipboard from "diagram-js/lib/features/clipboard/Clipboard";
let camundaModdleDescriptor = require("camunda-bpmn-moddle/resources/camunda.json");
Expand Down Expand Up @@ -141,7 +142,8 @@ function getModules() {
CustomPopupMenuModule,
LintModule,
clipboardModule,
ModelerRulesModule,
TokenSimulationModule,
ModelingModule,
].concat(pluginModules);

console.log("\n Additional modules of the modeler: ");
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import BpmnRules from "bpmn-js/lib/features/rules/BpmnRules";

/**
* Copyright (c) 2023 Institute of Architecture of Application Systems -
* University of Stuttgart
*
* This program and the accompanying materials are made available under the
* terms the Apache Software License 2.0
* which is available at https://www.apache.org/licenses/LICENSE-2.0.
*
* SPDX-License-Identifier: Apache-2.0
*/
export default class ModelerRules extends BpmnRules {
constructor(eventBus) {
super(eventBus);
}
}

ModelerRules.$inject = ["eventBus"];
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* Copyright (c) 2023 Institute of Architecture of Application Systems -
* University of Stuttgart
*
* This program and the accompanying materials are made available under the
* terms the Apache Software License 2.0
* which is available at https://www.apache.org/licenses/LICENSE-2.0.
*
* SPDX-License-Identifier: Apache-2.0
*/
export default function NeutralElementColors(
eventBus,
elementRegistry,
elementColors
) {
this._elementRegistry = elementRegistry;
this._elementColors = elementColors;

// overwrite the default white rendering of the token simulation module
eventBus.on("tokenSimulation.toggleMode", () => {});
}

NeutralElementColors.$inject = ["eventBus", "elementRegistry", "elementColors"];
8 changes: 8 additions & 0 deletions components/bpmn-q/modeler-component/editor/modeling/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import NeutralElementColors from "./NeutralElementColors";
import ModelerRules from "./ModelerRules";

export default {
__init__: ["neutralElementColors", "modelerRules"],
neutralElementColors: ["type", NeutralElementColors],
modelerRules: ["type", ModelerRules],
};
Loading

0 comments on commit 4e81b4f

Please sign in to comment.