Token simulation playback

@nikku Is there any way to save the event log of the token simulation in a way that a playback is possible (without having to trigger the play buttons for events, gateway selections, etc.)?

Of course the token simulation can be recorded as video, but that is comparably heavy and prevents any interaction like zoom in/out.

Btw. what is the easiest way for you to create the animated gifs that are used to showcase examples? So far I haven’t found a nice way and any hint would be appreciated.

Yes there is. Essentially any test case is a play back scenario.

Details however really depend on your case. What do you need the record + playback for? How much human interaction is required?

Btw. what is the easiest way for you to create the animated gifs that are used to showcase examples?

I’m a GIF dude so I setup my very own little recording facilities. There does exist a couple of good recording tools out there, simply search for them (depending on your OS).

1 Like

I am currently still exploring the possibilities and the current advances in the token simulation project are opening multiple avenues (kudos). Some of the use cases I see for me:

  • Integration in Reveal.js for slidedecks explaining BPMN (possibly via a new plugin for Reveals.js). Here, it would be nice to be able to showcase different token flows for the same process without any user interaction except for start playback/stop playback.
  • Tutorials for custom extensions of BPMN for which the token flow at custom elements may have a special behaviour.
  • Visualisation of token flows logged from an execution engine.

I’ll try to understand the test case implementation and will see whether I can make any of the above work.

The logic with triggerElement( name ) and await elementEnter( name ) looks quite intuitive. But where would I put this if I have a setup like this?

var modeler = new BpmnModeler({
  container: '#canvas',
  propertiesPanel: {
    parent: '#properties-panel'
  },
  additionalModules: [
   propertiesPanelModule,
   TokenSimulationModule
  ],
});

modeler.importXML( sampleProcess );

KUDOs to you, too, for giving it a try! It is feature complete since v0.25.0 so a good time to play around with it.

It should be fairly easy for you to extract what is in that test to a re-usable component.

For experimental purposes I’ve done that in this codesandbox. What you get as a result is a click-and-play experience.

capture.SbFRc9_optimized

Drive the process via API:

const simulationSupport = modeler.get("simulationSupport");

// toggle pause on activity
simulationSupport.triggerElement("Activity_1jmvmoa");

// start simulation
simulationSupport.triggerElement("StartEvent_1");

await simulationSupport.elementEnter("Activity_1jmvmoa");

window.alert("WANT ME TO CONTINUE?");

// trigger un-pause
simulationSupport.triggerElement("Activity_1jmvmoa");
1 Like

Released as a dedicated module with token-simulation@0.26.0.

1 Like