Methods
fromFile(path, editScriptnullable) → {Node}
Parse and preprocess a process tree defined in an XML file.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
path |
String | A path to the file containing the XML document. | |
editScript |
EditScript |
<nullable> |
An edit script for recording the changes applied during preprocessing. |
- Source:
Returns:
The root of the process tree.
- Type
- Node
fromString(xml, editScriptnullable) → {Node}
Parse and preprocess a process tree defined in an XML document string.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
xml |
String | The XML document as a string. | |
editScript |
EditScript |
<nullable> |
An edit script for recording the changes applied during preprocessing. |
- Source:
Returns:
The root of the process tree.
- Type
- Node
preprocess(tree, endpointToUrl, dataElements, editScript) → {Node}
Preprocess a process tree. This removes empty elements and trims
all String content of leading or trailing whitespaces.
Parameters:
Name | Type | Description |
---|---|---|
tree |
Node | The root node of the process tree |
endpointToUrl |
Map.<String, String> | A map of endpoint IDs to URIs |
dataElements |
Map.<String, String> | A map of data elements (= variables) to their initial value |
editScript |
EditScript | An edit script for recording the edit operations applied to the tree. |
- Source:
Returns:
The root of the preprocessed tree
- Type
- Node
withMetadata(xml)
Parse an XML document representing a CPEE process tree.
This function also considers data outside the DSL-element tree such as the
list of endpoints and data elements.
Parameters:
Name | Type | Description |
---|---|---|
xml |
String | The XML document as a String. |
- Source: