• create a flow manager

    Returns "flow".Manager

    Example

    import * as flow from 'flow';

    let mng = flow.newManager();

    // get flow
    let flow0 = mng.getById("000y0000");
    let flow1 = mng.getByNameVersion("xx__flow1", "1.0.1");
    console.log(flow0.id);
    console.log(flow1.name);

    // update flow
    flow0.description = "desc"
    // If a compilation error is reported after modification, the modification will be rolled back
    let result0 = mng.updateById("000y0000", flow0, {"option":false});
    flow0.description = "desc2"
    // If a compilation error is reported after modification, it will still be modified
    mng.updateById("000y0000", flow0, {"option":true});
    flow1.label = "label"
    let result1 = mng.updateByNameVersion("xx__flow1", "1.0.1", flow1, {"option":false});

    // active flow
    mng.changeActiveById("000y0000", true);
    // deactive flow
    mng.changeActiveByNameVersion("xx__flow1", "1.0.1", false);

    // delete flow
    mng.deleteById("000y0000");
    mng.deleteByNameVersion("xx__flow1", "1.0.1");

    // create flow
    flow0.name = "createFlow0"
    mng.createFlow(flow0);

    // update extRef
    mng.updateExtRefById("000y0000", "ref");
    mng.updateExtRefByNameVersion("xx__flow1", "1.0.1", "ref");