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


Manual Reference Pages  -  WORKFLOW::HISTORY (3)

.ds Aq ’

NAME

Workflow::History - Recorded work on a workflow action or workflow itself

CONTENTS

VERSION

This documentation describes version 1.10 of this package

SYNOPSIS



 # in your action
 sub execute {
     my ( $self, $wf ) = @_;
     my $current_user = $wf->context->param( current_user );
     # ... do your work with $ticket
     $wf->add_history( action => create ticket,
                       user   => $current_user->full_name,
                       description => "Ticket $ticket->{subject} successfully created" );
 }

 # in your view (using TT2)
 [% FOREACH history = workflow.get_history %]
    On:     [% OI.format_date( history.date, %Y-%m-%d %H:%M ) %]<br>
    Action: [% history.action %] (ID: [% history.id %])<br>
    by:     [% history.user %]<br>
    [% history.description %]
 [% END %]



DESCRIPTION

Every workflow can record its history. More appropriately, every action the workflow executes can deposit history entries in the workflow to be saved later. Neither the action nor the workflow knows about how the history is saved, just that the history is available.

METHODS

    Public Methods

new( \%params )

Create a new history object, filling it with properties from \%params.

set_new_state( $new_state )

Assigns the new state $new_state to the history if the state is not already assigned. This is used when you generate a history request in a Workflow::Action since the workflow state will change once the action has successfully completed. So in the action you create a history object without the state:



  $wf->add_history(
      Workflow::History->new({
          action      => "Cocoa Puffs",
          description => "Theyre magically delicious",
          user        => "Count Chocula",
      })
  );



And then after the new state has been set but before the history objects are stored the workflow sets the new state in all unsaved history objects.

is_saved()

Returns true (1) if this history object has been saved, false (0) if not.

    Properties

o <B>idB> - ID of history entry
o <B>workflow_idB> - ID of workflow to which history is attached
o <B>actionB> - Brief description of action taken
o <B>descriptionB> - Lengthy description of action taken
o <B>dateB> - Date history noted, set to a DateTime object.
o <B>time_zoneB> - Time zone to pass to the DateTime object.
o <B>userB> - User name (ID, login, or full name, up to you) taking action (may be blank)
o <B>stateB> - State of workflow as history was recorded.
clear_saved

Sets saved state to false and returns 0

set_saved

Sets saved state to true and returns 1

SEE ALSO

Workflow

COPYRIGHT

Copyright (c) 2003-2007 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.

AUTHORS

Jonas B. Nielsen (jonasbn) <jonasbn@cpan.org> is the current maintainer.

Chris Winters <chris@cwinters.com>

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


perl v5.20.3 WORKFLOW::HISTORY (3) 2016-04-03

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