GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Workflow::Context(3) User Contributed Perl Documentation Workflow::Context(3)

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

This documentation describes version 1.60 of this package

 # Create your own context and merge it with one that may already be
 # in a workflow

 my $context = Workflow::Context->new();
 $context->param( foo => 'bar' );
 $context->param( current_user => User->fetch( 'foo@bar.com' ) );
 my $wf = FACTORY()->create_workflow( 'w/f', $context );

 # The above is the same as:
 $context = Workflow::Context->new(
      foo   => 'bar',
      current_user => User->fetch( 'foo@bar.com' ),
 );
 $wf = FACTORY()->create_workflow( 'w/f', $context );


 # In a Condition get the 'current_user' back out of the workflow's context

 sub evaluate {
     my ( $self, $wf ) = @_;
     my $current_user = $wf->context->param( 'current_user' );
     ...
 }

 # Set values directly into a workflow's context

 $wf->context->param( foo => 'bar' );
 $wf->context->param( news => My::News->fetch_where( 'date = ?', DateTime->now ) );

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

Adds %params to the context at instantiation.

Merges the values from $other_context into this object. If there are duplicate keys in this object and $other_context, $other_context wins.

Workflow

Copyright (c) 2003-2022 Chris Winters. All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Please see the LICENSE

Please see Workflow
2022-03-02 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.