HTTP integration and web UI for bpmn-server.
The reusable WebApp host is independent of any particular workflow
application. An application supplies its own workflow definitions,
configuration, persistence adapters and service implementations through a
WorkflowApplication. The bundled src/sample-app provides the standalone
demo configuration only.
- Node.js >= 10.x
- NPM >= 6.x
- MongoDB >= 4.x
Setup .env with your mongodb connection string like so:
# PORT # for express application
PORT=3000
#API_KEY is used for remote access
API_KEY=12345
API_SERVICE_USER_NAME=integration
API_SERVICE_USER_GROUPS=SYSTEM
# Optional scope for a tenant service account:
# API_SERVICE_TENANT_ID=tenant-a
# API_SERVICE_MODELS_OWNER=tenant-a
# Separate credential for definition/model administration
ADMIN_API_KEY=replace-with-a-different-secret
# MongoDB Settings
MONGO_DB_URL=mongodb://0.0.0.0:27017/bpmn
#
... more settings/api2 uses this configured service identity for every API-key request. The
user object in a request body is ignored. Set the groups and optional tenant
to the permissions the integration needs. The legacy /api routes remain a
privileged API-key interface.
Install dependencies
git clone https://github.com/bpmnServer/bpmn-web.git
npm install
npm run setupStart the bundled sample application with:
npm startimport { WebApp, defineWorkflowApplication } from 'bpmn-web';
import { configuration } from './workflow/configuration.js';
const workflowApplication = defineWorkflowApplication({ configuration });
const webApp = new WebApp(workflowApplication);
webApp.start();Constructing WebApp composes the Express application and workflow runtime.
Calling start() is explicit, so tests or a larger application can mount
webApp.app without opening another listener.