Interface BPMDefinitionClient

interface BPMDefinitionClient {
    activate(defID): void;
    create(data): BPMMetaDataCompileInfo;
    createNewVersion(data): BPMMetaDataCompileInfo;
    deactivate(defID): void;
    delete(defID): number;
    queryByCondition(condition?): BPMMetadataDefinition[];
    queryByID(defID): BPMMetadataDefinitionDetail;
    queryList(): BPMMetadataDefinition[];
    update(defID, data): BPMMetaDataCompileInfo;
}

Methods

  • 激活指定的流程定义

    Parameters

    • defID: string

      bpm definition id

    Returns void

    Example

    import * as bpmmeta from 'bpmmeta';
    let client = bpmmeta.newBPMDefinitionClient()
    let res = client.activate(defId)
  • 创建一个bpm流程定义

    Parameters

    Returns BPMMetaDataCompileInfo

    include bpm definition compile info and record id

    Example

    import * as bpmmeta from 'bpmmeta';
    let client = bpmmeta.newBPMDefinitionClient();
    client.create({
    "name":"bpmNameTest",
    "startEvents": [
    {
    "connector": "userTask",
    "connectorPoint": "{\"fromPort\":\"R1\",\"toPort\":\"L1\",\"joints\":[\"174 80\",\"238 80\",\"238 75\"]}",
    "label": "Start",
    "locationX": 125,
    "locationY": 80,
    "name": "start",
    "type": "Start",
    "startType": "",
    "renderType": "",
    "render": "",
    "document": "",
    "description": ""
    }
    ],
    ...
    });
  • 创建一个新的bpm流程定义版本

    Parameters

    Returns BPMMetaDataCompileInfo

    include bpm definition compile info and record id

    Example

    import * as bpmmeta from 'bpmmeta';
    let client = bpmmeta.newBPMDefinitionClient();
    client.createNewVersion({
    "name":"bpmNameTest",
    "startEvents": [
    {
    "connector": "userTask",
    "connectorPoint": "{\"fromPort\":\"R1\",\"toPort\":\"L1\",\"joints\":[\"174 80\",\"238 80\",\"238 75\"]}",
    "label": "Start",
    "locationX": 125,
    "locationY": 80,
    "name": "start",
    "type": "Start",
    "startType": "",
    "renderType": "",
    "render": "",
    "document": "",
    "description": ""
    }
    ],
    ...
    });
  • 禁用指定的流程定义

    Parameters

    • defID: string

      bpm definition id

    Returns void

    Example

    import * as bpmmeta from 'bpmmeta';
    let client = bpmmeta.newBPMDefinitionClient()
    let res = client.deactivate(defId)
  • 删除指定的流程定义

    Parameters

    • defID: string

      bpm definition id

    Returns number

    Example

    import * as bpmmeta from 'bpmmeta';
    let client = bpmmeta.newBPMDefinitionClient()
    let res = client.delete(defId)
  • 根据id查询bpm定义

    Parameters

    • defID: string

      bpm definition id

    Returns BPMMetadataDefinitionDetail

    Example

    import * as bpmmeta from 'bpmmeta';
    let client = bpmmeta.newBPMDefinitionClient()
    let res = client.queryByID(defId)
  • 查询bpm流程定义列表

    Returns BPMMetadataDefinition[]

    Example

    import * as bpmmeta from 'bpmmeta';
    let client = bpmmeta.newBPMDefinitionClient();
    client.queryList({
    "like":true,
    "name":"BpmName",
    "limit":10,
    "skip":0,
    "active":true
    })
  • 更新指定的流程定义

    Parameters

    Returns BPMMetaDataCompileInfo

    Example

    import * as bpmmeta from 'bpmmeta';
    let client = bpmmeta.newBPMDefinitionClient()
    let res = client.update(defId,{
    "name":"bpmNameTest",
    "startEvents": [
    {
    "connector": "userTask",
    "connectorPoint": "{\"fromPort\":\"R1\",\"toPort\":\"L1\",\"joints\":[\"174 80\",\"238 80\",\"238 75\"]}",
    "label": "Start",
    "locationX": 125,
    "locationY": 80,
    "name": "start",
    "type": "Start",
    "startType": "",
    "renderType": "",
    "render": "",
    "document": "",
    "description": ""
    }
    ],
    ...
    })