1Workflow::Context(3)  User Contributed Perl Documentation Workflow::Context(3)
2
3
4

NAME

6       Workflow::Context - Data blackboard for Workflows, Actions, Conditions
7       and Validators
8

VERSION

10       This documentation describes version 1.05 of this package
11

SYNOPSIS

13        # Create your own context and merge it with one that may already be
14        # in a workflow
15
16        my $context = Workflow::Context->new();
17        $context->param( foo => 'bar' );
18        $context->param( current_user => User->fetch( 'foo@bar.com' ) );
19        $wf->context( $context );
20
21        # In a Condition get the 'current_user' back out of the workflow's context
22
23        sub evaluate {
24            my ( $self, $wf ) = @_;
25            my $current_user = $wf->context->param( 'current_user' );
26            ...
27        }
28
29        # Set values directly into a workflow's context
30
31        $wf->context->param( foo => 'bar' );
32        $wf->context->param( news => My::News->fetch_where( 'date = ?', DateTime->now ) );
33

DESCRIPTION

35       Holds information to pass between your application and a Workflow,
36       including its Actions, Conditions and Validators.
37

OBJECT METHODS

39       merge( $other_context )
40
41       Merges the values from $other_context into this object. If there are
42       duplicate keys in this object and $other_context, $other_context wins.
43

SEE ALSO

45       Workflow
46
48       Copyright (c) 2003-2006 Chris Winters. All rights reserved.
49
50       This library is free software; you can redistribute it and/or modify it
51       under the same terms as Perl itself.
52

AUTHORS

54       Jonas B. Nielsen (jonasbn) <jonasbn@cpan.org>, current maintainer.
55
56       Chris Winters <chris@cwinters.com>, original author.
57
58
59
60perl v5.30.0                      2019-07-26              Workflow::Context(3)
Impressum