npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@emaarco/bpmn-js-data-simulation

v0.7.1

Published

Simulate BPMN processes with data in bpmn-js-token-simulation — scenarios, process variables, io mappings and gateway conditions evaluated in the engine's expression language.

Readme

@emaarco/bpmn-js-data-simulation

npm CI License: MIT

A Bike Order process starts from a scenario, its gateways decide by the data and a card shows why "Credit OK?" took "yes"; a Fleet Order then assembles four bikes in parallel and delivers to two sites one after the other, with a tag counting the instances; finally, in the demo's what-if panel, dragging the order total above 5,000 sends the path through the manual review

Show which path a process takes for real data, right in bpmn-js.

An add-on for the bpmn-js token simulation whose gateways decide by their conditions, the way Zeebe or Camunda 7 would. Pre-1.0: a minor release may still change the API.

Why

Seeing the path a process takes for given data usually means deploying it. The token simulation needs no engine, but you click every gateway and it ignores conditions and mappings. This add-on evaluates them in the modeler, viewer or slide your readers see, within known limits.

What you get

  • See why a path is taken: gateways that decided turn green, and a card lists each condition, its result and the values it read.
  • Show the path without running it: pathSimulation.simulate(variables) marks the path the exclusive and inclusive gateways take, for example behind a slider, even in a plain viewer without the token simulation (path simulation).
  • Start from a scenario: the token simulation's ▶ opens a dialog prefilled from a scenario file that also mocks task results.
  • Run multi-instance activities: a parallel or sequential multi-instance task or sub-process runs one instance per item of its collection, with a dot per instance on the activity (multi-instance).
  • Fail visibly: if no flow matches or a condition fails, the token stops at a red gateway, like an incident.
  • Works in modelers and viewers: one more module next to the token simulation.

Supported engines

The engine option, 'zeebe' by default, picks how conditions and mappings are read:

| Engine | engine | Conditions | Mappings | | ------------------------------ | ------------ | ------------------------------------------------------------------------------------------------------- | --------------------- | | Zeebe (Camunda 8) | 'zeebe' | FEEL | zeebe:ioMapping | | Camunda 7, Operaton, CIB seven | 'camunda7' | JUEL subset | camunda:inputOutput |

Conditions it cannot evaluate, such as JUEL method calls or scripts, fall back to a click and end the what-if path (Engines).

Install

npm install @emaarco/bpmn-js-data-simulation bpmn-js-token-simulation zeebe-bpmn-moddle

It needs bpmn-js 18 or newer; for Camunda 7, install camunda-bpmn-moddle instead of zeebe-bpmn-moddle. The full simulation needs bpmn-js-token-simulation in your own dependencies, as above; it is an optional peer, so npm does not add it for you.

For the path alone (PathSimulationModule), leave the token simulation out:

npm install @emaarco/bpmn-js-data-simulation zeebe-bpmn-moddle

Get started

  1. Register the module next to the token simulation:

    import BpmnModeler from 'bpmn-js/lib/Modeler'
    import TokenSimulationModule from 'bpmn-js-token-simulation'
    import DataSimulationModule from '@emaarco/bpmn-js-data-simulation'
    import zeebeModdle from 'zeebe-bpmn-moddle/resources/zeebe.json'
    import 'bpmn-js-token-simulation/assets/css/bpmn-js-token-simulation.css'
    import '@emaarco/bpmn-js-data-simulation/assets/bpmn-js-data-simulation.css'
    
    const modeler = new BpmnModeler({
      container: '#canvas',
      additionalModules: [TokenSimulationModule, DataSimulationModule],
      moddleExtensions: { zeebe: zeebeModdle },
      dataSimulation: { engine: 'zeebe' },
    })

    For a viewer or Camunda 7, swap the imports as in Usage.

  2. Turn on the Token Simulation switch at the top left and press ▶ on a start event.

  3. Fill in the variables, start, and hover a gateway to see why it decided.

From code, modeler.get('pathSimulation').simulate({ orderTotal: 6800 }) marks the path instead; a viewer with only PathSimulationModule does the same without the token simulation. Full walk-through: Usage.

Help and feedback

Contributing

Contributions are welcome; see CONTRIBUTING.md.

Credits

License

MIT © Marco Schäck