From 9b62676d4f2c3ad76431ee4f2538a3b80ab4c3aa Mon Sep 17 00:00:00 2001 From: Dan Date: Mon, 14 Nov 2022 11:22:06 -0500 Subject: [PATCH] Return the event bus when calling a search. --- bpmn-js-spiffworkflow/README.md | 49 ++++++++++--------- .../CallActivityPropertiesProvider.js | 2 +- 2 files changed, 26 insertions(+), 25 deletions(-) diff --git a/bpmn-js-spiffworkflow/README.md b/bpmn-js-spiffworkflow/README.md index 43c3eb8e5..de473b9f3 100644 --- a/bpmn-js-spiffworkflow/README.md +++ b/bpmn-js-spiffworkflow/README.md @@ -71,30 +71,31 @@ the behavior of the editor making it easier for your end users. There are many this in the app.js file. Below is a table of all the events that are sent and accepted: -| Event Name | Description | Fired or Acceped | Parameters | Description | -|--------------------------------|------------------------------------------------------------------------------| ---------------- |----------------------|--------------------------------------------------------------------------| -| spiff.service\_tasks.requested | Request a list of available services that can be called from a service task. | Fired | \- | | -| spiff.service\_tasks.returned | Provides a list of services. | Recieved | serviceTaskOperators | ex: \[{id:'Chuck Facts', parameters\[{id:'category', type:'string'}\]}\] | -| spiff.script.edit | Request to edit a python script in some sort of facy editor. | Fired | scriptType | one of: script, preScript, postScript | -| | | | value | The actual python script | -| | | | element | The element that needs updating | -| | | | eventBus | Used by receiver to fire back an event | -| spiff.script.update | Update a python script to a new value. | Recieved | scriptType | one of: script, preScript, postScript | -| | | | value | The updated script | -| | | | element | The element that needs updating | -| spiff.markdown.edit | Request to edit markdown in a fancy editor. | Fired | element | The element that needs updating | -| | | | value | The current markdown content | -| spiff.markdown.update | Update Markdown content for a paticular elements 'instructions'. | Recieved | element | The element that needs updating | -| | | | value | Tne updated Markdown content | -| spiff.callactivity.edit | Requst to edit a call activity by process id. | Fired | processId | The Process the users wants to edit | -| spiff.callactivity.search | Requst to search for a call activity | Fired | | | -| spiff.callactivity.update | Update the process id from a call activity (based on search) | Fired | processId | The Process the users wants to edit | -| spiff.file.edit | request to edit a file, but file name. | Fired | value | The file name the user wants to edit | -| spiff.dmn.edit | request to edit a dmn by process id. | Fired | value | The DMN id the user wants to edit | -| spiff.json\_files.requested | request a list of local json files. | Fired | optionType | The type of options required ('json' or 'dmn') | -| spff.dmn\_files.requested | request of list of local dmn files. | | | | -| spiff.json\_files.returned | Return a list of available json files | Recieved | options | \[{lable:'My Label', value:'1'}\] | -| spff.dmn\_files.returned | Return a list of available dmn files. | Recieved | options | \[{lable:'My Label', value:'1'}\] | +| Event Name | Description | Fired or Acceped | Parameters | Description | +|--------------------------------|------------------------------------------------------------------|---------|----------------------|--------------------------------------------------------------------------| +| spiff.service\_tasks.requested | Request a list of available services for service task. | Fired | \- | | +| spiff.service\_tasks.returned | Provides a list of services. | Recieved | serviceTaskOperators | ex: \[{id:'Chuck Facts', parameters\[{id:'category', type:'string'}\]}\] | +| spiff.script.edit | Request to edit a python script in some sort of facy editor. | Fired | scriptType | one of: script, preScript, postScript | +| | | | value | The actual python script | +| | | | element | The element that needs updating | +| | | | eventBus | Used by receiver to fire back an event | +| spiff.script.update | Update a python script to a new value. | Recieved | scriptType | one of: script, preScript, postScript | +| | | | value | The updated script | +| | | | element | The element that needs updating | +| spiff.markdown.edit | Request to edit markdown in a fancy editor. | Fired | element | The element that needs updating | +| | | | value | The current markdown content | +| spiff.markdown.update | Update Markdown content for a paticular elements 'instructions'. | Recieved | element | The element that needs updating | +| | | | value | Tne updated Markdown content | +| spiff.callactivity.edit | Requst to edit a call activity by process id. | Fired | processId | The Process the users wants to edit | +| spiff.callactivity.search | Requst to search for a call activity | Fired | processUd | The currently seleted process id | +| | | | eventBus | For sending back the selected process id. | +| spiff.callactivity.update | Update the process id from a call activity (based on search) | Received | processId | The Process the users wants to edit | +| spiff.file.edit | request to edit a file, but file name. | Fired | value | The file name the user wants to edit | +| spiff.dmn.edit | request to edit a dmn by process id. | Fired | value | The DMN id the user wants to edit | +| spiff.json\_files.requested | request a list of local json files. | Fired | optionType | The type of options required ('json' or 'dmn') | +| spff.dmn\_files.requested | request of list of local dmn files. | | | | +| spiff.json\_files.returned | Return a list of available json files | Recieved | options | \[{lable:'My Label', value:'1'}\] | +| spff.dmn\_files.returned | Return a list of available dmn files. | Recieved | options | \[{lable:'My Label', value:'1'}\] | diff --git a/bpmn-js-spiffworkflow/app/spiffworkflow/callActivity/propertiesPanel/CallActivityPropertiesProvider.js b/bpmn-js-spiffworkflow/app/spiffworkflow/callActivity/propertiesPanel/CallActivityPropertiesProvider.js index c5d20851a..1e050f3d0 100644 --- a/bpmn-js-spiffworkflow/app/spiffworkflow/callActivity/propertiesPanel/CallActivityPropertiesProvider.js +++ b/bpmn-js-spiffworkflow/app/spiffworkflow/callActivity/propertiesPanel/CallActivityPropertiesProvider.js @@ -106,8 +106,8 @@ function FindProcessButton(props) { onClick: () => { const processId = getCalledElementValue(element); eventBus.fire('spiff.callactivity.search', { - element, processId, + eventBus, }); // Listen for a response, to update the script. eventBus.once('spiff.callactivity.update', (response) => {