SpiffWorkflow is a software development platform for building, running, and monitoring executable diagrams https://www.spiffworkflow.org/
Go to file
burnettk 3add069267 Squashed 'bpmn-js-spiffworkflow/' changes from f1f008e3e..a547888ef
a547888ef run_pyl
53378437d BPMN.io -- Just show the message names not the ids - to assure we are only exposing the names. SpiffWorkflow -     - start_messages function should return message names, not ids.     - don't catch external thrown messages within the same workflow process     - add an expected value to the Correlation Property Model so we can use this well defined class as an external communication tool (rather than building an arbitrary dictionary)     - Added a "get_awaiting_correlations" to an event, so we can get a list of the correlation properties related to the workflows currently defined correlation values.     - workflows.waiting_events() function now returns the above awaiting correlations as the value on returned message events  Backend     - Dropping MessageModel and MessageCorrelationProperties - at least for now.  We don't need them to send / receive messages though we may eventually want to track the messages and correlations defined across the system - these things (which are ever changing) should not be directly connected to the Messages which may be in flux - and the cross relationships between the tables could cause unexpected and unceissary errors.  Commented out the caching logic so we can turn this back on later.     - Slight improvement to API Errors     - MessageInstances are no longer in a many-to-many relationship with Correlations - Each message instance has a unique set of message correlations specific to the instance.     - Message Instances have users, and can be linked through a "counterpart_id" so you can see what send is connected to what recieve.     - Message Correlations are connected to  recieving message instances.  It is not to a process instance, and not to a message model.  They now include the expected value and retrieval expression required to validate an incoming message.     - A process instance is not connected to message correlations.     - Message Instances are not always tied to a process instance (for example, a Send Message from an API)     - API calls to create a message use the same logic as all other message catching code.     - Make use of the new waiting_events() method to check for any new recieve messages in the workflow (much easier than     churning through all of the tasks)     - One giant mother of a migration.

git-subtree-dir: bpmn-js-spiffworkflow
git-subtree-split: a547888ef102046bab983b9004f07d4398e9a1bc
2023-02-27 14:59:39 -05:00
.github Squashed 'bpmn-js-spiffworkflow/' content from commit b3eef6e5 2022-10-12 10:21:19 -04:00
app Squashed 'bpmn-js-spiffworkflow/' changes from f1f008e3e..a547888ef 2023-02-27 14:59:39 -05:00
docs Squashed 'bpmn-js-spiffworkflow/' content from commit b3eef6e5 2022-10-12 10:21:19 -04:00
resources Squashed 'bpmn-js-spiffworkflow/' content from commit b3eef6e5 2022-10-12 10:21:19 -04:00
test Squashed 'bpmn-js-spiffworkflow/' changes from e92f48d..aca23dc 2022-11-25 11:07:59 -05:00
.eslintrc.js Squashed 'bpmn-js-spiffworkflow/' content from commit b3eef6e5 2022-10-12 10:21:19 -04:00
.gitignore Squashed 'bpmn-js-spiffworkflow/' content from commit b3eef6e5 2022-10-12 10:21:19 -04:00
.prettierrc.js Squashed 'bpmn-js-spiffworkflow/' content from commit b3eef6e5 2022-10-12 10:21:19 -04:00
.tool-versions Squashed 'bpmn-js-spiffworkflow/' content from commit b3eef6e5 2022-10-12 10:21:19 -04:00
LICENSE Squashed 'bpmn-js-spiffworkflow/' content from commit b3eef6e5 2022-10-12 10:21:19 -04:00
README.md Squashed 'bpmn-js-spiffworkflow/' changes from 4f23f860..e92f48da 2022-11-18 10:03:38 -05:00
RELEASE_PROCESS.md Squashed 'bpmn-js-spiffworkflow/' content from commit b3eef6e5 2022-10-12 10:21:19 -04:00
karma.conf.js Squashed 'bpmn-js-spiffworkflow/' content from commit b3eef6e5 2022-10-12 10:21:19 -04:00
package-lock.json Squashed 'bpmn-js-spiffworkflow/' changes from ff9a4fd28..999ea7e4c 2022-10-31 17:19:09 -04:00
package.json Squashed 'bpmn-js-spiffworkflow/' changes from ff9a4fd28..999ea7e4c 2022-10-31 17:19:09 -04:00
webpack.config.js Squashed 'bpmn-js-spiffworkflow/' changes from aca23dc56..9252af813 2023-01-05 17:35:24 -05:00

README.md

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