Skip to content
This repository was archived by the owner on May 25, 2023. It is now read-only.

geru-br/pyramid_workflow

 
 

Repository files navigation

pyramid_workflow

https://secure.travis-ci.org/datakurre/pyramid_workflow.png

This package is a shameless derivate of substanced.workflow module without substanced dependencies (besides its LICENSE, of course).

Differences from substanced.workflow:

  • workflow requires state_attr as its first positional argument similarly to the original repoze.workflow (and because of that parallel workflows should use different state_attr)
  • content-type related checks are removed, because there's no more global content registry (substanced.content).

Example of use:

from pyramid_workflow import Workflow

task_workflow = Workflow(state_attr='task_state',
                         initial_state='new',
                         type='task')

task_workflow.add_state('new')
task_workflow.add_state('working')
task_workflow.add_state('done')

task_workflow.add_transition('start',
                             from_state='new',
                             to_state='working')
task_workflow.add_transition('complete',
                             from_state='working',
                             to_state='done')
task_workflow.add_transition('abort',
                             from_state='working',
                             to_state='new')

def includeme(config):
    config.add_workflow(task_workflow, content_types=('my_type',))

See also: http://substanced.readthedocs.org/en/latest/workflows.html

Technical Debts

  • Fix version for OpenCo namespace or merge back to orginal project

About

A Pyramid-only fork of substanced.workflow

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Python 100.0%