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.
Closing since I haven't received any feedback.
from spiffworkflow.
Related Issues (20)
- 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
- Evaluate performance improvements to MI tasks
- Bounty Test Issue - SpiffWorkFlow - Open - Claim
- Multi-Instance Task: Parallel Execution Issue with Data Store Inputs HOT 1
- Process Instance Migration: Compare two process models to find differences HOT 1
- Process Instance Migration: Find all completed tasks in a Process Instance HOT 2
- Process Instance Migration: Update the process instance with a new model HOT 2
- Refactor event based gateways
- Madhu Test Bounty Issue 1 in SpiffWorkflow
- investigate optimization task retrieval
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.