Code Monkey home page Code Monkey logo

spiffworkflow's Introduction

Spiff Workflow

Build Status Coverage Status Code Climate Documentation Status

Summary

Spiff Workflow is a workflow engine implemented in pure Python. It is based on the excellent work of the Workflow Patterns initiative.

Do you need commercial support?

Spiff Workflow is supported by Procedure 8. Get in touch if you need anything!

Main design goals

  • Spiff Workflow aims to directly support as many of the patterns of workflowpatterns.com as possible.
  • Spiff Workflow uses unit testing as much as possible.
  • Spiff Workflow provides a clean Python API.
  • Spiff Workflow allows for mapping patterns into workflow elements that are easy to understand for non-technical users in a workflow GUI editor.
  • Spiff Workflow implements the best possible path prediction for workflows.

Spiff Workflow also provides a parser and workflow emulation layer that can be used to create executable Spiff Workflow specifications from Business Process Model and Notation (BPMN) documents.

Quick Intro

The process of using Spiff Workflow involves the following steps:

  1. Write a workflow specification. A specification may be written using XML (example), JSON, or Python (example).
  2. Run the workflow using the Python API. Example code for running the workflow:
from SpiffWorkflow.specs import WorkflowSpec
from SpiffWorkflow.serializer.prettyxml import XmlSerializer
from SpiffWorkflow import Workflow

# Load the workflow specification:
with open('my_workflow.xml') as fp:
    serializer = XmlSerializer()
    spec = WorkflowSpec.deserialize(serializer, fp.read())

# Create an instance of the workflow, according to the specification.
wf = Workflow(spec)

# Complete tasks as desired. It is the job of the workflow engine to
# guarantee a consistent state of the workflow.
wf.complete_task_from_id(...)

# Of course, you can also persist the workflow instance:
xml = wf.serialize(XmlSerializer, 'workflow_state.xml')

Documentation

Full documentation is here:

http://spiffworkflow.readthedocs.io/en/latest/

spiffworkflow's People

Contributors

chrisns avatar conlini avatar daxtens avatar demostenes avatar etiktin avatar faassen avatar filipefigcorreia avatar jplana avatar knipknap avatar leifker avatar matthewhampton avatar mikejarrett avatar mmcardle avatar neilcarr71 avatar rs-randallburt avatar stoyanovd avatar xordoquy avatar ziadsawalha avatar ztane avatar

Watchers

 avatar

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.