noc.core.wf.decorator

Module Contents

noc.core.wf.decorator.logger
noc.core.wf.decorator.document_set_state(self, state)
Set state
  • Set field
  • Perform database update
  • Invalidate caches
  • Call State on_enter_handlers
Parameters:
  • self
  • object
Returns:

noc.core.wf.decorator.document_touch(self, bulk=None)
noc.core.wf.decorator.model_set_state(self, state)
Set state
  • Set field
  • Perform database update
  • Invalidate caches
  • Call State on_enter_handlers
Parameters:
  • self
  • object
Returns:

noc.core.wf.decorator._on_document_post_save(sender, document, *args, **kwargs)
noc.core.wf.decorator._on_model_post_save(sender, instance, *args, **kwargs)
noc.core.wf.decorator.workflow(cls)
@workflow decorator denotes models which have .state
field referring to WF State.

Methods contributed to class: * set_state - change .state field with calling State.on_state_enter * fire_event - Perform transition using event name * fire_transition - Perform transition :return: