Module: @proceed/bpmn-helper

Methods

(async, inner) addCallActivityReference(bpmn, callActivityId, calledBpmn, calledProcessLocation) → {string|object}

Add meta information of the called bpmn process to the bpmn file where it's getting called from. This includes a custom namespace in the definitions part, an import element as first child of definitions and the calledElement attribute of the call activity bpmn element

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

callActivityId String

The ID of the call activity bpmn element

calledBpmn String

The bpmn file of the called process

calledProcessLocation String

The DefinitionId of the calledBpmn. Combination of process name and process id

Source:
Returns:

the BPMN process as XML string or BPMN-Moddle Object based on input

Type
string | object

(async, inner) addConstraintsToElement(element, cons)

Adds the given constraint to the given bpmn element

Parameters:
Name Type Description
element Object

the bpmn BPMN-Moddle element

cons Object

object containing the hardConstraints and softConstraints

Source:

(async, inner) addConstraintsToElementById(bpmn, elementId, constraints) → {string|object}

Adds the given constraints to the bpmn element with the given id

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

elementId string
constraints Object

object containing the hardConstraints and softConstraints

Source:
Returns:

the BPMN process as XML string or BPMN-Moddle Object based on input

Type
string | object

(async, inner) addDocumentation(bpmn, description) → {string|object}

Adds a documentation element to the first process in the process definition

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

description string

the content for the documentation element

Source:
Returns:

the BPMN process as XML string or BPMN-Moddle Object based on input

Type
string | object

(async, inner) addDocumentationToProcessObject(processObj, description)

Adds documentation to a given process object

Parameters:
Name Type Description
processObj Object
description String
Source:

(async, inner) addSubprocessContentToProcessXML(mainProcessBPMN, subprocessBPMN, subprocessId)

Adds content of a subprocess into the main process in which the subprocess is used

Parameters:
Name Type Description
mainProcessBPMN string

the process definition as XML string

subprocessBPMN string

the content of the subprocess as XML string

subprocessId string

ID of the subprocess in which the content should be inserted

Source:

(inner) ensureCorrectProceedNamespace(xml)

Sets the xmlns:proceed attribute in the definitions element of the bpmn to the one expected in our custom schema

This is to make sure that importing the xml with bpmn-moddle will not lead to every proceed element being prefixed with ns0

Parameters:
Name Type Description
xml String
Source:

(inner) ensureExtensionElements(element) → {Object}

Returns the extensionElements entry inside the given element (creates one if there isn't one already)

Parameters:
Name Type Description
element Object

the element we want the extensionElements entry of

Source:
Returns:

the extensionElements entry

Type
Object

(inner) ensureMetaElement(element) → {Object}

Returns the meta entry inside a given element (creates it if there isn't already one)

Parameters:
Name Type Description
element Object

the element we want the meta entry of

Source:
Returns:

the meta entry

Type
Object

(inner) generateBpmnId(prefixopt) → {string}

Generate a new ID for PROCEED BPMN elements

Parameters:
Name Type Attributes Description
prefix String <optional>

optional prefix for the id

Source:
Returns:

short id in the form '0bkz1kb'

Type
string

(inner) generateDefinitionsId() → {string}

Generate a new ID for the 'definitions' element in a PROCEED process

Source:
Returns:

a new PROCEED definitions 'id'

Type
string

(inner) generateUserTaskFileName()

Generates the 'fileName' attribute string of a PROCEED UserTask

Source:
Returns:

A new 'filename' value

(async, inner) getAllBpmnFlowElementIds(bpmn) → {Promise.<Array.<String>>}

Gets the Id of every Task|Event|Gateway|CallActivity|SubProcess|SequenceFlow inside a BPMN process

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

Ids of every element inside a BPMN process

Type
Promise.<Array.<String>>

(async, inner) getAllBpmnFlowElements(bpmn) → {Promise.<Array.<object>>}

Gets every Task|Event|Gateway|CallActivity|SubProcess|SequenceFlow inside a BPMN process

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

every element inside a BPMN process

Type
Promise.<Array.<object>>

(async, inner) getAllBpmnFlowNodeIds(bpmn) → {Promise.<Array.<String>>}

Gets the Id of every Task|Event|Gateway|CallActivity|SubProcess inside a BPMN process

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

Ids of every element inside a BPMN process

Type
Promise.<Array.<String>>

(inner) getAllElements(travObj) → {array}

A function that given a traversable object returns all occurences

Parameters:
Name Type Description
travObj object

the object we want to search in

Source:
Returns:
  • all nodes within the object
Type
array

(async, inner) getAllUserTaskFileNamesAndUserTaskIdsMapping(bpmn) → {Promise.<{'': ''}>}

Creates a map (object) that contains the 'fileName' (key) and UserTask-IDs (value) for every UserTask in a BPMN process.

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

A map (object) that returns for every UserTask the 'fileName' (key) and UserTask-IDs (value)

Type
Promise.<{'': ''}>

(inner) getChildren(travObj) → {array}

Finds all kinds of childnodes in a given node

Parameters:
Name Type Description
travObj object

object of which we want to know the childnodes

Source:
Returns:

all childnodes of the given node

Type
array

(async, inner) getChildrenFlowElements(bpmn) → {Promise.<Array.<object>>}

Gets first-level child flow Elements Task|Event|Gateway|CallActivity|SubProcess|SequenceFlow of a process/subprocess

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

every child element inside a process/subprocess

Type
Promise.<Array.<object>>

(async, inner) getDefinitionsAndProcessIdForEveryCallActivity(bpmn) → {Promise.<{'': {definitionId: string, processId: string}}>}

Get all definitionIds for all imported Processes used in callActivities

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Throws:

see function: getTargetDefinitionsAndProcessIdForCallActivityByObject

Returns:

an object (a map) with all callActivityIds as keys

Type
Promise.<{'': {definitionId: string, processId: string}}>

(async, inner) getDefinitionsId(bpmn) → {Promise.<string>}

Returns id of the given process definition

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

The id stored in the definitions field of the given bpmn process

Type
Promise.<string>

(async, inner) getDefinitionsInfos(bpmn) → {Promise.<DefinitionsInfos>}

Gets the 'definitions' root element from the given BPMN XML

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

The 'definitions' root element with some selected attributes

Type
Promise.<DefinitionsInfos>

(async, inner) getDefinitionsName(bpmn) → {Promise.<string>}

Returns the name of the given bpmn process definition

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:
  • The name stored in the definitions field of the given bpmn process
Type
Promise.<string>

(async, inner) getDeploymentMethod(bpmn) → {Promise.<string>}

Gets deployment method of the given process

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

the deployment method used for the given process

Type
Promise.<string>

(inner) getElementById(travObj, id) → {object|undefined}

A function that given a traversable object returns the nested object with the given id

Parameters:
Name Type Description
travObj object

the object we want to search in

id string

the id of the object we want to find

Source:
Returns:
  • returns the found object or undefined when no matching object was found
Type
object | undefined

(inner) getElementDI(element, definitionsopt)

Gets the diagram element for the given model element

Parameters:
Name Type Attributes Description
element Object

the model element

definitions Object <optional>

the definitions object to search in

Source:

(async, inner) getElementMachineMapping(bpmn) → {Promise.<Object>}

Returns a mapping of the ids of the process nodes to the machines they are mapped to

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

the mapping from a node id to information about the machine it is mapped to

Type
Promise.<Object>

(inner) getElementsByTagName(travObj, tagname) → {array}

A function that given a traversable object returns all occurences of a given tagName

Parameters:
Name Type Description
travObj object

the object we want to search in

tagname string

the name we are searching for

Source:
Returns:
  • all nodes with the given tagName
Type
array

(inner) getExporterName() → {string}

Exporter name is used in the bpmn definitions parts

Source:
Returns:

static exporter name

Type
string

(inner) getExporterVersion() → {string}

Exporter version is used in the bpmn definitions parts

This version should be adjusted when this module (bpmn-helper) changes or any changes in the management-system occur regarding the export

Source:
Returns:

static exporter version

Type
string

(async, inner) getIdentifyingInfos(bpmn) → {Promise.<{id: String, originalId: String, processIds: Array.<String>, name: String, description: String}>}

Returns information about the process that can be used to identify it

e.g. its unique id, original id and processIds for automatic identification and its name and description for human identification

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

object containing the identifying information

Type
Promise.<{id: String, originalId: String, processIds: Array.<String>, name: String, description: String}>

(async, inner) getImports(bpmn) → {Promise.<Array.<Object>>}

Returns an array of import elements for a given bpmn xml

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:
  • Arry of of import elements inside the given xml
Type
Promise.<Array.<Object>>

(inner) getLocationsFromElement(element) → {Object}

Parses the locations from a bpmn-moddle element

Parameters:
Name Type Description
element Object
Source:
Returns:

object with all locations

Type
Object

(async, inner) getMetaData(bpmn, elId) → {object}

Get the meta information of an element

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

elId String

the id of the element to update

Source:
Returns:

the meta information

Type
object

(inner) getMetaDataFromElement(element) → {Object}

Parses the meta data from a bpmn-moddle element

Parameters:
Name Type Description
element Object
Source:
Returns:

key value list of meta values

Type
Object

(inner) getMilestonesFromElement(element) → {Array}

Parses the milestones from a bpmn-moddle element

Parameters:
Name Type Description
element Object
Source:
Returns:

array with all milestones

Type
Array

(async, inner) getMilestonesFromElementById(bpmn, elementId) → {Array}

Get the milestones for given element id

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

elementId String

the id of the element

Source:
Returns:

array with all milestones

Type
Array

(async, inner) getOriginalDefinitionsId(bpmn) → {Promise.<string>|Promise.<undefined>}

Returns the value of the originalId attribute in the given process definition the originalId is the id the process had before it was imported

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

The originalId stored in the definitions field of the given bpmn process

Type
Promise.<string> | Promise.<undefined>

(async, inner) getProcessConstraints(bpmn) → {Promise.<{hardConstraints: Array, softConstraints: Array}>}

Get the Constraints of the BPMN process. (The Constraint XML elements are defined in the PROCEED XML Schema and are not standardized in BPMN.)

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
See:
Returns:

An Object (a map) where all keys are the BPMN element ids and the value is an object with the hard and soft Constraint Arrays

Type
Promise.<{hardConstraints: Array, softConstraints: Array}>

(async, inner) getProcessDocumentation(bpmn) → {Promise.<String>}

Get the content of the 'documentation' element of the first process inside a BPMN file.

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

the documentation content

Type
Promise.<String>

(inner) getProcessDocumentationByObject(processObject) → {String}

Get the content of the 'documentation' element of the given process object.

Parameters:
Name Type Description
processObject Object

a process element as BPMN-Moddle Object

Source:
Returns:

the documentation content

Type
String

(async, inner) getProcessIds(bpmn) → {Promise.<Array.<String>>}

Get all process ids from a BPMN definitions/object. (A BPMN file can contain multiple 'process' elements inside its 'definitions' element.)

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

An Array with Strings containing all IDs from every 'process' element

Type
Promise.<Array.<String>>

(inner) getResourcesFromElement(element) → {Object}

Parses the resources from a bpmn-moddle element

Parameters:
Name Type Description
element Object
Source:
Returns:

object with all resources

Type
Object

(inner) getRootFromElement(businessObject)

Returns the definitions object of the process

Parameters:
Name Type Description
businessObject Object

the businessObject of a process element

Source:

(async, inner) getStartEvents(bpmn) → {Promise.<Array.<String>>}

Function that returns ids of all start events in a bpmn process model

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

the ids of all startEvents

Type
Promise.<Array.<String>>

(async, inner) getSubprocess(bpmn, subprocessId) → {Promise.<string>}

Returns a xml with Diagram Elements just from the given subprocess and their nested Processes

Structure of XMl: Defintions

  • Process
    • FlowElements of the Process (BPMN Part)
  • Process End
  • Diagram (How to visualize the XML in the viewer) Definitions End

This function only remove all Diagram Parts that are not part of the subprocess - the flowElements are still part of the xml

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

subprocessId string

id of subprocess you want to show

Source:
Returns:

BPMN xml with only diagram parts for the subprocess

Type
Promise.<string>

(async, inner) getSubprocessContent(bpmn, subprocessId) → {string}

Returns a xml with elements inside given subprocess

Structure of XMl: Defintions

  • Process -FlowElements of the Process (BPMN Part)
  • Process End
  • Diagram (How to visualize the XML in the viewer) Definitions End

This function removes all Diagram Parts and flowElements that are not part of the subprocess

Parameters:
Name Type Description
bpmn string

the process definition of the main process as XML string or BPMN-Moddle Object

subprocessId string

id of subprocess you want to show

Source:
Returns:
  • xml with only flowElements and diagram parts inside the subprocess
Type
string

(inner) getTargetDefinitionsAndProcessIdForCallActivityByObject(bpmnObj, callActivityId) → {Object}

Get the definitionId and processId of a target called process (callActivity)

Parameters:
Name Type Description
bpmnObj Object

The BPMN XML as converted bpmn-moddle object with toBpmnObject

callActivityId string

The id of the callActivity

Source:
See:
Throws:
  • An Error if the callActivity id does not exist

  • If the callActivity has no 'calledElement' attribute

  • If the targetNamespace for a callActivity could not be found

  • If no import element could be found for a targetNamespace

Returns:

An Object with the definition and process id

Type
Object

(async, inner) getTaskConstraintMapping(bpmn) → {Promise.<{'': {hardConstraints: Array, softConstraints: Array}}>}

Get all Constraints for every BPMN Element. (The Constraint XML elements are defined in the PROCEED XML Schema and are not standardized in BPMN.)

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
See:
Returns:

An Object (a map) where all keys are the BPMN element ids and the value is an object with the hard and soft Constraint Arrays

Type
Promise.<{'': {hardConstraints: Array, softConstraints: Array}}>

(async, inner) getUserTaskFileNameMapping(bpmn) → {Promise.<{'': {fileName: string, implementation: string}}>}

Get all fileName for all userTasks, (The attribute 'filename' is defined in the PROCEED XML Schema and not a standard BPMN attribute.)

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

an object (a map) with all userTaskIds as keys

Type
Promise.<{'': {fileName: string, implementation: string}}>

(inner) getUserTaskImplementationString() → {String}

Return the string for the 'implementation' attribute in a UserTask

Source:
Returns:

URL of the HTML spec

Type
String

(inner) initXml(processId, startEventId) → {String}

Creates a minimal valid proceed bpmn

Parameters:
Name Type Description
processId *

the id to use for the contained process

startEventId String

the id to use for the start event

Source:
Returns:

a minimal valid proceed bpmn

Type
String

(async, inner) manipulateElementById(bpmn, id, manipFunc) → {object|Promise.<string>}

Function that changes an element in the given xml using the given manipulation function

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

id string

the id of the element that should be changed

manipFunc manipulationFunction

the function that will be used to change the element

Source:
Returns:

the BPMN process as bpmn-moddle object or XML string based on input

Type
object | Promise.<string>

(async, inner) manipulateElementsByTagName(bpmn, tagName, manipFunc) → {object|Promise.<string>}

Function that changes all elements in the given xml with the given tagname using the given function

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

tagName string

the tagname of the elements we want to change, starts with 'bpmn:', e.g. 'bpmn:Definitions'

manipFunc manipulationFunction

the function that gets called on each element with a forEach-Loop

Source:
Returns:

the BPMN process as bpmn-moddle object or XML string based on input

Type
object | Promise.<string>

(async, inner) removeCallActivityReference(bpmn, callActivityId) → {string|object}

Remove the reference to the called process added in addCallActivityReference but remains the actual bpmn element

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

callActivityId String

The ID of the bpmn element for which the meta information should be removed

Source:
Returns:

the BPMN process as XML string or BPMN-Moddle Object based on input

Type
string | object

(async, inner) removeUnusedCallActivityReferences(bpmn) → {string|object}

Look up the given bpmn document for unused imports/custom namespaces which don't get referenced by a call activity inside this bpmn document.

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

the BPMN process as XML string or BPMN-Moddle Object based on input

Type
string | object

(async, inner) setDefinitionsId(bpmn, id) → {object|Promise.<string>}

Sets id in definitions element to given id, if an id already exists and differs from the new one the old id will be saved in the originalId field

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

id string

the id we want to set the definitions element to

Source:
Returns:

the modified BPMN process as bpmn-moddle object or XML string based on input

Type
object | Promise.<string>

(async, inner) setDefinitionsName(bpmn, name) → {object|Promise.<string>}

Sets name in definitions element to given name

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

name string

the id we want to set the definitions element to

Source:
Returns:

the modified BPMN process as bpmn-moddle object or XML string based on input

Type
object | Promise.<string>

(async, inner) setDeploymentMethod(bpmn, method) → {object|Promise.<string>}

Sets deployment method of a process

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

method string

the method we want to set (dynamic/static)

Source:
Returns:

the modified BPMN process as bpmn-moddle object or XML string based on input

Type
object | Promise.<string>

(async, inner) setMachineInfo(bpmn, machineInfo) → {string|object}

Function that sets the machineInfo of all elements in the given xml with the given machineIds

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

machineInfo Array.<Object>

the machineAddresses and machineIps of all the elements we want to set

Source:
Returns:

the BPMN process as XML string or BPMN-Moddle Object based on input

Type
string | object

(async, inner) setMetaData(bpmn, elId, metaValues) → {string|object}

Updates the Meta Information of an element

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

elId String

the id of the element to update

metaValues Object

the meta data values to set

Source:
Returns:

the BPMN process as XML string or BPMN-Moddle Object based on input

Type
string | object

(inner) setMetaDataInMetaElement(meta, type, value, moddle) → {undefined|Object}

Changes/Adds an element inside a proceed:Meta element

might be either a specific meta element like proceed:costsPlanned or a generic meta value defined inside a proceed:property element

Parameters:
Name Type Description
meta Object

the meta element to make changes in

type String

the type of meta value we want to change

value String | Object

either a string representing the value inside the final elements body or an already complete element represented by an object

moddle Object

a bpmn-moddle instance to create elements with

Source:
Returns:

the previous value stored under the given meta type

Type
undefined | Object

(async, inner) setProcessId(bpmn, id) → {string}

Sets name in definitions element to given name

Parameters:
Name Type Description
bpmn string

the xml we want to update

id string

the id we want to set for the process inside the bpmn

Source:
Returns:

the modified BPMN process as bpmn-moddle object or XML string based on input

Type
string

(async, inner) setStandardDefinitions(bpmn, exporterName, exporterVersion) → {object|Promise.<string>}

Sets exporter, exporterVersion, expressionLanguage, typeLanguage and needed namespaces on defintions element stores the previous values of exporter and exporterVersion if there are any

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

exporterName String

the exporter name

exporterVersion String

the exporter version

Source:
Returns:

the modified BPMN process as bpmn-moddle object or XML string based on input

Type
object | Promise.<string>

(async, inner) setTargetNamespace(bpmn, id) → {object|Promise.<string>}

Sets targetNamespace in definitions element to https://docs.proceed-labs.org/${id}, keeps existing namespace as originalTargetNamespace

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

id string

the id to be used for the targetNamespace

Source:
Returns:

the modified BPMN process as bpmn-moddle object or XML string based on input

Type
object | Promise.<string>

(async, inner) setUserTaskData(bpmn, userTaskId, newFileName, newImplementationopt) → {string|object}

Sets the 'fileName' and 'implementation' attributes of a UserTask with new values.

Parameters:
Name Type Attributes Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

userTaskId string

the userTaskId to look for

newFileName string

the new value of 'fileName' attribute

newImplementation string <optional>

the new value of 'implementation' attribute; will default to html implementation

Source:
Returns:

the BPMN process as XML string or BPMN-Moddle Object based on input

Type
string | object

(inner) toBpmnObject(xml, typenameopt) → {Promise.<Object>}

Function that converts the given XML to a traversable object representation

Parameters:
Name Type Attributes Description
xml string

the BPMN XML that should be converted

typename string <optional>

name of the root element, optional

Source:
Throws:
  • if the given string is not an XML

    Type
    Error
  • if the given XML can not be converted to a bpmn-moddle object (multiple possible reasons)

    Type
    Error
Returns:

a traversable object representation of the given XML

Type
Promise.<Object>

(inner) toBpmnXml(bpmn) → {Promise.<string>}

Function that converts the given bpmn object to xml

Parameters:
Name Type Description
bpmn Object

traversable object representation

Source:
Returns:

a xml representation of the given object

Type
Promise.<string>

(async, inner) validateCalledProcess(xml, processId)

Checks if a process referenced in a call activity contains only a single non-typed start event

Parameters:
Name Type Description
xml String
processId String
Source:

Type Definitions

DefinitionsInfos

An object containing properties from the definitions element in a BPMN file.

Type:
  • object
Properties:
Name Type Description
id string

definitions id

name string

definitions name

exporter string

definitions exporter

exporterVersion string

definitions exporterVersion

targetNamespace string

definitions targetNamespace

Source:

manipulationFunction(bpmn-moddle-element)

Parameters:
Name Type Description
bpmn-moddle-element object

the element return by searching the bpmn-moddle process

Source:

Methods

(async, inner) addCallActivityReference(bpmn, callActivityId, calledBpmn, calledProcessLocation) → {string|object}

Add meta information of the called bpmn process to the bpmn file where it's getting called from. This includes a custom namespace in the definitions part, an import element as first child of definitions and the calledElement attribute of the call activity bpmn element

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

callActivityId String

The ID of the call activity bpmn element

calledBpmn String

The bpmn file of the called process

calledProcessLocation String

The DefinitionId of the calledBpmn. Combination of process name and process id

Source:
Returns:

the BPMN process as XML string or BPMN-Moddle Object based on input

Type
string | object

(async, inner) addConstraintsToElement(element, cons)

Adds the given constraint to the given bpmn element

Parameters:
Name Type Description
element Object

the bpmn BPMN-Moddle element

cons Object

object containing the hardConstraints and softConstraints

Source:

(async, inner) addConstraintsToElementById(bpmn, elementId, constraints) → {string|object}

Adds the given constraints to the bpmn element with the given id

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

elementId string
constraints Object

object containing the hardConstraints and softConstraints

Source:
Returns:

the BPMN process as XML string or BPMN-Moddle Object based on input

Type
string | object

(async, inner) addDocumentation(bpmn, description) → {string|object}

Adds a documentation element to the first process in the process definition

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

description string

the content for the documentation element

Source:
Returns:

the BPMN process as XML string or BPMN-Moddle Object based on input

Type
string | object

(async, inner) addDocumentationToProcessObject(processObj, description)

Adds documentation to a given process object

Parameters:
Name Type Description
processObj Object
description String
Source:

(async, inner) addSubprocessContentToProcessXML(mainProcessBPMN, subprocessBPMN, subprocessId)

Adds content of a subprocess into the main process in which the subprocess is used

Parameters:
Name Type Description
mainProcessBPMN string

the process definition as XML string

subprocessBPMN string

the content of the subprocess as XML string

subprocessId string

ID of the subprocess in which the content should be inserted

Source:

(inner) ensureCorrectProceedNamespace(xml)

Sets the xmlns:proceed attribute in the definitions element of the bpmn to the one expected in our custom schema

This is to make sure that importing the xml with bpmn-moddle will not lead to every proceed element being prefixed with ns0

Parameters:
Name Type Description
xml String
Source:

(inner) ensureExtensionElements(element) → {Object}

Returns the extensionElements entry inside the given element (creates one if there isn't one already)

Parameters:
Name Type Description
element Object

the element we want the extensionElements entry of

Source:
Returns:

the extensionElements entry

Type
Object

(inner) ensureMetaElement(element) → {Object}

Returns the meta entry inside a given element (creates it if there isn't already one)

Parameters:
Name Type Description
element Object

the element we want the meta entry of

Source:
Returns:

the meta entry

Type
Object

(inner) generateBpmnId(prefixopt) → {string}

Generate a new ID for PROCEED BPMN elements

Parameters:
Name Type Attributes Description
prefix String <optional>

optional prefix for the id

Source:
Returns:

short id in the form '0bkz1kb'

Type
string

(inner) generateDefinitionsId() → {string}

Generate a new ID for the 'definitions' element in a PROCEED process

Source:
Returns:

a new PROCEED definitions 'id'

Type
string

(inner) generateUserTaskFileName()

Generates the 'fileName' attribute string of a PROCEED UserTask

Source:
Returns:

A new 'filename' value

(async, inner) getAllBpmnFlowElementIds(bpmn) → {Promise.<Array.<String>>}

Gets the Id of every Task|Event|Gateway|CallActivity|SubProcess|SequenceFlow inside a BPMN process

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

Ids of every element inside a BPMN process

Type
Promise.<Array.<String>>

(async, inner) getAllBpmnFlowElements(bpmn) → {Promise.<Array.<object>>}

Gets every Task|Event|Gateway|CallActivity|SubProcess|SequenceFlow inside a BPMN process

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

every element inside a BPMN process

Type
Promise.<Array.<object>>

(async, inner) getAllBpmnFlowNodeIds(bpmn) → {Promise.<Array.<String>>}

Gets the Id of every Task|Event|Gateway|CallActivity|SubProcess inside a BPMN process

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

Ids of every element inside a BPMN process

Type
Promise.<Array.<String>>

(inner) getAllElements(travObj) → {array}

A function that given a traversable object returns all occurences

Parameters:
Name Type Description
travObj object

the object we want to search in

Source:
Returns:
  • all nodes within the object
Type
array

(async, inner) getAllUserTaskFileNamesAndUserTaskIdsMapping(bpmn) → {Promise.<{'': ''}>}

Creates a map (object) that contains the 'fileName' (key) and UserTask-IDs (value) for every UserTask in a BPMN process.

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

A map (object) that returns for every UserTask the 'fileName' (key) and UserTask-IDs (value)

Type
Promise.<{'': ''}>

(inner) getChildren(travObj) → {array}

Finds all kinds of childnodes in a given node

Parameters:
Name Type Description
travObj object

object of which we want to know the childnodes

Source:
Returns:

all childnodes of the given node

Type
array

(async, inner) getChildrenFlowElements(bpmn) → {Promise.<Array.<object>>}

Gets first-level child flow Elements Task|Event|Gateway|CallActivity|SubProcess|SequenceFlow of a process/subprocess

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

every child element inside a process/subprocess

Type
Promise.<Array.<object>>

(async, inner) getDefinitionsAndProcessIdForEveryCallActivity(bpmn) → {Promise.<{'': {definitionId: string, processId: string}}>}

Get all definitionIds for all imported Processes used in callActivities

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Throws:

see function: getTargetDefinitionsAndProcessIdForCallActivityByObject

Returns:

an object (a map) with all callActivityIds as keys

Type
Promise.<{'': {definitionId: string, processId: string}}>

(async, inner) getDefinitionsId(bpmn) → {Promise.<string>}

Returns id of the given process definition

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

The id stored in the definitions field of the given bpmn process

Type
Promise.<string>

(async, inner) getDefinitionsInfos(bpmn) → {Promise.<DefinitionsInfos>}

Gets the 'definitions' root element from the given BPMN XML

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

The 'definitions' root element with some selected attributes

Type
Promise.<DefinitionsInfos>

(async, inner) getDefinitionsName(bpmn) → {Promise.<string>}

Returns the name of the given bpmn process definition

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:
  • The name stored in the definitions field of the given bpmn process
Type
Promise.<string>

(async, inner) getDeploymentMethod(bpmn) → {Promise.<string>}

Gets deployment method of the given process

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

the deployment method used for the given process

Type
Promise.<string>

(inner) getElementById(travObj, id) → {object|undefined}

A function that given a traversable object returns the nested object with the given id

Parameters:
Name Type Description
travObj object

the object we want to search in

id string

the id of the object we want to find

Source:
Returns:
  • returns the found object or undefined when no matching object was found
Type
object | undefined

(inner) getElementDI(element, definitionsopt)

Gets the diagram element for the given model element

Parameters:
Name Type Attributes Description
element Object

the model element

definitions Object <optional>

the definitions object to search in

Source:

(async, inner) getElementMachineMapping(bpmn) → {Promise.<Object>}

Returns a mapping of the ids of the process nodes to the machines they are mapped to

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

the mapping from a node id to information about the machine it is mapped to

Type
Promise.<Object>

(inner) getElementsByTagName(travObj, tagname) → {array}

A function that given a traversable object returns all occurences of a given tagName

Parameters:
Name Type Description
travObj object

the object we want to search in

tagname string

the name we are searching for

Source:
Returns:
  • all nodes with the given tagName
Type
array

(inner) getExporterName() → {string}

Exporter name is used in the bpmn definitions parts

Source:
Returns:

static exporter name

Type
string

(inner) getExporterVersion() → {string}

Exporter version is used in the bpmn definitions parts

This version should be adjusted when this module (bpmn-helper) changes or any changes in the management-system occur regarding the export

Source:
Returns:

static exporter version

Type
string

(async, inner) getIdentifyingInfos(bpmn) → {Promise.<{id: String, originalId: String, processIds: Array.<String>, name: String, description: String}>}

Returns information about the process that can be used to identify it

e.g. its unique id, original id and processIds for automatic identification and its name and description for human identification

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

object containing the identifying information

Type
Promise.<{id: String, originalId: String, processIds: Array.<String>, name: String, description: String}>

(async, inner) getImports(bpmn) → {Promise.<Array.<Object>>}

Returns an array of import elements for a given bpmn xml

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:
  • Arry of of import elements inside the given xml
Type
Promise.<Array.<Object>>

(inner) getLocationsFromElement(element) → {Object}

Parses the locations from a bpmn-moddle element

Parameters:
Name Type Description
element Object
Source:
Returns:

object with all locations

Type
Object

(async, inner) getMetaData(bpmn, elId) → {object}

Get the meta information of an element

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

elId String

the id of the element to update

Source:
Returns:

the meta information

Type
object

(inner) getMetaDataFromElement(element) → {Object}

Parses the meta data from a bpmn-moddle element

Parameters:
Name Type Description
element Object
Source:
Returns:

key value list of meta values

Type
Object

(inner) getMilestonesFromElement(element) → {Array}

Parses the milestones from a bpmn-moddle element

Parameters:
Name Type Description
element Object
Source:
Returns:

array with all milestones

Type
Array

(async, inner) getMilestonesFromElementById(bpmn, elementId) → {Array}

Get the milestones for given element id

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

elementId String

the id of the element

Source:
Returns:

array with all milestones

Type
Array

(async, inner) getOriginalDefinitionsId(bpmn) → {Promise.<string>|Promise.<undefined>}

Returns the value of the originalId attribute in the given process definition the originalId is the id the process had before it was imported

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

The originalId stored in the definitions field of the given bpmn process

Type
Promise.<string> | Promise.<undefined>

(async, inner) getProcessConstraints(bpmn) → {Promise.<{hardConstraints: Array, softConstraints: Array}>}

Get the Constraints of the BPMN process. (The Constraint XML elements are defined in the PROCEED XML Schema and are not standardized in BPMN.)

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
See:
Returns:

An Object (a map) where all keys are the BPMN element ids and the value is an object with the hard and soft Constraint Arrays

Type
Promise.<{hardConstraints: Array, softConstraints: Array}>

(async, inner) getProcessDocumentation(bpmn) → {Promise.<String>}

Get the content of the 'documentation' element of the first process inside a BPMN file.

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

the documentation content

Type
Promise.<String>

(inner) getProcessDocumentationByObject(processObject) → {String}

Get the content of the 'documentation' element of the given process object.

Parameters:
Name Type Description
processObject Object

a process element as BPMN-Moddle Object

Source:
Returns:

the documentation content

Type
String

(async, inner) getProcessIds(bpmn) → {Promise.<Array.<String>>}

Get all process ids from a BPMN definitions/object. (A BPMN file can contain multiple 'process' elements inside its 'definitions' element.)

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

An Array with Strings containing all IDs from every 'process' element

Type
Promise.<Array.<String>>

(inner) getResourcesFromElement(element) → {Object}

Parses the resources from a bpmn-moddle element

Parameters:
Name Type Description
element Object
Source:
Returns:

object with all resources

Type
Object

(inner) getRootFromElement(businessObject)

Returns the definitions object of the process

Parameters:
Name Type Description
businessObject Object

the businessObject of a process element

Source:

(async, inner) getStartEvents(bpmn) → {Promise.<Array.<String>>}

Function that returns ids of all start events in a bpmn process model

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

the ids of all startEvents

Type
Promise.<Array.<String>>

(async, inner) getSubprocess(bpmn, subprocessId) → {Promise.<string>}

Returns a xml with Diagram Elements just from the given subprocess and their nested Processes

Structure of XMl: Defintions

  • Process
    • FlowElements of the Process (BPMN Part)
  • Process End
  • Diagram (How to visualize the XML in the viewer) Definitions End

This function only remove all Diagram Parts that are not part of the subprocess - the flowElements are still part of the xml

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

subprocessId string

id of subprocess you want to show

Source:
Returns:

BPMN xml with only diagram parts for the subprocess

Type
Promise.<string>

(async, inner) getSubprocessContent(bpmn, subprocessId) → {string}

Returns a xml with elements inside given subprocess

Structure of XMl: Defintions

  • Process -FlowElements of the Process (BPMN Part)
  • Process End
  • Diagram (How to visualize the XML in the viewer) Definitions End

This function removes all Diagram Parts and flowElements that are not part of the subprocess

Parameters:
Name Type Description
bpmn string

the process definition of the main process as XML string or BPMN-Moddle Object

subprocessId string

id of subprocess you want to show

Source:
Returns:
  • xml with only flowElements and diagram parts inside the subprocess
Type
string

(inner) getTargetDefinitionsAndProcessIdForCallActivityByObject(bpmnObj, callActivityId) → {Object}

Get the definitionId and processId of a target called process (callActivity)

Parameters:
Name Type Description
bpmnObj Object

The BPMN XML as converted bpmn-moddle object with toBpmnObject

callActivityId string

The id of the callActivity

Source:
See:
Throws:
  • An Error if the callActivity id does not exist

  • If the callActivity has no 'calledElement' attribute

  • If the targetNamespace for a callActivity could not be found

  • If no import element could be found for a targetNamespace

Returns:

An Object with the definition and process id

Type
Object

(async, inner) getTaskConstraintMapping(bpmn) → {Promise.<{'': {hardConstraints: Array, softConstraints: Array}}>}

Get all Constraints for every BPMN Element. (The Constraint XML elements are defined in the PROCEED XML Schema and are not standardized in BPMN.)

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
See:
Returns:

An Object (a map) where all keys are the BPMN element ids and the value is an object with the hard and soft Constraint Arrays

Type
Promise.<{'': {hardConstraints: Array, softConstraints: Array}}>

(async, inner) getUserTaskFileNameMapping(bpmn) → {Promise.<{'': {fileName: string, implementation: string}}>}

Get all fileName for all userTasks, (The attribute 'filename' is defined in the PROCEED XML Schema and not a standard BPMN attribute.)

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

an object (a map) with all userTaskIds as keys

Type
Promise.<{'': {fileName: string, implementation: string}}>

(inner) getUserTaskImplementationString() → {String}

Return the string for the 'implementation' attribute in a UserTask

Source:
Returns:

URL of the HTML spec

Type
String

(inner) initXml(processId, startEventId) → {String}

Creates a minimal valid proceed bpmn

Parameters:
Name Type Description
processId *

the id to use for the contained process

startEventId String

the id to use for the start event

Source:
Returns:

a minimal valid proceed bpmn

Type
String

(async, inner) manipulateElementById(bpmn, id, manipFunc) → {object|Promise.<string>}

Function that changes an element in the given xml using the given manipulation function

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

id string

the id of the element that should be changed

manipFunc manipulationFunction

the function that will be used to change the element

Source:
Returns:

the BPMN process as bpmn-moddle object or XML string based on input

Type
object | Promise.<string>

(async, inner) manipulateElementsByTagName(bpmn, tagName, manipFunc) → {object|Promise.<string>}

Function that changes all elements in the given xml with the given tagname using the given function

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

tagName string

the tagname of the elements we want to change, starts with 'bpmn:', e.g. 'bpmn:Definitions'

manipFunc manipulationFunction

the function that gets called on each element with a forEach-Loop

Source:
Returns:

the BPMN process as bpmn-moddle object or XML string based on input

Type
object | Promise.<string>

(async, inner) removeCallActivityReference(bpmn, callActivityId) → {string|object}

Remove the reference to the called process added in addCallActivityReference but remains the actual bpmn element

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

callActivityId String

The ID of the bpmn element for which the meta information should be removed

Source:
Returns:

the BPMN process as XML string or BPMN-Moddle Object based on input

Type
string | object

(async, inner) removeUnusedCallActivityReferences(bpmn) → {string|object}

Look up the given bpmn document for unused imports/custom namespaces which don't get referenced by a call activity inside this bpmn document.

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

the BPMN process as XML string or BPMN-Moddle Object based on input

Type
string | object

(async, inner) setDefinitionsId(bpmn, id) → {object|Promise.<string>}

Sets id in definitions element to given id, if an id already exists and differs from the new one the old id will be saved in the originalId field

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

id string

the id we want to set the definitions element to

Source:
Returns:

the modified BPMN process as bpmn-moddle object or XML string based on input

Type
object | Promise.<string>

(async, inner) setDefinitionsName(bpmn, name) → {object|Promise.<string>}

Sets name in definitions element to given name

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

name string

the id we want to set the definitions element to

Source:
Returns:

the modified BPMN process as bpmn-moddle object or XML string based on input

Type
object | Promise.<string>

(async, inner) setDeploymentMethod(bpmn, method) → {object|Promise.<string>}

Sets deployment method of a process

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

method string

the method we want to set (dynamic/static)

Source:
Returns:

the modified BPMN process as bpmn-moddle object or XML string based on input

Type
object | Promise.<string>

(async, inner) setMachineInfo(bpmn, machineInfo) → {string|object}

Function that sets the machineInfo of all elements in the given xml with the given machineIds

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

machineInfo Array.<Object>

the machineAddresses and machineIps of all the elements we want to set

Source:
Returns:

the BPMN process as XML string or BPMN-Moddle Object based on input

Type
string | object

(async, inner) setMetaData(bpmn, elId, metaValues) → {string|object}

Updates the Meta Information of an element

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

elId String

the id of the element to update

metaValues Object

the meta data values to set

Source:
Returns:

the BPMN process as XML string or BPMN-Moddle Object based on input

Type
string | object

(inner) setMetaDataInMetaElement(meta, type, value, moddle) → {undefined|Object}

Changes/Adds an element inside a proceed:Meta element

might be either a specific meta element like proceed:costsPlanned or a generic meta value defined inside a proceed:property element

Parameters:
Name Type Description
meta Object

the meta element to make changes in

type String

the type of meta value we want to change

value String | Object

either a string representing the value inside the final elements body or an already complete element represented by an object

moddle Object

a bpmn-moddle instance to create elements with

Source:
Returns:

the previous value stored under the given meta type

Type
undefined | Object

(async, inner) setProcessId(bpmn, id) → {string}

Sets name in definitions element to given name

Parameters:
Name Type Description
bpmn string

the xml we want to update

id string

the id we want to set for the process inside the bpmn

Source:
Returns:

the modified BPMN process as bpmn-moddle object or XML string based on input

Type
string

(async, inner) setStandardDefinitions(bpmn, exporterName, exporterVersion) → {object|Promise.<string>}

Sets exporter, exporterVersion, expressionLanguage, typeLanguage and needed namespaces on defintions element stores the previous values of exporter and exporterVersion if there are any

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

exporterName String

the exporter name

exporterVersion String

the exporter version

Source:
Returns:

the modified BPMN process as bpmn-moddle object or XML string based on input

Type
object | Promise.<string>

(async, inner) setTargetNamespace(bpmn, id) → {object|Promise.<string>}

Sets targetNamespace in definitions element to https://docs.proceed-labs.org/${id}, keeps existing namespace as originalTargetNamespace

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

id string

the id to be used for the targetNamespace

Source:
Returns:

the modified BPMN process as bpmn-moddle object or XML string based on input

Type
object | Promise.<string>

(async, inner) setUserTaskData(bpmn, userTaskId, newFileName, newImplementationopt) → {string|object}

Sets the 'fileName' and 'implementation' attributes of a UserTask with new values.

Parameters:
Name Type Attributes Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

userTaskId string

the userTaskId to look for

newFileName string

the new value of 'fileName' attribute

newImplementation string <optional>

the new value of 'implementation' attribute; will default to html implementation

Source:
Returns:

the BPMN process as XML string or BPMN-Moddle Object based on input

Type
string | object

(inner) toBpmnObject(xml, typenameopt) → {Promise.<Object>}

Function that converts the given XML to a traversable object representation

Parameters:
Name Type Attributes Description
xml string

the BPMN XML that should be converted

typename string <optional>

name of the root element, optional

Source:
Throws:
  • if the given string is not an XML

    Type
    Error
  • if the given XML can not be converted to a bpmn-moddle object (multiple possible reasons)

    Type
    Error
Returns:

a traversable object representation of the given XML

Type
Promise.<Object>

(inner) toBpmnXml(bpmn) → {Promise.<string>}

Function that converts the given bpmn object to xml

Parameters:
Name Type Description
bpmn Object

traversable object representation

Source:
Returns:

a xml representation of the given object

Type
Promise.<string>

(async, inner) validateCalledProcess(xml, processId)

Checks if a process referenced in a call activity contains only a single non-typed start event

Parameters:
Name Type Description
xml String
processId String
Source:

Type Definitions

DefinitionsInfos

An object containing properties from the definitions element in a BPMN file.

Type:
  • object
Properties:
Name Type Description
id string

definitions id

name string

definitions name

exporter string

definitions exporter

exporterVersion string

definitions exporterVersion

targetNamespace string

definitions targetNamespace

Source:

manipulationFunction(bpmn-moddle-element)

Parameters:
Name Type Description
bpmn-moddle-element object

the element return by searching the bpmn-moddle process

Source:

Methods

(async, inner) addCallActivityReference(bpmn, callActivityId, calledBpmn, calledProcessLocation) → {string|object}

Add meta information of the called bpmn process to the bpmn file where it's getting called from. This includes a custom namespace in the definitions part, an import element as first child of definitions and the calledElement attribute of the call activity bpmn element

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

callActivityId String

The ID of the call activity bpmn element

calledBpmn String

The bpmn file of the called process

calledProcessLocation String

The DefinitionId of the calledBpmn. Combination of process name and process id

Source:
Returns:

the BPMN process as XML string or BPMN-Moddle Object based on input

Type
string | object

(async, inner) addConstraintsToElement(element, cons)

Adds the given constraint to the given bpmn element

Parameters:
Name Type Description
element Object

the bpmn BPMN-Moddle element

cons Object

object containing the hardConstraints and softConstraints

Source:

(async, inner) addConstraintsToElementById(bpmn, elementId, constraints) → {string|object}

Adds the given constraints to the bpmn element with the given id

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

elementId string
constraints Object

object containing the hardConstraints and softConstraints

Source:
Returns:

the BPMN process as XML string or BPMN-Moddle Object based on input

Type
string | object

(async, inner) addDocumentation(bpmn, description) → {string|object}

Adds a documentation element to the first process in the process definition

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

description string

the content for the documentation element

Source:
Returns:

the BPMN process as XML string or BPMN-Moddle Object based on input

Type
string | object

(async, inner) addDocumentationToProcessObject(processObj, description)

Adds documentation to a given process object

Parameters:
Name Type Description
processObj Object
description String
Source:

(async, inner) addSubprocessContentToProcessXML(mainProcessBPMN, subprocessBPMN, subprocessId)

Adds content of a subprocess into the main process in which the subprocess is used

Parameters:
Name Type Description
mainProcessBPMN string

the process definition as XML string

subprocessBPMN string

the content of the subprocess as XML string

subprocessId string

ID of the subprocess in which the content should be inserted

Source:

(inner) ensureCorrectProceedNamespace(xml)

Sets the xmlns:proceed attribute in the definitions element of the bpmn to the one expected in our custom schema

This is to make sure that importing the xml with bpmn-moddle will not lead to every proceed element being prefixed with ns0

Parameters:
Name Type Description
xml String
Source:

(inner) ensureExtensionElements(element) → {Object}

Returns the extensionElements entry inside the given element (creates one if there isn't one already)

Parameters:
Name Type Description
element Object

the element we want the extensionElements entry of

Source:
Returns:

the extensionElements entry

Type
Object

(inner) ensureMetaElement(element) → {Object}

Returns the meta entry inside a given element (creates it if there isn't already one)

Parameters:
Name Type Description
element Object

the element we want the meta entry of

Source:
Returns:

the meta entry

Type
Object

(inner) generateBpmnId(prefixopt) → {string}

Generate a new ID for PROCEED BPMN elements

Parameters:
Name Type Attributes Description
prefix String <optional>

optional prefix for the id

Source:
Returns:

short id in the form '0bkz1kb'

Type
string

(inner) generateDefinitionsId() → {string}

Generate a new ID for the 'definitions' element in a PROCEED process

Source:
Returns:

a new PROCEED definitions 'id'

Type
string

(inner) generateUserTaskFileName()

Generates the 'fileName' attribute string of a PROCEED UserTask

Source:
Returns:

A new 'filename' value

(async, inner) getAllBpmnFlowElementIds(bpmn) → {Promise.<Array.<String>>}

Gets the Id of every Task|Event|Gateway|CallActivity|SubProcess|SequenceFlow inside a BPMN process

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

Ids of every element inside a BPMN process

Type
Promise.<Array.<String>>

(async, inner) getAllBpmnFlowElements(bpmn) → {Promise.<Array.<object>>}

Gets every Task|Event|Gateway|CallActivity|SubProcess|SequenceFlow inside a BPMN process

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

every element inside a BPMN process

Type
Promise.<Array.<object>>

(async, inner) getAllBpmnFlowNodeIds(bpmn) → {Promise.<Array.<String>>}

Gets the Id of every Task|Event|Gateway|CallActivity|SubProcess inside a BPMN process

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

Ids of every element inside a BPMN process

Type
Promise.<Array.<String>>

(inner) getAllElements(travObj) → {array}

A function that given a traversable object returns all occurences

Parameters:
Name Type Description
travObj object

the object we want to search in

Source:
Returns:
  • all nodes within the object
Type
array

(async, inner) getAllUserTaskFileNamesAndUserTaskIdsMapping(bpmn) → {Promise.<{'': ''}>}

Creates a map (object) that contains the 'fileName' (key) and UserTask-IDs (value) for every UserTask in a BPMN process.

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

A map (object) that returns for every UserTask the 'fileName' (key) and UserTask-IDs (value)

Type
Promise.<{'': ''}>

(inner) getChildren(travObj) → {array}

Finds all kinds of childnodes in a given node

Parameters:
Name Type Description
travObj object

object of which we want to know the childnodes

Source:
Returns:

all childnodes of the given node

Type
array

(async, inner) getChildrenFlowElements(bpmn) → {Promise.<Array.<object>>}

Gets first-level child flow Elements Task|Event|Gateway|CallActivity|SubProcess|SequenceFlow of a process/subprocess

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

every child element inside a process/subprocess

Type
Promise.<Array.<object>>

(async, inner) getDefinitionsAndProcessIdForEveryCallActivity(bpmn) → {Promise.<{'': {definitionId: string, processId: string}}>}

Get all definitionIds for all imported Processes used in callActivities

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Throws:

see function: getTargetDefinitionsAndProcessIdForCallActivityByObject

Returns:

an object (a map) with all callActivityIds as keys

Type
Promise.<{'': {definitionId: string, processId: string}}>

(async, inner) getDefinitionsId(bpmn) → {Promise.<string>}

Returns id of the given process definition

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

The id stored in the definitions field of the given bpmn process

Type
Promise.<string>

(async, inner) getDefinitionsInfos(bpmn) → {Promise.<DefinitionsInfos>}

Gets the 'definitions' root element from the given BPMN XML

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

The 'definitions' root element with some selected attributes

Type
Promise.<DefinitionsInfos>

(async, inner) getDefinitionsName(bpmn) → {Promise.<string>}

Returns the name of the given bpmn process definition

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:
  • The name stored in the definitions field of the given bpmn process
Type
Promise.<string>

(async, inner) getDeploymentMethod(bpmn) → {Promise.<string>}

Gets deployment method of the given process

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

the deployment method used for the given process

Type
Promise.<string>

(inner) getElementById(travObj, id) → {object|undefined}

A function that given a traversable object returns the nested object with the given id

Parameters:
Name Type Description
travObj object

the object we want to search in

id string

the id of the object we want to find

Source:
Returns:
  • returns the found object or undefined when no matching object was found
Type
object | undefined

(inner) getElementDI(element, definitionsopt)

Gets the diagram element for the given model element

Parameters:
Name Type Attributes Description
element Object

the model element

definitions Object <optional>

the definitions object to search in

Source:

(async, inner) getElementMachineMapping(bpmn) → {Promise.<Object>}

Returns a mapping of the ids of the process nodes to the machines they are mapped to

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

the mapping from a node id to information about the machine it is mapped to

Type
Promise.<Object>

(inner) getElementsByTagName(travObj, tagname) → {array}

A function that given a traversable object returns all occurences of a given tagName

Parameters:
Name Type Description
travObj object

the object we want to search in

tagname string

the name we are searching for

Source:
Returns:
  • all nodes with the given tagName
Type
array

(inner) getExporterName() → {string}

Exporter name is used in the bpmn definitions parts

Source:
Returns:

static exporter name

Type
string

(inner) getExporterVersion() → {string}

Exporter version is used in the bpmn definitions parts

This version should be adjusted when this module (bpmn-helper) changes or any changes in the management-system occur regarding the export

Source:
Returns:

static exporter version

Type
string

(async, inner) getIdentifyingInfos(bpmn) → {Promise.<{id: String, originalId: String, processIds: Array.<String>, name: String, description: String}>}

Returns information about the process that can be used to identify it

e.g. its unique id, original id and processIds for automatic identification and its name and description for human identification

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

object containing the identifying information

Type
Promise.<{id: String, originalId: String, processIds: Array.<String>, name: String, description: String}>

(async, inner) getImports(bpmn) → {Promise.<Array.<Object>>}

Returns an array of import elements for a given bpmn xml

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:
  • Arry of of import elements inside the given xml
Type
Promise.<Array.<Object>>

(inner) getLocationsFromElement(element) → {Object}

Parses the locations from a bpmn-moddle element

Parameters:
Name Type Description
element Object
Source:
Returns:

object with all locations

Type
Object

(async, inner) getMetaData(bpmn, elId) → {object}

Get the meta information of an element

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

elId String

the id of the element to update

Source:
Returns:

the meta information

Type
object

(inner) getMetaDataFromElement(element) → {Object}

Parses the meta data from a bpmn-moddle element

Parameters:
Name Type Description
element Object
Source:
Returns:

key value list of meta values

Type
Object

(inner) getMilestonesFromElement(element) → {Array}

Parses the milestones from a bpmn-moddle element

Parameters:
Name Type Description
element Object
Source:
Returns:

array with all milestones

Type
Array

(async, inner) getMilestonesFromElementById(bpmn, elementId) → {Array}

Get the milestones for given element id

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

elementId String

the id of the element

Source:
Returns:

array with all milestones

Type
Array

(async, inner) getOriginalDefinitionsId(bpmn) → {Promise.<string>|Promise.<undefined>}

Returns the value of the originalId attribute in the given process definition the originalId is the id the process had before it was imported

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

The originalId stored in the definitions field of the given bpmn process

Type
Promise.<string> | Promise.<undefined>

(async, inner) getProcessConstraints(bpmn) → {Promise.<{hardConstraints: Array, softConstraints: Array}>}

Get the Constraints of the BPMN process. (The Constraint XML elements are defined in the PROCEED XML Schema and are not standardized in BPMN.)

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
See:
Returns:

An Object (a map) where all keys are the BPMN element ids and the value is an object with the hard and soft Constraint Arrays

Type
Promise.<{hardConstraints: Array, softConstraints: Array}>

(async, inner) getProcessDocumentation(bpmn) → {Promise.<String>}

Get the content of the 'documentation' element of the first process inside a BPMN file.

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

the documentation content

Type
Promise.<String>

(inner) getProcessDocumentationByObject(processObject) → {String}

Get the content of the 'documentation' element of the given process object.

Parameters:
Name Type Description
processObject Object

a process element as BPMN-Moddle Object

Source:
Returns:

the documentation content

Type
String

(async, inner) getProcessIds(bpmn) → {Promise.<Array.<String>>}

Get all process ids from a BPMN definitions/object. (A BPMN file can contain multiple 'process' elements inside its 'definitions' element.)

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

An Array with Strings containing all IDs from every 'process' element

Type
Promise.<Array.<String>>

(inner) getResourcesFromElement(element) → {Object}

Parses the resources from a bpmn-moddle element

Parameters:
Name Type Description
element Object
Source:
Returns:

object with all resources

Type
Object

(inner) getRootFromElement(businessObject)

Returns the definitions object of the process

Parameters:
Name Type Description
businessObject Object

the businessObject of a process element

Source:

(async, inner) getStartEvents(bpmn) → {Promise.<Array.<String>>}

Function that returns ids of all start events in a bpmn process model

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

the ids of all startEvents

Type
Promise.<Array.<String>>

(async, inner) getSubprocess(bpmn, subprocessId) → {Promise.<string>}

Returns a xml with Diagram Elements just from the given subprocess and their nested Processes

Structure of XMl: Defintions

  • Process
    • FlowElements of the Process (BPMN Part)
  • Process End
  • Diagram (How to visualize the XML in the viewer) Definitions End

This function only remove all Diagram Parts that are not part of the subprocess - the flowElements are still part of the xml

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

subprocessId string

id of subprocess you want to show

Source:
Returns:

BPMN xml with only diagram parts for the subprocess

Type
Promise.<string>

(async, inner) getSubprocessContent(bpmn, subprocessId) → {string}

Returns a xml with elements inside given subprocess

Structure of XMl: Defintions

  • Process -FlowElements of the Process (BPMN Part)
  • Process End
  • Diagram (How to visualize the XML in the viewer) Definitions End

This function removes all Diagram Parts and flowElements that are not part of the subprocess

Parameters:
Name Type Description
bpmn string

the process definition of the main process as XML string or BPMN-Moddle Object

subprocessId string

id of subprocess you want to show

Source:
Returns:
  • xml with only flowElements and diagram parts inside the subprocess
Type
string

(inner) getTargetDefinitionsAndProcessIdForCallActivityByObject(bpmnObj, callActivityId) → {Object}

Get the definitionId and processId of a target called process (callActivity)

Parameters:
Name Type Description
bpmnObj Object

The BPMN XML as converted bpmn-moddle object with toBpmnObject

callActivityId string

The id of the callActivity

Source:
See:
Throws:
  • An Error if the callActivity id does not exist

  • If the callActivity has no 'calledElement' attribute

  • If the targetNamespace for a callActivity could not be found

  • If no import element could be found for a targetNamespace

Returns:

An Object with the definition and process id

Type
Object

(async, inner) getTaskConstraintMapping(bpmn) → {Promise.<{'': {hardConstraints: Array, softConstraints: Array}}>}

Get all Constraints for every BPMN Element. (The Constraint XML elements are defined in the PROCEED XML Schema and are not standardized in BPMN.)

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
See:
Returns:

An Object (a map) where all keys are the BPMN element ids and the value is an object with the hard and soft Constraint Arrays

Type
Promise.<{'': {hardConstraints: Array, softConstraints: Array}}>

(async, inner) getUserTaskFileNameMapping(bpmn) → {Promise.<{'': {fileName: string, implementation: string}}>}

Get all fileName for all userTasks, (The attribute 'filename' is defined in the PROCEED XML Schema and not a standard BPMN attribute.)

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

an object (a map) with all userTaskIds as keys

Type
Promise.<{'': {fileName: string, implementation: string}}>

(inner) getUserTaskImplementationString() → {String}

Return the string for the 'implementation' attribute in a UserTask

Source:
Returns:

URL of the HTML spec

Type
String

(inner) initXml(processId, startEventId) → {String}

Creates a minimal valid proceed bpmn

Parameters:
Name Type Description
processId *

the id to use for the contained process

startEventId String

the id to use for the start event

Source:
Returns:

a minimal valid proceed bpmn

Type
String

(async, inner) manipulateElementById(bpmn, id, manipFunc) → {object|Promise.<string>}

Function that changes an element in the given xml using the given manipulation function

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

id string

the id of the element that should be changed

manipFunc manipulationFunction

the function that will be used to change the element

Source:
Returns:

the BPMN process as bpmn-moddle object or XML string based on input

Type
object | Promise.<string>

(async, inner) manipulateElementsByTagName(bpmn, tagName, manipFunc) → {object|Promise.<string>}

Function that changes all elements in the given xml with the given tagname using the given function

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

tagName string

the tagname of the elements we want to change, starts with 'bpmn:', e.g. 'bpmn:Definitions'

manipFunc manipulationFunction

the function that gets called on each element with a forEach-Loop

Source:
Returns:

the BPMN process as bpmn-moddle object or XML string based on input

Type
object | Promise.<string>

(async, inner) removeCallActivityReference(bpmn, callActivityId) → {string|object}

Remove the reference to the called process added in addCallActivityReference but remains the actual bpmn element

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

callActivityId String

The ID of the bpmn element for which the meta information should be removed

Source:
Returns:

the BPMN process as XML string or BPMN-Moddle Object based on input

Type
string | object

(async, inner) removeUnusedCallActivityReferences(bpmn) → {string|object}

Look up the given bpmn document for unused imports/custom namespaces which don't get referenced by a call activity inside this bpmn document.

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

the BPMN process as XML string or BPMN-Moddle Object based on input

Type
string | object

(async, inner) setDefinitionsId(bpmn, id) → {object|Promise.<string>}

Sets id in definitions element to given id, if an id already exists and differs from the new one the old id will be saved in the originalId field

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

id string

the id we want to set the definitions element to

Source:
Returns:

the modified BPMN process as bpmn-moddle object or XML string based on input

Type
object | Promise.<string>

(async, inner) setDefinitionsName(bpmn, name) → {object|Promise.<string>}

Sets name in definitions element to given name

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

name string

the id we want to set the definitions element to

Source:
Returns:

the modified BPMN process as bpmn-moddle object or XML string based on input

Type
object | Promise.<string>

(async, inner) setDeploymentMethod(bpmn, method) → {object|Promise.<string>}

Sets deployment method of a process

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

method string

the method we want to set (dynamic/static)

Source:
Returns:

the modified BPMN process as bpmn-moddle object or XML string based on input

Type
object | Promise.<string>

(async, inner) setMachineInfo(bpmn, machineInfo) → {string|object}

Function that sets the machineInfo of all elements in the given xml with the given machineIds

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

machineInfo Array.<Object>

the machineAddresses and machineIps of all the elements we want to set

Source:
Returns:

the BPMN process as XML string or BPMN-Moddle Object based on input

Type
string | object

(async, inner) setMetaData(bpmn, elId, metaValues) → {string|object}

Updates the Meta Information of an element

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

elId String

the id of the element to update

metaValues Object

the meta data values to set

Source:
Returns:

the BPMN process as XML string or BPMN-Moddle Object based on input

Type
string | object

(inner) setMetaDataInMetaElement(meta, type, value, moddle) → {undefined|Object}

Changes/Adds an element inside a proceed:Meta element

might be either a specific meta element like proceed:costsPlanned or a generic meta value defined inside a proceed:property element

Parameters:
Name Type Description
meta Object

the meta element to make changes in

type String

the type of meta value we want to change

value String | Object

either a string representing the value inside the final elements body or an already complete element represented by an object

moddle Object

a bpmn-moddle instance to create elements with

Source:
Returns:

the previous value stored under the given meta type

Type
undefined | Object

(async, inner) setProcessId(bpmn, id) → {string}

Sets name in definitions element to given name

Parameters:
Name Type Description
bpmn string

the xml we want to update

id string

the id we want to set for the process inside the bpmn

Source:
Returns:

the modified BPMN process as bpmn-moddle object or XML string based on input

Type
string

(async, inner) setStandardDefinitions(bpmn, exporterName, exporterVersion) → {object|Promise.<string>}

Sets exporter, exporterVersion, expressionLanguage, typeLanguage and needed namespaces on defintions element stores the previous values of exporter and exporterVersion if there are any

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

exporterName String

the exporter name

exporterVersion String

the exporter version

Source:
Returns:

the modified BPMN process as bpmn-moddle object or XML string based on input

Type
object | Promise.<string>

(async, inner) setTargetNamespace(bpmn, id) → {object|Promise.<string>}

Sets targetNamespace in definitions element to https://docs.proceed-labs.org/${id}, keeps existing namespace as originalTargetNamespace

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

id string

the id to be used for the targetNamespace

Source:
Returns:

the modified BPMN process as bpmn-moddle object or XML string based on input

Type
object | Promise.<string>

(async, inner) setUserTaskData(bpmn, userTaskId, newFileName, newImplementationopt) → {string|object}

Sets the 'fileName' and 'implementation' attributes of a UserTask with new values.

Parameters:
Name Type Attributes Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

userTaskId string

the userTaskId to look for

newFileName string

the new value of 'fileName' attribute

newImplementation string <optional>

the new value of 'implementation' attribute; will default to html implementation

Source:
Returns:

the BPMN process as XML string or BPMN-Moddle Object based on input

Type
string | object

(inner) toBpmnObject(xml, typenameopt) → {Promise.<Object>}

Function that converts the given XML to a traversable object representation

Parameters:
Name Type Attributes Description
xml string

the BPMN XML that should be converted

typename string <optional>

name of the root element, optional

Source:
Throws:
  • if the given string is not an XML

    Type
    Error
  • if the given XML can not be converted to a bpmn-moddle object (multiple possible reasons)

    Type
    Error
Returns:

a traversable object representation of the given XML

Type
Promise.<Object>

(inner) toBpmnXml(bpmn) → {Promise.<string>}

Function that converts the given bpmn object to xml

Parameters:
Name Type Description
bpmn Object

traversable object representation

Source:
Returns:

a xml representation of the given object

Type
Promise.<string>

(async, inner) validateCalledProcess(xml, processId)

Checks if a process referenced in a call activity contains only a single non-typed start event

Parameters:
Name Type Description
xml String
processId String
Source:

Type Definitions

DefinitionsInfos

An object containing properties from the definitions element in a BPMN file.

Type:
  • object
Properties:
Name Type Description
id string

definitions id

name string

definitions name

exporter string

definitions exporter

exporterVersion string

definitions exporterVersion

targetNamespace string

definitions targetNamespace

Source:

manipulationFunction(bpmn-moddle-element)

Parameters:
Name Type Description
bpmn-moddle-element object

the element return by searching the bpmn-moddle process

Source:

Methods

(async, inner) addCallActivityReference(bpmn, callActivityId, calledBpmn, calledProcessLocation) → {string|object}

Add meta information of the called bpmn process to the bpmn file where it's getting called from. This includes a custom namespace in the definitions part, an import element as first child of definitions and the calledElement attribute of the call activity bpmn element

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

callActivityId String

The ID of the call activity bpmn element

calledBpmn String

The bpmn file of the called process

calledProcessLocation String

The DefinitionId of the calledBpmn. Combination of process name and process id

Source:
Returns:

the BPMN process as XML string or BPMN-Moddle Object based on input

Type
string | object

(async, inner) addConstraintsToElement(element, cons)

Adds the given constraint to the given bpmn element

Parameters:
Name Type Description
element Object

the bpmn BPMN-Moddle element

cons Object

object containing the hardConstraints and softConstraints

Source:

(async, inner) addConstraintsToElementById(bpmn, elementId, constraints) → {string|object}

Adds the given constraints to the bpmn element with the given id

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

elementId string
constraints Object

object containing the hardConstraints and softConstraints

Source:
Returns:

the BPMN process as XML string or BPMN-Moddle Object based on input

Type
string | object

(async, inner) addDocumentation(bpmn, description) → {string|object}

Adds a documentation element to the first process in the process definition

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

description string

the content for the documentation element

Source:
Returns:

the BPMN process as XML string or BPMN-Moddle Object based on input

Type
string | object

(async, inner) addDocumentationToProcessObject(processObj, description)

Adds documentation to a given process object

Parameters:
Name Type Description
processObj Object
description String
Source:

(async, inner) addSubprocessContentToProcessXML(mainProcessBPMN, subprocessBPMN, subprocessId)

Adds content of a subprocess into the main process in which the subprocess is used

Parameters:
Name Type Description
mainProcessBPMN string

the process definition as XML string

subprocessBPMN string

the content of the subprocess as XML string

subprocessId string

ID of the subprocess in which the content should be inserted

Source:

(inner) ensureCorrectProceedNamespace(xml)

Sets the xmlns:proceed attribute in the definitions element of the bpmn to the one expected in our custom schema

This is to make sure that importing the xml with bpmn-moddle will not lead to every proceed element being prefixed with ns0

Parameters:
Name Type Description
xml String
Source:

(inner) ensureExtensionElements(element) → {Object}

Returns the extensionElements entry inside the given element (creates one if there isn't one already)

Parameters:
Name Type Description
element Object

the element we want the extensionElements entry of

Source:
Returns:

the extensionElements entry

Type
Object

(inner) ensureMetaElement(element) → {Object}

Returns the meta entry inside a given element (creates it if there isn't already one)

Parameters:
Name Type Description
element Object

the element we want the meta entry of

Source:
Returns:

the meta entry

Type
Object

(inner) generateBpmnId(prefixopt) → {string}

Generate a new ID for PROCEED BPMN elements

Parameters:
Name Type Attributes Description
prefix String <optional>

optional prefix for the id

Source:
Returns:

short id in the form '0bkz1kb'

Type
string

(inner) generateDefinitionsId() → {string}

Generate a new ID for the 'definitions' element in a PROCEED process

Source:
Returns:

a new PROCEED definitions 'id'

Type
string

(inner) generateUserTaskFileName()

Generates the 'fileName' attribute string of a PROCEED UserTask

Source:
Returns:

A new 'filename' value

(async, inner) getAllBpmnFlowElementIds(bpmn) → {Promise.<Array.<String>>}

Gets the Id of every Task|Event|Gateway|CallActivity|SubProcess|SequenceFlow inside a BPMN process

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

Ids of every element inside a BPMN process

Type
Promise.<Array.<String>>

(async, inner) getAllBpmnFlowElements(bpmn) → {Promise.<Array.<object>>}

Gets every Task|Event|Gateway|CallActivity|SubProcess|SequenceFlow inside a BPMN process

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

every element inside a BPMN process

Type
Promise.<Array.<object>>

(async, inner) getAllBpmnFlowNodeIds(bpmn) → {Promise.<Array.<String>>}

Gets the Id of every Task|Event|Gateway|CallActivity|SubProcess inside a BPMN process

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

Ids of every element inside a BPMN process

Type
Promise.<Array.<String>>

(inner) getAllElements(travObj) → {array}

A function that given a traversable object returns all occurences

Parameters:
Name Type Description
travObj object

the object we want to search in

Source:
Returns:
  • all nodes within the object
Type
array

(async, inner) getAllUserTaskFileNamesAndUserTaskIdsMapping(bpmn) → {Promise.<{'': ''}>}

Creates a map (object) that contains the 'fileName' (key) and UserTask-IDs (value) for every UserTask in a BPMN process.

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

A map (object) that returns for every UserTask the 'fileName' (key) and UserTask-IDs (value)

Type
Promise.<{'': ''}>

(inner) getChildren(travObj) → {array}

Finds all kinds of childnodes in a given node

Parameters:
Name Type Description
travObj object

object of which we want to know the childnodes

Source:
Returns:

all childnodes of the given node

Type
array

(async, inner) getChildrenFlowElements(bpmn) → {Promise.<Array.<object>>}

Gets first-level child flow Elements Task|Event|Gateway|CallActivity|SubProcess|SequenceFlow of a process/subprocess

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

every child element inside a process/subprocess

Type
Promise.<Array.<object>>

(async, inner) getDefinitionsAndProcessIdForEveryCallActivity(bpmn) → {Promise.<{'': {definitionId: string, processId: string}}>}

Get all definitionIds for all imported Processes used in callActivities

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Throws:

see function: getTargetDefinitionsAndProcessIdForCallActivityByObject

Returns:

an object (a map) with all callActivityIds as keys

Type
Promise.<{'': {definitionId: string, processId: string}}>

(async, inner) getDefinitionsId(bpmn) → {Promise.<string>}

Returns id of the given process definition

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

The id stored in the definitions field of the given bpmn process

Type
Promise.<string>

(async, inner) getDefinitionsInfos(bpmn) → {Promise.<DefinitionsInfos>}

Gets the 'definitions' root element from the given BPMN XML

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

The 'definitions' root element with some selected attributes

Type
Promise.<DefinitionsInfos>

(async, inner) getDefinitionsName(bpmn) → {Promise.<string>}

Returns the name of the given bpmn process definition

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:
  • The name stored in the definitions field of the given bpmn process
Type
Promise.<string>

(async, inner) getDeploymentMethod(bpmn) → {Promise.<string>}

Gets deployment method of the given process

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

the deployment method used for the given process

Type
Promise.<string>

(inner) getElementById(travObj, id) → {object|undefined}

A function that given a traversable object returns the nested object with the given id

Parameters:
Name Type Description
travObj object

the object we want to search in

id string

the id of the object we want to find

Source:
Returns:
  • returns the found object or undefined when no matching object was found
Type
object | undefined

(inner) getElementDI(element, definitionsopt)

Gets the diagram element for the given model element

Parameters:
Name Type Attributes Description
element Object

the model element

definitions Object <optional>

the definitions object to search in

Source:

(async, inner) getElementMachineMapping(bpmn) → {Promise.<Object>}

Returns a mapping of the ids of the process nodes to the machines they are mapped to

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

the mapping from a node id to information about the machine it is mapped to

Type
Promise.<Object>

(inner) getElementsByTagName(travObj, tagname) → {array}

A function that given a traversable object returns all occurences of a given tagName

Parameters:
Name Type Description
travObj object

the object we want to search in

tagname string

the name we are searching for

Source:
Returns:
  • all nodes with the given tagName
Type
array

(inner) getExporterName() → {string}

Exporter name is used in the bpmn definitions parts

Source:
Returns:

static exporter name

Type
string

(inner) getExporterVersion() → {string}

Exporter version is used in the bpmn definitions parts

This version should be adjusted when this module (bpmn-helper) changes or any changes in the management-system occur regarding the export

Source:
Returns:

static exporter version

Type
string

(async, inner) getIdentifyingInfos(bpmn) → {Promise.<{id: String, originalId: String, processIds: Array.<String>, name: String, description: String}>}

Returns information about the process that can be used to identify it

e.g. its unique id, original id and processIds for automatic identification and its name and description for human identification

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

object containing the identifying information

Type
Promise.<{id: String, originalId: String, processIds: Array.<String>, name: String, description: String}>

(async, inner) getImports(bpmn) → {Promise.<Array.<Object>>}

Returns an array of import elements for a given bpmn xml

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:
  • Arry of of import elements inside the given xml
Type
Promise.<Array.<Object>>

(inner) getLocationsFromElement(element) → {Object}

Parses the locations from a bpmn-moddle element

Parameters:
Name Type Description
element Object
Source:
Returns:

object with all locations

Type
Object

(async, inner) getMetaData(bpmn, elId) → {object}

Get the meta information of an element

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

elId String

the id of the element to update

Source:
Returns:

the meta information

Type
object

(inner) getMetaDataFromElement(element) → {Object}

Parses the meta data from a bpmn-moddle element

Parameters:
Name Type Description
element Object
Source:
Returns:

key value list of meta values

Type
Object

(inner) getMilestonesFromElement(element) → {Array}

Parses the milestones from a bpmn-moddle element

Parameters:
Name Type Description
element Object
Source:
Returns:

array with all milestones

Type
Array

(async, inner) getMilestonesFromElementById(bpmn, elementId) → {Array}

Get the milestones for given element id

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

elementId String

the id of the element

Source:
Returns:

array with all milestones

Type
Array

(async, inner) getOriginalDefinitionsId(bpmn) → {Promise.<string>|Promise.<undefined>}

Returns the value of the originalId attribute in the given process definition the originalId is the id the process had before it was imported

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

The originalId stored in the definitions field of the given bpmn process

Type
Promise.<string> | Promise.<undefined>

(async, inner) getProcessConstraints(bpmn) → {Promise.<{hardConstraints: Array, softConstraints: Array}>}

Get the Constraints of the BPMN process. (The Constraint XML elements are defined in the PROCEED XML Schema and are not standardized in BPMN.)

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
See:
Returns:

An Object (a map) where all keys are the BPMN element ids and the value is an object with the hard and soft Constraint Arrays

Type
Promise.<{hardConstraints: Array, softConstraints: Array}>

(async, inner) getProcessDocumentation(bpmn) → {Promise.<String>}

Get the content of the 'documentation' element of the first process inside a BPMN file.

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

the documentation content

Type
Promise.<String>

(inner) getProcessDocumentationByObject(processObject) → {String}

Get the content of the 'documentation' element of the given process object.

Parameters:
Name Type Description
processObject Object

a process element as BPMN-Moddle Object

Source:
Returns:

the documentation content

Type
String

(async, inner) getProcessIds(bpmn) → {Promise.<Array.<String>>}

Get all process ids from a BPMN definitions/object. (A BPMN file can contain multiple 'process' elements inside its 'definitions' element.)

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

An Array with Strings containing all IDs from every 'process' element

Type
Promise.<Array.<String>>

(inner) getResourcesFromElement(element) → {Object}

Parses the resources from a bpmn-moddle element

Parameters:
Name Type Description
element Object
Source:
Returns:

object with all resources

Type
Object

(inner) getRootFromElement(businessObject)

Returns the definitions object of the process

Parameters:
Name Type Description
businessObject Object

the businessObject of a process element

Source:

(async, inner) getStartEvents(bpmn) → {Promise.<Array.<String>>}

Function that returns ids of all start events in a bpmn process model

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

the ids of all startEvents

Type
Promise.<Array.<String>>

(async, inner) getSubprocess(bpmn, subprocessId) → {Promise.<string>}

Returns a xml with Diagram Elements just from the given subprocess and their nested Processes

Structure of XMl: Defintions

  • Process
    • FlowElements of the Process (BPMN Part)
  • Process End
  • Diagram (How to visualize the XML in the viewer) Definitions End

This function only remove all Diagram Parts that are not part of the subprocess - the flowElements are still part of the xml

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

subprocessId string

id of subprocess you want to show

Source:
Returns:

BPMN xml with only diagram parts for the subprocess

Type
Promise.<string>

(async, inner) getSubprocessContent(bpmn, subprocessId) → {string}

Returns a xml with elements inside given subprocess

Structure of XMl: Defintions

  • Process -FlowElements of the Process (BPMN Part)
  • Process End
  • Diagram (How to visualize the XML in the viewer) Definitions End

This function removes all Diagram Parts and flowElements that are not part of the subprocess

Parameters:
Name Type Description
bpmn string

the process definition of the main process as XML string or BPMN-Moddle Object

subprocessId string

id of subprocess you want to show

Source:
Returns:
  • xml with only flowElements and diagram parts inside the subprocess
Type
string

(inner) getTargetDefinitionsAndProcessIdForCallActivityByObject(bpmnObj, callActivityId) → {Object}

Get the definitionId and processId of a target called process (callActivity)

Parameters:
Name Type Description
bpmnObj Object

The BPMN XML as converted bpmn-moddle object with toBpmnObject

callActivityId string

The id of the callActivity

Source:
See:
Throws:
  • An Error if the callActivity id does not exist

  • If the callActivity has no 'calledElement' attribute

  • If the targetNamespace for a callActivity could not be found

  • If no import element could be found for a targetNamespace

Returns:

An Object with the definition and process id

Type
Object

(async, inner) getTaskConstraintMapping(bpmn) → {Promise.<{'': {hardConstraints: Array, softConstraints: Array}}>}

Get all Constraints for every BPMN Element. (The Constraint XML elements are defined in the PROCEED XML Schema and are not standardized in BPMN.)

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
See:
Returns:

An Object (a map) where all keys are the BPMN element ids and the value is an object with the hard and soft Constraint Arrays

Type
Promise.<{'': {hardConstraints: Array, softConstraints: Array}}>

(async, inner) getUserTaskFileNameMapping(bpmn) → {Promise.<{'': {fileName: string, implementation: string}}>}

Get all fileName for all userTasks, (The attribute 'filename' is defined in the PROCEED XML Schema and not a standard BPMN attribute.)

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

an object (a map) with all userTaskIds as keys

Type
Promise.<{'': {fileName: string, implementation: string}}>

(inner) getUserTaskImplementationString() → {String}

Return the string for the 'implementation' attribute in a UserTask

Source:
Returns:

URL of the HTML spec

Type
String

(inner) initXml(processId, startEventId) → {String}

Creates a minimal valid proceed bpmn

Parameters:
Name Type Description
processId *

the id to use for the contained process

startEventId String

the id to use for the start event

Source:
Returns:

a minimal valid proceed bpmn

Type
String

(async, inner) manipulateElementById(bpmn, id, manipFunc) → {object|Promise.<string>}

Function that changes an element in the given xml using the given manipulation function

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

id string

the id of the element that should be changed

manipFunc manipulationFunction

the function that will be used to change the element

Source:
Returns:

the BPMN process as bpmn-moddle object or XML string based on input

Type
object | Promise.<string>

(async, inner) manipulateElementsByTagName(bpmn, tagName, manipFunc) → {object|Promise.<string>}

Function that changes all elements in the given xml with the given tagname using the given function

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

tagName string

the tagname of the elements we want to change, starts with 'bpmn:', e.g. 'bpmn:Definitions'

manipFunc manipulationFunction

the function that gets called on each element with a forEach-Loop

Source:
Returns:

the BPMN process as bpmn-moddle object or XML string based on input

Type
object | Promise.<string>

(async, inner) removeCallActivityReference(bpmn, callActivityId) → {string|object}

Remove the reference to the called process added in addCallActivityReference but remains the actual bpmn element

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

callActivityId String

The ID of the bpmn element for which the meta information should be removed

Source:
Returns:

the BPMN process as XML string or BPMN-Moddle Object based on input

Type
string | object

(async, inner) removeUnusedCallActivityReferences(bpmn) → {string|object}

Look up the given bpmn document for unused imports/custom namespaces which don't get referenced by a call activity inside this bpmn document.

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

the BPMN process as XML string or BPMN-Moddle Object based on input

Type
string | object

(async, inner) setDefinitionsId(bpmn, id) → {object|Promise.<string>}

Sets id in definitions element to given id, if an id already exists and differs from the new one the old id will be saved in the originalId field

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

id string

the id we want to set the definitions element to

Source:
Returns:

the modified BPMN process as bpmn-moddle object or XML string based on input

Type
object | Promise.<string>

(async, inner) setDefinitionsName(bpmn, name) → {object|Promise.<string>}

Sets name in definitions element to given name

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

name string

the id we want to set the definitions element to

Source:
Returns:

the modified BPMN process as bpmn-moddle object or XML string based on input

Type
object | Promise.<string>

(async, inner) setDeploymentMethod(bpmn, method) → {object|Promise.<string>}

Sets deployment method of a process

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

method string

the method we want to set (dynamic/static)

Source:
Returns:

the modified BPMN process as bpmn-moddle object or XML string based on input

Type
object | Promise.<string>

(async, inner) setMachineInfo(bpmn, machineInfo) → {string|object}

Function that sets the machineInfo of all elements in the given xml with the given machineIds

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

machineInfo Array.<Object>

the machineAddresses and machineIps of all the elements we want to set

Source:
Returns:

the BPMN process as XML string or BPMN-Moddle Object based on input

Type
string | object

(async, inner) setMetaData(bpmn, elId, metaValues) → {string|object}

Updates the Meta Information of an element

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

elId String

the id of the element to update

metaValues Object

the meta data values to set

Source:
Returns:

the BPMN process as XML string or BPMN-Moddle Object based on input

Type
string | object

(inner) setMetaDataInMetaElement(meta, type, value, moddle) → {undefined|Object}

Changes/Adds an element inside a proceed:Meta element

might be either a specific meta element like proceed:costsPlanned or a generic meta value defined inside a proceed:property element

Parameters:
Name Type Description
meta Object

the meta element to make changes in

type String

the type of meta value we want to change

value String | Object

either a string representing the value inside the final elements body or an already complete element represented by an object

moddle Object

a bpmn-moddle instance to create elements with

Source:
Returns:

the previous value stored under the given meta type

Type
undefined | Object

(async, inner) setProcessId(bpmn, id) → {string}

Sets name in definitions element to given name

Parameters:
Name Type Description
bpmn string

the xml we want to update

id string

the id we want to set for the process inside the bpmn

Source:
Returns:

the modified BPMN process as bpmn-moddle object or XML string based on input

Type
string

(async, inner) setStandardDefinitions(bpmn, exporterName, exporterVersion) → {object|Promise.<string>}

Sets exporter, exporterVersion, expressionLanguage, typeLanguage and needed namespaces on defintions element stores the previous values of exporter and exporterVersion if there are any

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

exporterName String

the exporter name

exporterVersion String

the exporter version

Source:
Returns:

the modified BPMN process as bpmn-moddle object or XML string based on input

Type
object | Promise.<string>

(async, inner) setTargetNamespace(bpmn, id) → {object|Promise.<string>}

Sets targetNamespace in definitions element to https://docs.proceed-labs.org/${id}, keeps existing namespace as originalTargetNamespace

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

id string

the id to be used for the targetNamespace

Source:
Returns:

the modified BPMN process as bpmn-moddle object or XML string based on input

Type
object | Promise.<string>

(async, inner) setUserTaskData(bpmn, userTaskId, newFileName, newImplementationopt) → {string|object}

Sets the 'fileName' and 'implementation' attributes of a UserTask with new values.

Parameters:
Name Type Attributes Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

userTaskId string

the userTaskId to look for

newFileName string

the new value of 'fileName' attribute

newImplementation string <optional>

the new value of 'implementation' attribute; will default to html implementation

Source:
Returns:

the BPMN process as XML string or BPMN-Moddle Object based on input

Type
string | object

(inner) toBpmnObject(xml, typenameopt) → {Promise.<Object>}

Function that converts the given XML to a traversable object representation

Parameters:
Name Type Attributes Description
xml string

the BPMN XML that should be converted

typename string <optional>

name of the root element, optional

Source:
Throws:
  • if the given string is not an XML

    Type
    Error
  • if the given XML can not be converted to a bpmn-moddle object (multiple possible reasons)

    Type
    Error
Returns:

a traversable object representation of the given XML

Type
Promise.<Object>

(inner) toBpmnXml(bpmn) → {Promise.<string>}

Function that converts the given bpmn object to xml

Parameters:
Name Type Description
bpmn Object

traversable object representation

Source:
Returns:

a xml representation of the given object

Type
Promise.<string>

(async, inner) validateCalledProcess(xml, processId)

Checks if a process referenced in a call activity contains only a single non-typed start event

Parameters:
Name Type Description
xml String
processId String
Source:

Type Definitions

DefinitionsInfos

An object containing properties from the definitions element in a BPMN file.

Type:
  • object
Properties:
Name Type Description
id string

definitions id

name string

definitions name

exporter string

definitions exporter

exporterVersion string

definitions exporterVersion

targetNamespace string

definitions targetNamespace

Source:

manipulationFunction(bpmn-moddle-element)

Parameters:
Name Type Description
bpmn-moddle-element object

the element return by searching the bpmn-moddle process

Source:

Methods

(async, inner) addCallActivityReference(bpmn, callActivityId, calledBpmn, calledProcessLocation) → {string|object}

Add meta information of the called bpmn process to the bpmn file where it's getting called from. This includes a custom namespace in the definitions part, an import element as first child of definitions and the calledElement attribute of the call activity bpmn element

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

callActivityId String

The ID of the call activity bpmn element

calledBpmn String

The bpmn file of the called process

calledProcessLocation String

The DefinitionId of the calledBpmn. Combination of process name and process id

Source:
Returns:

the BPMN process as XML string or BPMN-Moddle Object based on input

Type
string | object

(async, inner) addConstraintsToElement(element, cons)

Adds the given constraint to the given bpmn element

Parameters:
Name Type Description
element Object

the bpmn BPMN-Moddle element

cons Object

object containing the hardConstraints and softConstraints

Source:

(async, inner) addConstraintsToElementById(bpmn, elementId, constraints) → {string|object}

Adds the given constraints to the bpmn element with the given id

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

elementId string
constraints Object

object containing the hardConstraints and softConstraints

Source:
Returns:

the BPMN process as XML string or BPMN-Moddle Object based on input

Type
string | object

(async, inner) addDocumentation(bpmn, description) → {string|object}

Adds a documentation element to the first process in the process definition

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

description string

the content for the documentation element

Source:
Returns:

the BPMN process as XML string or BPMN-Moddle Object based on input

Type
string | object

(async, inner) addDocumentationToProcessObject(processObj, description)

Adds documentation to a given process object

Parameters:
Name Type Description
processObj Object
description String
Source:

(async, inner) addSubprocessContentToProcessXML(mainProcessBPMN, subprocessBPMN, subprocessId)

Adds content of a subprocess into the main process in which the subprocess is used

Parameters:
Name Type Description
mainProcessBPMN string

the process definition as XML string

subprocessBPMN string

the content of the subprocess as XML string

subprocessId string

ID of the subprocess in which the content should be inserted

Source:

(inner) ensureCorrectProceedNamespace(xml)

Sets the xmlns:proceed attribute in the definitions element of the bpmn to the one expected in our custom schema

This is to make sure that importing the xml with bpmn-moddle will not lead to every proceed element being prefixed with ns0

Parameters:
Name Type Description
xml String
Source:

(inner) ensureExtensionElements(element) → {Object}

Returns the extensionElements entry inside the given element (creates one if there isn't one already)

Parameters:
Name Type Description
element Object

the element we want the extensionElements entry of

Source:
Returns:

the extensionElements entry

Type
Object

(inner) ensureMetaElement(element) → {Object}

Returns the meta entry inside a given element (creates it if there isn't already one)

Parameters:
Name Type Description
element Object

the element we want the meta entry of

Source:
Returns:

the meta entry

Type
Object

(inner) generateBpmnId(prefixopt) → {string}

Generate a new ID for PROCEED BPMN elements

Parameters:
Name Type Attributes Description
prefix String <optional>

optional prefix for the id

Source:
Returns:

short id in the form '0bkz1kb'

Type
string

(inner) generateDefinitionsId() → {string}

Generate a new ID for the 'definitions' element in a PROCEED process

Source:
Returns:

a new PROCEED definitions 'id'

Type
string

(inner) generateUserTaskFileName()

Generates the 'fileName' attribute string of a PROCEED UserTask

Source:
Returns:

A new 'filename' value

(async, inner) getAllBpmnFlowElementIds(bpmn) → {Promise.<Array.<String>>}

Gets the Id of every Task|Event|Gateway|CallActivity|SubProcess|SequenceFlow inside a BPMN process

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

Ids of every element inside a BPMN process

Type
Promise.<Array.<String>>

(async, inner) getAllBpmnFlowElements(bpmn) → {Promise.<Array.<object>>}

Gets every Task|Event|Gateway|CallActivity|SubProcess|SequenceFlow inside a BPMN process

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

every element inside a BPMN process

Type
Promise.<Array.<object>>

(async, inner) getAllBpmnFlowNodeIds(bpmn) → {Promise.<Array.<String>>}

Gets the Id of every Task|Event|Gateway|CallActivity|SubProcess inside a BPMN process

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

Ids of every element inside a BPMN process

Type
Promise.<Array.<String>>

(inner) getAllElements(travObj) → {array}

A function that given a traversable object returns all occurences

Parameters:
Name Type Description
travObj object

the object we want to search in

Source:
Returns:
  • all nodes within the object
Type
array

(async, inner) getAllUserTaskFileNamesAndUserTaskIdsMapping(bpmn) → {Promise.<{'': ''}>}

Creates a map (object) that contains the 'fileName' (key) and UserTask-IDs (value) for every UserTask in a BPMN process.

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

A map (object) that returns for every UserTask the 'fileName' (key) and UserTask-IDs (value)

Type
Promise.<{'': ''}>

(inner) getChildren(travObj) → {array}

Finds all kinds of childnodes in a given node

Parameters:
Name Type Description
travObj object

object of which we want to know the childnodes

Source:
Returns:

all childnodes of the given node

Type
array

(async, inner) getChildrenFlowElements(bpmn) → {Promise.<Array.<object>>}

Gets first-level child flow Elements Task|Event|Gateway|CallActivity|SubProcess|SequenceFlow of a process/subprocess

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

every child element inside a process/subprocess

Type
Promise.<Array.<object>>

(async, inner) getDefinitionsAndProcessIdForEveryCallActivity(bpmn) → {Promise.<{'': {definitionId: string, processId: string}}>}

Get all definitionIds for all imported Processes used in callActivities

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Throws:

see function: getTargetDefinitionsAndProcessIdForCallActivityByObject

Returns:

an object (a map) with all callActivityIds as keys

Type
Promise.<{'': {definitionId: string, processId: string}}>

(async, inner) getDefinitionsId(bpmn) → {Promise.<string>}

Returns id of the given process definition

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

The id stored in the definitions field of the given bpmn process

Type
Promise.<string>

(async, inner) getDefinitionsInfos(bpmn) → {Promise.<DefinitionsInfos>}

Gets the 'definitions' root element from the given BPMN XML

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

The 'definitions' root element with some selected attributes

Type
Promise.<DefinitionsInfos>

(async, inner) getDefinitionsName(bpmn) → {Promise.<string>}

Returns the name of the given bpmn process definition

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:
  • The name stored in the definitions field of the given bpmn process
Type
Promise.<string>

(async, inner) getDeploymentMethod(bpmn) → {Promise.<string>}

Gets deployment method of the given process

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

the deployment method used for the given process

Type
Promise.<string>

(inner) getElementById(travObj, id) → {object|undefined}

A function that given a traversable object returns the nested object with the given id

Parameters:
Name Type Description
travObj object

the object we want to search in

id string

the id of the object we want to find

Source:
Returns:
  • returns the found object or undefined when no matching object was found
Type
object | undefined

(inner) getElementDI(element, definitionsopt)

Gets the diagram element for the given model element

Parameters:
Name Type Attributes Description
element Object

the model element

definitions Object <optional>

the definitions object to search in

Source:

(async, inner) getElementMachineMapping(bpmn) → {Promise.<Object>}

Returns a mapping of the ids of the process nodes to the machines they are mapped to

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

the mapping from a node id to information about the machine it is mapped to

Type
Promise.<Object>

(inner) getElementsByTagName(travObj, tagname) → {array}

A function that given a traversable object returns all occurences of a given tagName

Parameters:
Name Type Description
travObj object

the object we want to search in

tagname string

the name we are searching for

Source:
Returns:
  • all nodes with the given tagName
Type
array

(inner) getExporterName() → {string}

Exporter name is used in the bpmn definitions parts

Source:
Returns:

static exporter name

Type
string

(inner) getExporterVersion() → {string}

Exporter version is used in the bpmn definitions parts

This version should be adjusted when this module (bpmn-helper) changes or any changes in the management-system occur regarding the export

Source:
Returns:

static exporter version

Type
string

(async, inner) getIdentifyingInfos(bpmn) → {Promise.<{id: String, originalId: String, processIds: Array.<String>, name: String, description: String}>}

Returns information about the process that can be used to identify it

e.g. its unique id, original id and processIds for automatic identification and its name and description for human identification

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

object containing the identifying information

Type
Promise.<{id: String, originalId: String, processIds: Array.<String>, name: String, description: String}>

(async, inner) getImports(bpmn) → {Promise.<Array.<Object>>}

Returns an array of import elements for a given bpmn xml

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:
  • Arry of of import elements inside the given xml
Type
Promise.<Array.<Object>>

(inner) getLocationsFromElement(element) → {Object}

Parses the locations from a bpmn-moddle element

Parameters:
Name Type Description
element Object
Source:
Returns:

object with all locations

Type
Object

(async, inner) getMetaData(bpmn, elId) → {object}

Get the meta information of an element

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

elId String

the id of the element to update

Source:
Returns:

the meta information

Type
object

(inner) getMetaDataFromElement(element) → {Object}

Parses the meta data from a bpmn-moddle element

Parameters:
Name Type Description
element Object
Source:
Returns:

key value list of meta values

Type
Object

(inner) getMilestonesFromElement(element) → {Array}

Parses the milestones from a bpmn-moddle element

Parameters:
Name Type Description
element Object
Source:
Returns:

array with all milestones

Type
Array

(async, inner) getMilestonesFromElementById(bpmn, elementId) → {Array}

Get the milestones for given element id

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

elementId String

the id of the element

Source:
Returns:

array with all milestones

Type
Array

(async, inner) getOriginalDefinitionsId(bpmn) → {Promise.<string>|Promise.<undefined>}

Returns the value of the originalId attribute in the given process definition the originalId is the id the process had before it was imported

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

The originalId stored in the definitions field of the given bpmn process

Type
Promise.<string> | Promise.<undefined>

(async, inner) getProcessConstraints(bpmn) → {Promise.<{hardConstraints: Array, softConstraints: Array}>}

Get the Constraints of the BPMN process. (The Constraint XML elements are defined in the PROCEED XML Schema and are not standardized in BPMN.)

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
See:
Returns:

An Object (a map) where all keys are the BPMN element ids and the value is an object with the hard and soft Constraint Arrays

Type
Promise.<{hardConstraints: Array, softConstraints: Array}>

(async, inner) getProcessDocumentation(bpmn) → {Promise.<String>}

Get the content of the 'documentation' element of the first process inside a BPMN file.

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

the documentation content

Type
Promise.<String>

(inner) getProcessDocumentationByObject(processObject) → {String}

Get the content of the 'documentation' element of the given process object.

Parameters:
Name Type Description
processObject Object

a process element as BPMN-Moddle Object

Source:
Returns:

the documentation content

Type
String

(async, inner) getProcessIds(bpmn) → {Promise.<Array.<String>>}

Get all process ids from a BPMN definitions/object. (A BPMN file can contain multiple 'process' elements inside its 'definitions' element.)

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

An Array with Strings containing all IDs from every 'process' element

Type
Promise.<Array.<String>>

(inner) getResourcesFromElement(element) → {Object}

Parses the resources from a bpmn-moddle element

Parameters:
Name Type Description
element Object
Source:
Returns:

object with all resources

Type
Object

(inner) getRootFromElement(businessObject)

Returns the definitions object of the process

Parameters:
Name Type Description
businessObject Object

the businessObject of a process element

Source:

(async, inner) getStartEvents(bpmn) → {Promise.<Array.<String>>}

Function that returns ids of all start events in a bpmn process model

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

the ids of all startEvents

Type
Promise.<Array.<String>>

(async, inner) getSubprocess(bpmn, subprocessId) → {Promise.<string>}

Returns a xml with Diagram Elements just from the given subprocess and their nested Processes

Structure of XMl: Defintions

  • Process
    • FlowElements of the Process (BPMN Part)
  • Process End
  • Diagram (How to visualize the XML in the viewer) Definitions End

This function only remove all Diagram Parts that are not part of the subprocess - the flowElements are still part of the xml

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

subprocessId string

id of subprocess you want to show

Source:
Returns:

BPMN xml with only diagram parts for the subprocess

Type
Promise.<string>

(async, inner) getSubprocessContent(bpmn, subprocessId) → {string}

Returns a xml with elements inside given subprocess

Structure of XMl: Defintions

  • Process -FlowElements of the Process (BPMN Part)
  • Process End
  • Diagram (How to visualize the XML in the viewer) Definitions End

This function removes all Diagram Parts and flowElements that are not part of the subprocess

Parameters:
Name Type Description
bpmn string

the process definition of the main process as XML string or BPMN-Moddle Object

subprocessId string

id of subprocess you want to show

Source:
Returns:
  • xml with only flowElements and diagram parts inside the subprocess
Type
string

(inner) getTargetDefinitionsAndProcessIdForCallActivityByObject(bpmnObj, callActivityId) → {Object}

Get the definitionId and processId of a target called process (callActivity)

Parameters:
Name Type Description
bpmnObj Object

The BPMN XML as converted bpmn-moddle object with toBpmnObject

callActivityId string

The id of the callActivity

Source:
See:
Throws:
  • An Error if the callActivity id does not exist

  • If the callActivity has no 'calledElement' attribute

  • If the targetNamespace for a callActivity could not be found

  • If no import element could be found for a targetNamespace

Returns:

An Object with the definition and process id

Type
Object

(async, inner) getTaskConstraintMapping(bpmn) → {Promise.<{'': {hardConstraints: Array, softConstraints: Array}}>}

Get all Constraints for every BPMN Element. (The Constraint XML elements are defined in the PROCEED XML Schema and are not standardized in BPMN.)

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
See:
Returns:

An Object (a map) where all keys are the BPMN element ids and the value is an object with the hard and soft Constraint Arrays

Type
Promise.<{'': {hardConstraints: Array, softConstraints: Array}}>

(async, inner) getUserTaskFileNameMapping(bpmn) → {Promise.<{'': {fileName: string, implementation: string}}>}

Get all fileName for all userTasks, (The attribute 'filename' is defined in the PROCEED XML Schema and not a standard BPMN attribute.)

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

an object (a map) with all userTaskIds as keys

Type
Promise.<{'': {fileName: string, implementation: string}}>

(inner) getUserTaskImplementationString() → {String}

Return the string for the 'implementation' attribute in a UserTask

Source:
Returns:

URL of the HTML spec

Type
String

(inner) initXml(processId, startEventId) → {String}

Creates a minimal valid proceed bpmn

Parameters:
Name Type Description
processId *

the id to use for the contained process

startEventId String

the id to use for the start event

Source:
Returns:

a minimal valid proceed bpmn

Type
String

(async, inner) manipulateElementById(bpmn, id, manipFunc) → {object|Promise.<string>}

Function that changes an element in the given xml using the given manipulation function

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

id string

the id of the element that should be changed

manipFunc manipulationFunction

the function that will be used to change the element

Source:
Returns:

the BPMN process as bpmn-moddle object or XML string based on input

Type
object | Promise.<string>

(async, inner) manipulateElementsByTagName(bpmn, tagName, manipFunc) → {object|Promise.<string>}

Function that changes all elements in the given xml with the given tagname using the given function

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

tagName string

the tagname of the elements we want to change, starts with 'bpmn:', e.g. 'bpmn:Definitions'

manipFunc manipulationFunction

the function that gets called on each element with a forEach-Loop

Source:
Returns:

the BPMN process as bpmn-moddle object or XML string based on input

Type
object | Promise.<string>

(async, inner) removeCallActivityReference(bpmn, callActivityId) → {string|object}

Remove the reference to the called process added in addCallActivityReference but remains the actual bpmn element

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

callActivityId String

The ID of the bpmn element for which the meta information should be removed

Source:
Returns:

the BPMN process as XML string or BPMN-Moddle Object based on input

Type
string | object

(async, inner) removeUnusedCallActivityReferences(bpmn) → {string|object}

Look up the given bpmn document for unused imports/custom namespaces which don't get referenced by a call activity inside this bpmn document.

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

Source:
Returns:

the BPMN process as XML string or BPMN-Moddle Object based on input

Type
string | object

(async, inner) setDefinitionsId(bpmn, id) → {object|Promise.<string>}

Sets id in definitions element to given id, if an id already exists and differs from the new one the old id will be saved in the originalId field

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

id string

the id we want to set the definitions element to

Source:
Returns:

the modified BPMN process as bpmn-moddle object or XML string based on input

Type
object | Promise.<string>

(async, inner) setDefinitionsName(bpmn, name) → {object|Promise.<string>}

Sets name in definitions element to given name

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

name string

the id we want to set the definitions element to

Source:
Returns:

the modified BPMN process as bpmn-moddle object or XML string based on input

Type
object | Promise.<string>

(async, inner) setDeploymentMethod(bpmn, method) → {object|Promise.<string>}

Sets deployment method of a process

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

method string

the method we want to set (dynamic/static)

Source:
Returns:

the modified BPMN process as bpmn-moddle object or XML string based on input

Type
object | Promise.<string>

(async, inner) setMachineInfo(bpmn, machineInfo) → {string|object}

Function that sets the machineInfo of all elements in the given xml with the given machineIds

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

machineInfo Array.<Object>

the machineAddresses and machineIps of all the elements we want to set

Source:
Returns:

the BPMN process as XML string or BPMN-Moddle Object based on input

Type
string | object

(async, inner) setMetaData(bpmn, elId, metaValues) → {string|object}

Updates the Meta Information of an element

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

elId String

the id of the element to update

metaValues Object

the meta data values to set

Source:
Returns:

the BPMN process as XML string or BPMN-Moddle Object based on input

Type
string | object

(inner) setMetaDataInMetaElement(meta, type, value, moddle) → {undefined|Object}

Changes/Adds an element inside a proceed:Meta element

might be either a specific meta element like proceed:costsPlanned or a generic meta value defined inside a proceed:property element

Parameters:
Name Type Description
meta Object

the meta element to make changes in

type String

the type of meta value we want to change

value String | Object

either a string representing the value inside the final elements body or an already complete element represented by an object

moddle Object

a bpmn-moddle instance to create elements with

Source:
Returns:

the previous value stored under the given meta type

Type
undefined | Object

(async, inner) setProcessId(bpmn, id) → {string}

Sets name in definitions element to given name

Parameters:
Name Type Description
bpmn string

the xml we want to update

id string

the id we want to set for the process inside the bpmn

Source:
Returns:

the modified BPMN process as bpmn-moddle object or XML string based on input

Type
string

(async, inner) setStandardDefinitions(bpmn, exporterName, exporterVersion) → {object|Promise.<string>}

Sets exporter, exporterVersion, expressionLanguage, typeLanguage and needed namespaces on defintions element stores the previous values of exporter and exporterVersion if there are any

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

exporterName String

the exporter name

exporterVersion String

the exporter version

Source:
Returns:

the modified BPMN process as bpmn-moddle object or XML string based on input

Type
object | Promise.<string>

(async, inner) setTargetNamespace(bpmn, id) → {object|Promise.<string>}

Sets targetNamespace in definitions element to https://docs.proceed-labs.org/${id}, keeps existing namespace as originalTargetNamespace

Parameters:
Name Type Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

id string

the id to be used for the targetNamespace

Source:
Returns:

the modified BPMN process as bpmn-moddle object or XML string based on input

Type
object | Promise.<string>

(async, inner) setUserTaskData(bpmn, userTaskId, newFileName, newImplementationopt) → {string|object}

Sets the 'fileName' and 'implementation' attributes of a UserTask with new values.

Parameters:
Name Type Attributes Description
bpmn string | object

the process definition as XML string or BPMN-Moddle Object

userTaskId string

the userTaskId to look for

newFileName string

the new value of 'fileName' attribute

newImplementation string <optional>

the new value of 'implementation' attribute; will default to html implementation

Source:
Returns:

the BPMN process as XML string or BPMN-Moddle Object based on input

Type
string | object

(inner) toBpmnObject(xml, typenameopt) → {Promise.<Object>}

Function that converts the given XML to a traversable object representation

Parameters:
Name Type Attributes Description
xml string

the BPMN XML that should be converted

typename string <optional>

name of the root element, optional

Source:
Throws:
  • if the given string is not an XML

    Type
    Error
  • if the given XML can not be converted to a bpmn-moddle object (multiple possible reasons)

    Type
    Error
Returns:

a traversable object representation of the given XML

Type
Promise.<Object>

(inner) toBpmnXml(bpmn) → {Promise.<string>}

Function that converts the given bpmn object to xml

Parameters:
Name Type Description
bpmn Object

traversable object representation

Source:
Returns:

a xml representation of the given object

Type
Promise.<string>

(async, inner) validateCalledProcess(xml, processId)

Checks if a process referenced in a call activity contains only a single non-typed start event

Parameters:
Name Type Description
xml String
processId String
Source:

Type Definitions

DefinitionsInfos

An object containing properties from the definitions element in a BPMN file.

Type:
  • object
Properties:
Name Type Description
id string

definitions id

name string

definitions name

exporter string

definitions exporter

exporterVersion string

definitions exporterVersion

targetNamespace string

definitions targetNamespace

Source:

manipulationFunction(bpmn-moddle-element)

Parameters:
Name Type Description
bpmn-moddle-element object

the element return by searching the bpmn-moddle process

Source: