mirror of
https://github.com/status-im/spiff-arena.git
synced 2025-02-26 08:25:24 +00:00
minor fixes to the Bpmn-js-subworkflow spec.
This commit is contained in:
parent
95859ddcb2
commit
d7c4273c76
@ -184,9 +184,10 @@ bpmnModeler.on('spiff.dmn_files.requested', (event) => {
|
||||
// As call activites might refernce processes across the system
|
||||
// it should be possible to search for a paticular call activity.
|
||||
bpmnModeler.on('spiff.callactivity.search', (event) => {
|
||||
console.log("Firing call activity update")
|
||||
console.log("Firing call activity update", event.element)
|
||||
event.eventBus.fire('spiff.callactivity.update', {
|
||||
value: 'searched_bpmn_id',
|
||||
element: event.element,
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -107,11 +107,11 @@ function FindProcessButton(props) {
|
||||
const processId = getCalledElementValue(element);
|
||||
|
||||
// First, set up the listen, then fire the event, just
|
||||
// in case we are testing and things are happening super fast.
|
||||
// in case we are testing and things are happening superfast.
|
||||
eventBus.once('spiff.callactivity.update', (response) => {
|
||||
commandStack.execute('element.updateProperties', {
|
||||
element,
|
||||
moddleElement: element.businessObject,
|
||||
element: response.element,
|
||||
moddleElement: response.element.businessObject,
|
||||
properties: {
|
||||
calledElement: response.value,
|
||||
},
|
||||
@ -120,6 +120,7 @@ function FindProcessButton(props) {
|
||||
eventBus.fire('spiff.callactivity.search', {
|
||||
processId,
|
||||
eventBus,
|
||||
element
|
||||
});
|
||||
},
|
||||
children: 'Search',
|
||||
|
@ -53,7 +53,10 @@ export function SpiffExtensionSelect(props) {
|
||||
}
|
||||
const getOptions = () => {
|
||||
const optionList = [];
|
||||
if (optionType in spiffExtensionOptions) {
|
||||
if (
|
||||
optionType in spiffExtensionOptions &&
|
||||
spiffExtensionOptions[optionType] !== null
|
||||
) {
|
||||
spiffExtensionOptions[optionType].forEach((opt) => {
|
||||
optionList.push({
|
||||
label: opt.label,
|
||||
|
@ -102,8 +102,9 @@ describe('Call Activities should work', function () {
|
||||
});
|
||||
await pressButton(button);
|
||||
expect(launchEvent.processId).to.exist;
|
||||
expect(launchEvent.element).to.exist;
|
||||
|
||||
eventBus.fire('spiff.callactivity.update', {value: 'searchedProcessId'});
|
||||
eventBus.fire('spiff.callactivity.update', {value: 'searchedProcessId', element: launchEvent.element});
|
||||
const textInput = domQuery('input', entry);
|
||||
expect(businessObject.get('calledElement')).to.equal('searchedProcessId');
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user