Comments (6)
The best way to do this is via customizing the script engine. If you run into an error during some sort of external call, the script engine can catch it and send it back to the workflow, using the catch
method. I'm actually putting an example of this together, which I can point you to when I finish it, but hopefully this gives you some guidance in the meantime.
from spiffworkflow.
This PR #403 contains documentation for a new example that sends an event to a running workflow based on the outcome of a service task.
from spiffworkflow.
Thank you! Waiting for later details
from spiffworkflow.
Here is some example code for generating events: https://github.com/sartography/spiff-example-cli/blob/main/spiff_example/misc/event_handler.py
And the accompanying docs: https://spiffworkflow.readthedocs.io/en/latest/bpmn/script_engine.html#generating-bpmn-events-inside-the-scripting-environment
I actually ended up writing a custom service task instead of using the script engine, because that was easier to do in the example application, but you could do this in either place (there's a note about this in the docs).
Let me know if this helps -- if anything is not clear enough I can attempt to update the docs based on any comments you have.
from spiffworkflow.
Did this help answer your question?
from spiffworkflow.
Related Issues (20)
- Fix error message for missing start event HOT 2
- BpmnParser.find_all_specs() breaks with nested subprocess HOT 1
- SpiffWorkflow.bpmn.parser.ValidationException.ValidationException: No DMN Diagram available with id "None", Available DMN ids are: product_prices. HOT 1
- Support conditional events
- remove Box from the script engine enviroments
- Spiffworkflow Library - State Transitions HOT 3
- Update documentation HOT 1
- Cycle timer child task doesn't inherit parent task data HOT 2
- Workflow with endless cycle timer boundary event never completes HOT 2
- first cycle of cycle timer executes immediately HOT 2
- Error "IllegalMonthError: bad month number 13; must be 1-12" on Boundary Cycle Timer 1 month
- Figure out how to keep the example repo in sync wth this one
- Workflow Prematurely Ends After Timer Start Event in SpiffWorkflow v3.0.0rc2 HOT 2
- Type in the releast notes. HOT 1
- Multiple Inputs to a Task HOT 1
- Workflow gets bogged down when a task has too many children HOT 2
- update parser to handle correlations on recieve tasks
- Allow Schema / Validator on Workflow Data (inputs/outputs/stores) in Spiffworkflow lib
- Rewrite parser
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spiffworkflow.