-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
663 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/cloud-element-templates/create/CalledElementBindingProvider.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { | ||
ensureExtension | ||
} from '../CreateHelper'; | ||
import { getDefaultValue } from '../Helper'; | ||
|
||
import { ensureNoPropagation } from '../util/calledElement'; | ||
|
||
|
||
export class CalledElementBindingProvider { | ||
static create(element, options) { | ||
const { | ||
property, | ||
bpmnFactory | ||
} = options; | ||
|
||
const { | ||
binding | ||
} = property; | ||
|
||
const { | ||
property: propertyName | ||
} = binding; | ||
|
||
const value = getDefaultValue(property); | ||
|
||
const calledElement = ensureExtension(element, 'zeebe:CalledElement', bpmnFactory); | ||
|
||
// TODO(@barmac): remove if we decide to support propagation in templates | ||
ensureNoPropagation(calledElement); | ||
|
||
calledElement.set(propertyName, value); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export function ensureNoPropagation(calledElement) { | ||
calledElement.set('propagateAllChildVariables', false); | ||
calledElement.set('propagateAllParentVariables', false); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.