bpmnServer / bpmn-server

BPMN 2.0 server for Node.js , providing modeling, execution, persistence and monitoring for Workflow. along with sample UI. Intended to be developers workbench for BPMN 2.0
MIT License
186 stars 48 forks source link

Any type on item #219

Open linonetwo opened 4 months ago

linonetwo commented 4 months ago

图片

on

import { Execution, IServiceProvider } from 'bpmn-server';

export const twServiceProvider: IServiceProvider = {
  'log-console'(input: Record<string, unknown>, _execution: Execution) {
    console.log('log-console service called:', input);
    return {
      a: 'b',
    }
  },
  a: {
    b: (input: Record<string, unknown>, execution: Execution) => {
      console.log(`b is called with ${JSON.stringify(input)} and last output is ${JSON.stringify(execution.item.token.lastItem.output)}`);
    },
  },
};

There are still many missing types on important types like item and token...

linonetwo commented 4 months ago

I'm working on this, add more types.