burnettk 9273e6425b Squashed 'bpmn-js-spiffworkflow/' changes from 6007a770a..9762eb631
9762eb631 updated data object category to just category
2169b54d3 Merge pull request #58 from sartography/feature/data-object-category
1816c7f08 fixed tests w/ burnettk
d888c37b0 added support to add categories to data objects in extensions w/ burnettk
b00abf00c Merge pull request #57 from sartography/feature/dataObject-naming-with-dataState
ae4bd8154 Fix Overrided Label editing provider bug
bfbfb0106 Merge pull request #56 from sartography/enhancements/condition-expression
3b4f06b8c Switch from TextField to textAreaFieal
ec81cfa0b Done with basic unic testing
9c1d9afac Implement new tests
123037d8e Before implementing new tests
84a0667ec Remove Consoles
511a9c9c3 Done with Fixing Broken Tests
37e71bdef Handle Broken Tests 5
7aa03cd39 Handle Broken Test 4
80dcc92d2 Handle Broken Tests 3
d3a1f3825 Handle Broken Tests 2
e598f86fe Broken Tests
5289bd6ee Add Rename references to dataObjectHelpers
cc2482ad4 Handle Manual Changes
f3d5a94c9 Add LabelEditing Provider
ab311a29f NPM RUN LINT
39d0cf616 Before Implement Manual Change
84d6e20ff OnChange Events
e35578061 Remove Name Input
ee68f07f2 Update reference name on change dataObj Name
845c3edc4 INNIT
eae58f559 Merge pull request #53 from sartography/feature/data-store-props
aa6640e38 Ready To Deploy
2778c764f Last
a368d0cec Feature is implemented
3d757eca9 Add Interceptors
d1fe1d2b2 Remove duplicate group
f0e98ceea Merging
cd6546d3e Add bpmn:dataStore in the level of process definition
2a4c1ffc6 linting.
71cf495df Implement Tests
c1dbb1599 Merge pull request #51 from sartography/dependabot/github_actions/JS-DevTools/npm-publish-3
5460f57fd Merge pull request #52 from sartography/dependabot/github_actions/actions/setup-node-4
eedab6e82 Bump actions/setup-node from 3 to 4
04186b903 Merge pull request #48 from sartography/feature/add-conditional-events
10bcfce4f No param sort (#50)
025f428cd Bump JS-DevTools/npm-publish from 2 to 3
4d160b8cb display condition panel for conditional events and inclusive gateway sources

git-subtree-dir: bpmn-js-spiffworkflow
git-subtree-split: 9762eb631de107aac584fce1c056070cdaed171e
2023-12-13 10:19:59 -05:00

Tests

SpiffWorkflow Extensions for BPMN.js

This package provides extensions that can be applied to BPMN.js that will enable some important features of SpiffWorkflow - the Python BPMN Library for executing business processes. See below for more information.

IMPORTANT: This is a work in progress, and is not yet released.

About

This extension creates a BPMN editor with all the capabilities of BPMN.js and the following additions / modifications:

  • Ability to insert BPMN's Data Input and Data Output Objects.
  • A SpiffWorkflow centric Properties Panel for specifying scripts to run before and after a task, and for defining documentation, and Mark-up content for displaying in user and manual tasks. Among other things.

Data Input and Data Output Element

This extension will allow you to drag BPMN Data Input and Data Output elements onto the diagram and give them appropriate labels. This will generate valid BPMN elements in the underlying XML file - connecting them to the IO Specification of the process, as shown below:

  <bpmn:process id="my_delightful_process" isExecutable="true">
    <bpmn:ioSpecification>
      <bpmn:dataInput id="DataInput-745019423-1" name="num_dogs" />
      <bpmn:dataOutput id="DataOutput-711207596-1" name="happy_index" />
    </bpmn:ioSpecification>
    ...

Screenshot

Using these data input and outputs will allow you to create processes designed to be used as Call Activities. SpiffWorkflow (in a soon-to-be released version) will pick up this information, and enforce it. So that you must provide these input variables to execute, and only the variables mentioned in the output will be passed back to the calling process.

Usage

import BpmnModeler from 'bpmn-js/lib/Modeler';
import spiffworkflow from 'bpmn-js-spiffworkflow/app/spiffworkflow';


var bpmnJS = new BpmnModeler({
  additionalModules: [
    spiffworkflow
  ],
  moddleExtensions: {
    spiffworkflowModdle: spiffModdleExtension
  }
});

Run the Example

You need a NodeJS development stack with npm installed to build the project.

To install all project dependencies execute

npm install

To start the example execute

npm start

To build the example into the public folder execute

npm run all

Integration Points

You can use the EventBus to communicate with this UI, sending and receiving messages to change the behavior of the editor making it easier for your end users. There are many examples of 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 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'}]

License

MIT

Description
SpiffWorkflow is a software development platform for building, running, and monitoring executable diagrams
https://www.spiffworkflow.org/
Readme LGPL-2.1
Languages
Python 61.9%
TypeScript 32.3%
Shell 2.9%
JavaScript 1.1%
CSS 1%
Other 0.8%