imicros-flow-control

0.0.12 • Public • Published

imicros-flow-control

Coverage Status

Moleculer services for process definitions and control of imicros-flow

Installation

$ npm install imicros-flow-control --save

Dependencies / Requirements

Requires a running neo4j node/cluster.

Usage Controller Service

const { ServiceBroker } = require("moleculer");
const { Controller } = require("imicros-flow-control");

broker = new ServiceBroker({
    logger: console
});
broker.createService(Controller, Object.assign({ 
    name: "v1.flow.control",
    settings: { 
        db: {
            uri: process.env.URI,
            user: "neo4j",
            password: "neo4j"
        }
    }
}));
broker.start();

Actions

  • deployProcess { processId(optional), name } => { processId, versionId } name - name of object in object store. The object must be a valid bpmn xml file
  • activateVersion { processId, versionId } => { processId, versionId }
  • getProcesses { } => [{ processId, versionId, name }]
  • getVersions { processId } => [{ processId, versionId, name }]

Usage Query Service

const { ServiceBroker } = require("moleculer");
const { Query } = require("imicros-flow-control");

broker = new ServiceBroker({
    logger: console
});
broker.createService(Query, Object.assign({ 
    name: "v1.flow.query",
    settings: { 
        db: {
            uri: process.env.URI,
            user: "neo4j",
            password: "neo4j"
        }
    }
}));
broker.start();

Actions

  • next { processId, elementId } => [{ processId, ownerId, uid, type }]
  • previous { processId, elementId } => [{ processId, ownerId, uid, type }]
  • subscriptions { eventName } => [{ processId, elementId, ownerId, type, attributes }]
  • getEvent { processId, elementId } => [{ processId, versionId, type, name, uid, ownerId, position, direction, interaction, from, to, attributes }]
  • getSequence { processId, elementId } => [{ processId, versionId, type, uid, ownerId, from, to, attributes }]
  • getTask { processId, elementId } => [{ processId, versionId, type, name, uid, ownerId, attributes }]
  • getGateway { processId, elementId } => [{ processId, versionId, type, name, uid, ownerId, attributes }]
  • getElements { processId, versionId } => [{ processId, elementId, type, uid, ownerId }]

Package Sidebar

Install

npm i imicros-flow-control

Weekly Downloads

4

Version

0.0.12

License

MIT

Unpacked Size

154 kB

Total Files

26

Last publish

Collaborators

  • al66