minor fixes to the Bpmn-js-subworkflow spec.
This commit is contained in:
parent
af88025a96
commit
e92f48da7c
|
@ -184,9 +184,10 @@ bpmnModeler.on('spiff.dmn_files.requested', (event) => {
|
||||||
// As call activites might refernce processes across the system
|
// As call activites might refernce processes across the system
|
||||||
// it should be possible to search for a paticular call activity.
|
// it should be possible to search for a paticular call activity.
|
||||||
bpmnModeler.on('spiff.callactivity.search', (event) => {
|
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', {
|
event.eventBus.fire('spiff.callactivity.update', {
|
||||||
value: 'searched_bpmn_id',
|
value: 'searched_bpmn_id',
|
||||||
|
element: event.element,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -107,11 +107,11 @@ function FindProcessButton(props) {
|
||||||
const processId = getCalledElementValue(element);
|
const processId = getCalledElementValue(element);
|
||||||
|
|
||||||
// First, set up the listen, then fire the event, just
|
// 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) => {
|
eventBus.once('spiff.callactivity.update', (response) => {
|
||||||
commandStack.execute('element.updateProperties', {
|
commandStack.execute('element.updateProperties', {
|
||||||
element,
|
element: response.element,
|
||||||
moddleElement: element.businessObject,
|
moddleElement: response.element.businessObject,
|
||||||
properties: {
|
properties: {
|
||||||
calledElement: response.value,
|
calledElement: response.value,
|
||||||
},
|
},
|
||||||
|
@ -120,6 +120,7 @@ function FindProcessButton(props) {
|
||||||
eventBus.fire('spiff.callactivity.search', {
|
eventBus.fire('spiff.callactivity.search', {
|
||||||
processId,
|
processId,
|
||||||
eventBus,
|
eventBus,
|
||||||
|
element
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
children: 'Search',
|
children: 'Search',
|
||||||
|
|
|
@ -53,7 +53,10 @@ export function SpiffExtensionSelect(props) {
|
||||||
}
|
}
|
||||||
const getOptions = () => {
|
const getOptions = () => {
|
||||||
const optionList = [];
|
const optionList = [];
|
||||||
if (optionType in spiffExtensionOptions) {
|
if (
|
||||||
|
optionType in spiffExtensionOptions &&
|
||||||
|
spiffExtensionOptions[optionType] !== null
|
||||||
|
) {
|
||||||
spiffExtensionOptions[optionType].forEach((opt) => {
|
spiffExtensionOptions[optionType].forEach((opt) => {
|
||||||
optionList.push({
|
optionList.push({
|
||||||
label: opt.label,
|
label: opt.label,
|
||||||
|
|
|
@ -102,8 +102,9 @@ describe('Call Activities should work', function () {
|
||||||
});
|
});
|
||||||
await pressButton(button);
|
await pressButton(button);
|
||||||
expect(launchEvent.processId).to.exist;
|
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);
|
const textInput = domQuery('input', entry);
|
||||||
expect(businessObject.get('calledElement')).to.equal('searchedProcessId');
|
expect(businessObject.get('calledElement')).to.equal('searchedProcessId');
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue