paed01/bpmn-engine

Demo site

Closed this issue · 4 comments

papyr commented

Hello Since Azure has free sites, can you add a demo site

Good idea! but I'm more of a backender and struggle with styling as if it was an alien language. But I'm happy to assist if someone else have a go.

have a look at http://bpmn.omniworkflow.com as an example

papyr commented

@ralphhanna very nice can you please share the script and also how to customize it. It would look beautiful if we could add bootstrap. I can do this if they components match easily.

papyr commented

Hello @ralphhanna its pretty straight forward you can do it in either the drawing page they have, or just use this code and configuration sample


for e.g.

    const { configuration }  = require('../configuration.js');
    const { BPMNServer, Logger } = require('bpmn-server');

    const logger = new Logger({ toConsole: true });

    const server = new BPMNServer(configuration, logger);

    const engine = server.engine;

    let response = await engine.start('Buy Used Car');

    const items = response.items.filter(item => {
        return (item.status == 'wait');
    });

    items.forEach(item => {
        console.log(`  waiting for <${item.name}> -<${item.elementId}> id: <${item.id}> `);
    });
    const itemId = items[0].id;

    console.log(`Invoking Buy id: <${itemId}>`);

    const input={ model: 'Thunderbird', needsRepairs: false, needsCleaning: false };
    response = await engine.invoke({items: { id: itemId } }, input );

    console.log("Ready to drive");