Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Getting Started and Distributions docs #10

Merged
merged 4 commits into from
Feb 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
!dist
.github
docs
tasks
test
.eslintignore
.eslintrc
coverage
.github
karma.config.js
.babelrc
!dist
tasks
karma.*.js
rollup.config.js
coverage
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Changelog

All notable changes to [camunda-bpmn-js](https://github.com/camunda/camunda-bpmn-js) are documented here. We use [semantic versioning](http://semver.org/) for releases.

## Unreleased

___Note:__ Yet to be released changes appear here._

## 0.1.0-alpha.0

* `CHORE`: first release 🎉
73 changes: 68 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,80 @@
[![CI](https://github.com/camunda/camunda-bpmn-js/workflows/CI/badge.svg)](https://github.com/camunda/camunda-bpmn-js/actions?query=workflow%3ACI)


Embeddable Camunda modeling distributions based on [bpmn-js](https://github.com/bpmn-io/bpmn-js).

🚧👷‍♀️👷‍♂️🚧
Embeddable Camunda modeling distributions based on [bpmn-js](https://github.com/bpmn-io/bpmn-js).

## Usage

...
This project is designed to deliver different BPMN modeling distributions. Instead of creating custom Modeler implementations based on [bpmn-js](https://github.com/bpmn-io/bpmn-js), choose one of the existing packages to mirror the modeling experience of [Camunda's modeling](https://github.com/camunda/camunda-modeler/) products.

Use a pre-packaged distribution

```html
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/assets/camunda-platform-modeler.css" />

<script src="https://unpkg.com/[email protected]/dist/camunda-platform-modeler.development.js"></script>
```

or install it via npm

```js
import BpmnModeler from 'camunda-bpmn-js/lib/camunda-platform/Modeler';

import 'camunda-bpmn-js/dist/assets/camunda-platform-modeler.css';
```

into your web-application.

```js
var bpmnModeler = new BpmnModeler({
container: '#canvas',
propertiesPanel: {
parent: '#properties'
}
});

try {

await bpmnModeler.importXML(someDiagram);

console.log('success!');
viewer.get('canvas').zoom('fit-viewport');
} catch (err) {

console.error('something went wrong:', err);
}
```


Checkout [the docs](./docs/DISTRIBUTIONS.md) to learn more about the available distributions.
## Build and Run

...

Prepare the project by installing all dependencies:

```sh
npm install
```

Then, depending on your use-case, you may run any of the following commands:

```sh
# build the library and run all tests
npm run all

# spin up a single local camunda platform modeler instance
npm run start:platform

# run the full development setup
npm run dev
```

## Related

camunda-bpmn-js builds on top of a few powerful tools:

* [bpmn-js](https://github.com/bpmn-io/bpmn-js): View and edit BPMN 2.0 diagrams in the browser
* [diagram-js](https://github.com/bpmn-io/diagram-js): Diagram rendering and editing toolkit

## License

Expand Down
84 changes: 84 additions & 0 deletions docs/DISTRIBUTIONS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Distributions

This document lists and describes all available distributions.

## Base Modeler

This delivers the basic BPMN modeling experience of the [Camunda Modeler](https://github.com/camunda/camunda-modeler/), without any process engine specific behaviors.

This includes a set of extension modules, as follows

* [diagram-js-minimap](https://github.com/bpmn-io/diagram-js-minimap) - A minimap for diagram-js
* [diagram-js-origin](https://github.com/bpmn-io/diagram-js-origin) - A point of origin cross and contour for diagram-js (disabled as default)
* [@bpmn-io/align-to-origin](https://github.com/bpmn-io/align-to-origin) - Nicely align your diagrams to the coordinate origin (enabled as default)
* [bpmn-js-executable-fix](https://github.com/bpmn-io/bpmn-js-executable-fix) - bpmn-js extension which makes sure that `isExecutable` is set on `bpmn:Process`
* [bpmn-js-signavio-compat](https://github.com/bpmn-io/bpmn-js-signavio-compat) - Interoperate with Signavio exported diagrams
* [bpmn-js-disable-collapsed-subprocess](https://github.com/bpmn-io/bpmn-js-disable-collapsed-subprocess) - A bpmn-js extension which disables modeling collapsed subprocess via replace menu
* [bpmn-js-properties-panel](https://github.com/bpmn-io/bpmn-js-properties-panel) - A properties panel extension for bpmn-js that adds the ability to edit technical properties
* a generic [BPMN properties provider](https://github.com/bpmn-io/bpmn-js-properties-panel/tree/master/lib/provider/bpmn)

Install and import the Modeler via npm to include it in your application.

```js
import BpmnModeler from 'camunda-bpmn-js/lib/base/Modeler';

import 'camunda-bpmn-js/dist/assets/base-modeler.css';

var bpmnModeler = new BpmnModeler({
container: '#canvas',
propertiesPanel: {
parent: '#properties'
}
});
```

## Camunda Platform Modeler

This delivers a distribution to mirror the modeling experience of the Camunda Modeler to work on the Camunda Platform.

The Modeler includes all extensions provided by the [base distribution](#base-modeler). To provide the Camunda Platform specific properties, it includes additionally:

* [camunda-bpmn-moddle](https://github.com/camunda/camunda-bpmn-moddle) - Camunda moddle extensions for BPMN 2.0
* a Camunda specific [BPMN properties provider](https://github.com/bpmn-io/bpmn-js-properties-panel/tree/master/lib/provider/camunda)

```js
import BpmnModeler from 'camunda-bpmn-js/lib/camunda-platform/Modeler';

import 'camunda-bpmn-js/dist/assets/camunda-platform-modeler.css';

var bpmnModeler = new BpmnModeler({
container: '#canvas',
propertiesPanel: {
parent: '#properties'
}
});
```

## Camunda Cloud Modeler

This delivers a distribution to mirror the modeling experience of the Camunda Modeler to work on Camunda Cloud. It provides all modeling extensions that were previously part of the [Zeebe Modeler](https://github.com/zeebe-io/zeebe-modeler) application.

The Modeler includes all extensions provided by the [base distribution](#base-modeler). To provide the Camunda Cloud specific properties, it includes additionally:

* [zeebe-bpmn-moddle](https://github.com/zeebe-io/zeebe-bpmn-moddle) - Zeebe moddle extensions for BPMN 2.0
* a Zeebe specific [BPMN properties provider](https://github.com/camunda/camunda-bpmn-js/tree/main/lib/camunda-cloud/features/properties-provider)
* several Zeebe specific [modeling controls and behaviors](https://github.com/camunda/camunda-bpmn-js/tree/main/lib/camunda-cloud/features)

```js
import BpmnModeler from 'camunda-bpmn-js/lib/camunda-cloud/Modeler';

import 'camunda-bpmn-js/dist/assets/camunda-cloud-modeler.css';

var bpmnModeler = new BpmnModeler({
container: '#canvas',
propertiesPanel: {
parent: '#properties'
}
});
```

## Build your own

By design, bpmn-js applications are easy to extend. Therefore it's possible to build your own Modeler out of the provided packages.

Refer to the [bpmn-js-examples](https://github.com/bpmn-io/bpmn-js-examples) directory to get some inspiration.