mirror of
https://github.com/sartography/bpmn-js-spiffworkflow.git
synced 2025-02-23 13:08:11 +00:00
include correlationProperty id (the key) with the expression
This commit is contained in:
parent
89200853d9
commit
9bc92b54f6
@ -3,6 +3,7 @@
|
|||||||
* @param element
|
* @param element
|
||||||
*/
|
*/
|
||||||
export function getRoot(element) {
|
export function getRoot(element) {
|
||||||
|
// todo: Do we want element to be a shape or moddle object?
|
||||||
if (element.$type === 'bpmn:Definitions') {
|
if (element.$type === 'bpmn:Definitions') {
|
||||||
return element;
|
return element;
|
||||||
} else if ( typeof element.$parent != 'undefined') {
|
} else if ( typeof element.$parent != 'undefined') {
|
||||||
@ -20,10 +21,14 @@ export function findFormalExpressions(element) {
|
|||||||
if (root.$type === 'bpmn:Definitions') {
|
if (root.$type === 'bpmn:Definitions') {
|
||||||
for (const child_element of root.rootElements) {
|
for (const child_element of root.rootElements) {
|
||||||
if (child_element.$type === 'bpmn:CorrelationProperty') {
|
if (child_element.$type === 'bpmn:CorrelationProperty') {
|
||||||
|
|
||||||
let retrieval_expression = processCorrelationProperty(child_element, element.messageRef);
|
let retrieval_expression = processCorrelationProperty(child_element, element.messageRef);
|
||||||
// todo: is there a better test for this than length === 1?
|
// todo: is there a better test for this than length === 1?
|
||||||
if (retrieval_expression.length === 1){
|
if (retrieval_expression.length === 1){
|
||||||
formalExpressions.push(retrieval_expression[0]);
|
let formalExpression = {};
|
||||||
|
formalExpression['correlationId'] = child_element.id;
|
||||||
|
formalExpression['expression'] = retrieval_expression[0];
|
||||||
|
formalExpressions.push(formalExpression);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user