Skip to content
Snippets Groups Projects
user avatar
StarryScythe authored
tested exporting into .svg for topic transition - seems to work fine? (see test.svg); normal page has pnml_type PageNode, so its unclear if this was supposed to be the NodePage type or just normal pages, which are a type of nodes? in case this is just a renaming problem, the issues #6 and #4 are not really issues at all, otherwise only a new page type has to be declared that is basically just another page.. I will be seeing to the remaining problems: issue #2 is a huge hazard, the package was build from an examle without renaming the actual package and references, so now it is hard to see, which references are to actual other packages and which ones were just copied blindly
c488983e
History

PNML-Editor

Prerequisites

The following libraries/frameworks need to be installed on your system:

The examples are heavily interweaved with Eclipse Theia, so please also check the prerequisites of Theia.

Theia Version compatibility

This project template is compatible with Theia >=1.39.0.

Building the Editor

The server component is built with maven and the client component is built with yarn. A convenience script to build both is provided. To build all components execute the following in the directory containing this README:

yarn build

In addition, it is also possible to build each component individually:

# Build only the glsp-client
yarn build:client

# Build only glsp-server
yarn build:server

Or you can use the available VSCode tasks configured in the workspace (via Menu Terminal > Run Task...)

  • Build TaskList GLSP Server
  • Build TaskList GLSP Client example

Running the Editor

To start the Theia browser application with the integrated tasklist example, navigate to the client directory

cd glsp-client

and then execute:

yarn start

This will launch the example in the browser with an embedded GLSP server on localhost:3000. From there the file glsp-client/workspace/example.pnml can be opened.

Watch the TypeScript packages

To run TypeScript in watch-mode so that TypeScript files are compiled as you modify them via CLI:

yarn watch

or the VSCode task Watch TaskList GLSP Client example.

MQTT Messages

The broker can be changed by modifying the "broker" filed in the class glsp-server/src/main/java/org/eclipse/glsp/example/javaemf/MQTT/MQTTClient.java

Three different kinds of messages can be sent:

  • filling places with tokens

    • topic name: fillPlace
    • topic JSON format: {"placeId": place id as string, "tokens": array of token strings}
    • example: {"placeId": "cd0bae27-ab7a-4647-85d3-b1bb2b3dcd60", "tokens": ["aaaa", "bbbb"]}
  • firing transitions

    • topic name: fireTransition
    • topic JSON format: {"transitionId": transition id as string, "tokens": {placeId: Array of token strings}} -example: {"transitionId": "7c12def4-f37f-4948-96c7-a248088d1bee", "tokens": {02cb7814-11e3-496b-9d6a-4be829073826: ["Hund", "Katze"], "c784ac65-fd96-4158-9ba2-c27527a5d69e": ["Dativ"]}}
  • changing the value of input signals

    • topic name: name of the signal
    • topic format: Boolean value
    • example: topic: "Red" ; content: "true"

The examples can be executed as they are on the example in the workspace folder.

Tina

The repository does not contain the bin files of tina. They have to be manually added to the appropriate location in libs/tina-3.8.0. Tina functionality has not been tested on linux.