GithubHelp home page GithubHelp logo

Comments (6)

essweine avatar essweine commented on July 29, 2024

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.

essweine avatar essweine commented on July 29, 2024

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.

fro0m avatar fro0m commented on July 29, 2024

Thank you! Waiting for later details

from spiffworkflow.

essweine avatar essweine commented on July 29, 2024

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.

essweine avatar essweine commented on July 29, 2024

Did this help answer your question?

from spiffworkflow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.