Class::Workflow::State::AcceptHooks - Add hooks that are fired when the state


Class-Workflow documentation  | view source Contained in the Class-Workflow distribution.

Index


NAME

Top

Class::Workflow::State::AcceptHooks - Add hooks that are fired when the state accepts an instance.

SYNOPSIS

Top

	use Class::Workflow::State::AcceptHooks;

DESCRIPTION

Top

When an instance enters a state it is sometimes convenient to call hooks, for e.g. notification or logging purposes.

These hooks should not have any side effect that directly affects the workflow instance in any way - for that functionality you should use transitions.

Hooks' returns values are thus ignored.

METHODS

Top

add_hook
add_hooks

Add hooks. These should be sub references.

clear_hooks

Clear the list of hooks.

hooks

Get the list of registered hooks.

AUGMENTED METHODS

Top

accept_instance

This method has an after hook that calls the hooks in the order of their definition.


Class-Workflow documentation  | view source Contained in the Class-Workflow distribution.