Permalink
Browse files

add introspectable info for workflows

  • Loading branch information...
domenkozar committed Aug 3, 2012
1 parent b2591c0 commit 693ef1f3642e0d5712bb72e737e20950d38d73e8
Showing with 11 additions and 0 deletions.
  1. +11 −0 substanced/workflow/__init__.py
@@ -483,9 +483,20 @@ def add_workflow(config, workflow, content_types=(None,)):
except WorkflowError, why:
raise ConfigurationError(str(why))
+ intr = config.introspectable(
+ 'substance d workflows',
+ (IWorkflow, content_types, workflow.type),
+ content_types,
+ 'substance d workflow',
+ )
+ intr['workflow'] = workflow
+ intr['type'] = workflow.type
+ intr['content_types'] = content_types
+
for content_type in content_types:
config.action((IWorkflow, content_type, workflow.type),
callable=register_workflow,
+ introspectables=(intr,),
args=(config, workflow, workflow.type, content_type))
def includeme(config): # pragma: no cover

0 comments on commit 693ef1f

Please sign in to comment.