Revision history for Perl extension Workflow

# $Id: Changes 481 2009-09-18 18:49:33Z jonasbn $

1.33_04

- Patches from Danny Sadinoff to following classes

	Workflow::Config, bumped up to version 1.13
	Workflow::Persister, bumped up to version 1.10
	Workflow::Factory, bumped up to version 1.19
	
	- Adding ability to control initial state name via workflow config

	- Adding ability to control initial history record details via Persister subclass code


1.32

- Bumped up version for Workflow::State to 1.14 considering patches from
  action_group and test_condition patches from Ivan Paponov implementing 
  support for a group tag on actions

- Addressing RT #40750
  http://rt.cpan.org/Ticket/Display.html?id=40750
  
  Removed VERSION file, this has now been obsoleted

  We are now resolving the version number for the distribution from Workflow.pm 
  the main module, this mean a jump from 0.32 to 1.32, but it does mean that 
  an installation can be traced back to a given distribution

- Patch to implement proper dynamic names for conditions with a 'test' attribute
  Added RT: #38024

- Added List::MoreUtils to requirements, we use this for test, I have moved the
  test related modules to the build_requires section in Build.PL, so
  List::MoreUtils is not mistaken for an application level requirement

  Refactored two tests, to use List::MoreUtils all method (asserting presence of
  numerous actions)

- Fixed minor bug in error message in: Workflow::State, reported
  by Robert Stockdale, RT #38023

- We introduce a more fine grained control  of the auto commit feature, 
  implemented by Jim Brandt

- We introduce typed condition, implemented by Jim Brandt. Typed conditions 
  makes it possible for different workflows to hold unique methods for workflow 
  steps even with names colliding.
  
  Example workflow foo and bar can have a condition baz, but baz are two 
  different implementations in foo and bar respectively 

- time_zone parameter can now be passer around for use by the Workflow 
  DateTime objects internally


0.31 Wed Sep 26 20:26:49 CEST 2007 (update not required)

- Fixed failing tests in t/persister_dbi.t, this has only observed twice
  and does not seem to be consistent. This is related to execution time
  for the test suite and the use of now, using the debugger would demonstrate
  this.

  Resolves: RT #29037 - https://rt.cpan.org/Public/Bug/Display.html?id=29037

- Cleaned TODO file a bit

- Added Data::Dumper requirement to Build.PL


0.30 Tue Sep 25 12:28:12 CEST 2007 (update not required)

- Added patch from Jim Brandt improving handling of date formats for real, the 
  merge into 0.29 (see below) was not completed
  
  The patch also addresses RT #29037
  
  https://rt.cpan.org/Public/Bug/Display.html?id=29037 
  
  which is related to a failing test:
  
  http://www.nntp.perl.org/group/perl.cpan.testers/2007/08/msg582727.html
  

0.29 Mon Sep 24 23:09:12 CEST 2007 (update not required)

- Added new test file: t/persister.t for Workflow::Persister

- Updated t/confition.t for better coverage

- Updated t/action.t for better coverage

- Updated t/validator.t for better coverage

- Updated Workflow::Action::Mailer (stub now can be tested, this might however
  prove to be a bad idea)

- Added new test file: t/action_mailer.t for Workflow::Action::Mailer

- Updated t/action_null.t for better coverage

- Added some more tests t/Config.t


0.28 Fri Jul  6 16:42:30 CEST 2007 (update not required)

- Removed TODO.txt, the files contents have long gone been merged into the TODO
  file

- Added a new file to the doc/ directory named developing.txt
  This is a collection of documentation notes on maintaining and developing
  the Worksflow distribution

- Renamed Action::Mailer to Workflow::Action::Mailer, this however still looks
  like a stub that was never finished

- Added more POD to:
    Workflow
    Workflow::Action::InputField
    Workflow::Action::Mailer
    Workflow::Condition
    Workflow::Condition::HasUser
    Workflow::Config::XML
    Workflow::Factory
    Workflow::History
    Workflow::Persister
    Workflow::Persister::DBI
    Workflow::Persister::DBI::ExtraData
    Workflow::Persister::DBI::AutoGeneratedId
    Workflow::Persister::DBI::SequenceId
    Workflow::Persister::RandomId
    Workflow::Persister::File
    Workflow::Persister::SPOPS
    Workflow::State
    Workflow::Validator::HasRequiredField
    
    We now have a POD coverage of 100%, this does however not say anything about
    the quality of the spelling or POD. All POD will however be revisited at
    some point.
    
    Please remember to document changes and additions.

- Implemented conditional tests in t/00_load.t for SPOPS and UUID. These are
  conditional in their own tests, so this should of course be reflected in
  t/00_load.t
  
  This should address the failing test, ref:
  http://www.nntp.perl.org/group/perl.cpan.testers/2007/07/msg527994.html

- Added missing version number to Workflow::Persister (1.09), the PAUSE
  indexer complained over degrading version number, investigating consequences

  No apparent consequences


0.27 Tue Jul  3 16:50:15 CEST 2007 
(update not required unless you are using 0.26 or 0.25)

- Fixed bug in cached condition handling (0.26 reintroduced the original
  race condition that was solved using the condition cache in 0.25).
  Condition cache is now cleared on state change and when calling
  get_available_action_names()

- Updated some tests, nothing serious we are just on the way to better test
  coverage and documentation

- Added more POD to:
    Workflow::Action
    Workflow::Exception
    Workflow::Persister::RandomId.pm
    Workflow::Persister::UUID.pm
    Workflow::Validator::MatchesDateFormat
    Workflow::Validator::InEnumeratedType

- Added more tests of Workflow::Validator::MatchesDateFormat to
  t/validator_matches_date_format.t

- Added more tests of Workflow::Validator::InEnumeratedType to
  t/validator_in_enumerated_type.t

- Small fix to a test on an empty array. Empty arrays evaluate to false
  t/config.t, cleaned some code in Workflow::Config and Workflow::Config::Perl
  nothing significant

- Hard coded version numbers to all modules in t/
  Subversion uses different scheme so we no longer use automatically updated
  version numbers, added version 0.01 where no version was present

- Hard coded version numbers to all modules in eg/
  Subversion uses different scheme so we no longer use automatically updated
  version numbers, added version 0.01 where no version was present
  
- Eliminated warning in Workflow::Factory, in check for FACTORY parameter

- Added t/00_load.t, de facto usage syntax test catches compilation
  errors etc.

- Applied patch from Jim Brandt to Workflow::Config::XML, the patch helps to
  catch bad XML

  Updated version to 1.05

- Hard coded latest versions from CPAN to all modules, Subversion uses different
  scheme so we no longer use automatically updated version number.
  
    Action::Mailer 1.01
    Workflow 1.32
    Workflow::Action 1.09
    Workflow::Action::InputField 1.09
    Workflow::Action::Null 1.03
    Workflow::Base 1.08
    Workflow::Condition 1.07
    Workflow::Condition::Evaluate 1.02
    Workflow::Condition::HasUser 1.05
    Workflow::Config 1.11
    Workflow::Config::Perl 1.02
    Workflow::Config::XML 1.04
    Workflow::Context 1.05
    Workflow::Exception 1.08
    Workflow::Factory 1.18
    Workflow::History 1.09
    Workflow::Persister 1.09
    Workflow::Persister::DBI 1.19
    Workflow::Persister::DBI::AutoGeneratedId 1.06
    Workflow::Persister::DBI::ExtraData 1.05
    Workflow::Persister::DBI::SequenceId 1.05
    Workflow::Persister::File 1.10
    Workflow::Persister::RandomId 1.03
    Workflow::Persister::SPOPS 1.07
    Workflow::Persister::UUID 1.03
    Workflow::State 1.13
    Workflow::Validator 1.05
    Workflow::Validator::HasRequiredField 1.04
    Workflow::Validator::InEnumeratedType 1.04
    Workflow::Validator::MatchesDateFormat 1.06

- Fixed a problem in t/workflow.t which rely on DBI. DBI is not necessarily 
  present, since this is not a requirement (DBD::Mock is), so I have made
  the test conditional as to whether DBI is installed as for some of the
  other tests.
  
  This should address the 'N/A' status, ref:
  http://www.nntp.perl.org/group/perl.cpan.testers/2007/05/msg492425.html

- Updated MANIFEST

- Added t/03_pod-coverage.t, de facto POD coverage test, set the
  environment variable TEST_POD to enable the test
  
  Currently we have BAD POD coverage so the test fails.
  
- Added t/02_pod.t, de facto POD syntax test, set the environment
  variable TEST_POD to enable the test
  

0.26 Wed Mar  7 09:25:06 CET 2007 (update not required unless you are using 0.25)

- Fixed bug in cached condition handling. The condition cache is now
  cleared before checking conditions so that the condition results are
  not taken from the cache when entering the same state again

- Fixed small bug in the error message when autorunning is enabled
  but more than one action is available (now displays the names of
  these actions correctly)


0.25 Thu Dec 14 09:11:57 CET 2006 (update not required)

- Applied patch from Alexander Klink via rt.cpan.org (#23736)
  Introduces caching of the result of a condition's evaluate()


0.24 Thu Dec 14 08:55:05 CET 2006 (update not required)

- Applied patch from Alexander Klink via rt.cpan.org (#23925)
  Introduces may_stop property for autorunning workflow
  
  This is why this patch introduces the "may_stop" property for a state,
  which means that Workflow won't complain if the state is autorun and
  no or too many activities are present.


0.23 Tue Sep 12 16:54:25 CEST 2006 (update not required)

- Applied patch from Michael Bell via rt.cpan.org (#21100)
  Fixes problem with handling of 0 and empty strings as parameters
  
- Applied patch from Michael Bell via rt.cpan.org (#21101)
  Fixes problem with deletion of parameters

- Applied yet another patch from Michael Bell via rt.cpan.org (#21099)
  The patch fixes some misinforming POD  

- Applied patch from Alexander Klink via rt.cpan.org (#21422)
  The patch implement more powerful observers


0.22 Fri Aug 18 23:26:55 CEST 2006 (update not required)

- Applied patch from Michael Bell via rt.cpan.org (#20871), this patch also 
  contains the patch mentioned below.

- Applied patch to Workflow::Action from Michael Bell, fixing two bugs

- Changed POD format to accomodate for Pod::Coverage, where B<> is not
  recognised, but =head<1..3> and =item is
  
  So subs are now marked with head3 instead of B<>, I am of the opinion
  that titles should be marked as titles and B<> (bold) should be used to
  emphasize important information in the POD.


0.21 Fri Jul  7 23:25:35 CEST 2006 (update not required)

- Fixed bug reported by Martin Bartosch, Workflow::Context's
  merge method did not work properly, applied patch from Martin

- Updated t/context.t to test the above fix, this got the coverage from
  53.3 percent to 93.3 


0.20 Fri Jul  7 22:29:19 CEST 2006 (update not required)

- Fixed bug reported by Martin Bartosch, Workflow::Factory's
  add_config_from_file now takes an array ref as stated in the POD.

- Updated t/factory.t to test the above fix, just using the scenarios from the
  SYNOPSIS. This fix did however not contribute to the coverage of
  Workflow::Factory, we lost 0.3 percent along the way going from 88.7 to 88.4 

- Fixed two POD errors in Workflow::Config


0.19 Fri Jul  7 20:40:33 CEST 2006 (update not required)

- The 0.18 release contained a broken Makefile.PL, thanks to Randal Schwartz
  for sending me the feedback to get this addressed immediately.


0.18 Fri Jul  7 14:47:00 CEST 2006 (update not required)

- New maintainer, JONASBN has taken over maintenance of Workflow

- Added maintainer information to Workflow.pm

- Added new TODO file

- Added a handful of tests to t/config.t and added dependency on Test::Exception

- Somewhat applied patch from Chris Brown, the use of Perl as configuration was
  broken, in my attempt to implement tests prior to applying Chris Browns patch
  I accidently fixed the same problems it addressed.
  
  coverage of Workflow::Config::Perl has gone from 0 to 89.0 with this release

- Added new files (for test):
	t/workflow.perl
	t/workflow_action.perl
	t/workflow_condition.perl
	t/workflow_errorprone.perl
	t/workflow_validator.perl

- Added POD to Workflow::Config::Perl on parse method

- Added CVS id keywords and author information to README

- Added CVS id keywords and author information to .txt files in doc


0.17  Wed Nov 30 21:51:31 EST 2005

  lib/Workflow/Persister/DBI.pm:

  - fix dumb typo that resulted in PostgreSQL getting a random-ID
  generator instead of a sequence-ID generator, thanks to Michael
  Graham for pointing it out


0.16  Tue Nov 29 22:12:25 EST 2005

  META.yml:

     - RT #12360: Added 'no_index' section so demo modules don't get
     indexed; thanks to Adam Kennedy for report and fix.

  lib/Workflow.pm:

     - RT #14413: Added workflow object to
     Workflow::State->get_autorun_action_name() call; thanks to Jonas
     Nielsen for report and fix.

  lib/Workflow/Factory.pm:

     - RT #12361: Add documentation about return values/exceptions
     from add_config() and add_config_from_file(); thanks to Adam
     Kennedy for report.

  lib/Workflow/Persister/DBI.pm:

     POTENTIAL BACKWARD INCOMPATIBILITY:

        - Change 'user' field in history table to 'workflow_user' so
        we don't collide with PostgreSQL reserved word. (It's probably
        reserved elsewhere too...) If you have existing workflow
        tables you'll want to ALTER them to the new fieldname or look
        at the next changeitem to customize the field names.

     - Make the workflow and history fields settable by subclassing
     the persister -- just define 'get_workflow_fields()' and
     'get_history_fields()' and return the names you want in the
     order specified in the docs. Thanks to Michael Graham for the
     nudge.

     - Be sure to pass in the database handle to the pre_fetch ID
     generator in create_workflow() (related to RT #15622)

     - RT #15622: While we didn't apply this patch we did cleanup some
     of the similar code....
 
     - Apply patch from Frank Rothhaupt to work with Oracle sequences.

  lib/Workflow/Persister/DBI/SequenceId.pm:

     - Throw proper exception if we cannot execute the sequence SQL.


0.15  Sun Oct 17 11:17:44 EDT 2004

  CPAN/Install notes:

     - You should now be able to reference the Workflow module via
     CPAN with 'install Workflow' and such. Thanks to Michael Schwern
     (RT bug #8011) and the PAUSE indexing server for the reports.

     Also thanks to Michael Roberts for releasing the 'Workflow'
     namespace to this module. If you're interested in workflows I
     strongly encourage you to check out his wftk (Workflow Toolkit)
     project along with the Perl interface when it's released.

       http://www.vivtek.com/wftk.html

  Build.PL/Makefile.PL:

     - Add Class::Factory as dependency. Thanks to Michael Schwern for
     the pointer via RT (bug #8010)-- during my presentation to pgh.pm
     on the Workflow module no less! (I added a reference to the
     presentation in README and Workflow.pm)

     - Add Class::Observable as dependency for new functionality.

  eg/ticket/ticket.pl:

     - Ensure we actually delete the SQLite database file if it exists.

  t/TestUtil.pm:

     - Always store the logfile from testing in the 't/' directory.

  Workflow:

     - Workflows are now observable. Big thanks to Tom Moertel
     <tmoertel@cpan.org> for the suggestion. See WORKFLOWS ARE
     OBSERVABLE in docs.

     - In previous versions most properties were read-only but it
     wasn't enforced. Now it is.


  Workflow::Factory:

     - Add the ability to register observers from the 'workflow'
     configuration and add them to workflows created from
     fetch_workflow() and create_workflow(). Configuration information
     available in Workflow.pm.


0.10  Tue Oct 12 01:02:11 EDT 2004

  Workflow

     - POTENTIAL BACKWARD INCOMPATIBILITY
     
       Since we've now got 'resulting_state' in a state's action that is
     dependent on the action results of the previous action being run
     (see Workflow::State change), we cannot set the 'new' workflow
     state before executing the action.

       One result: you shouldn't set the 'state' property of any created
     Workflow::History objects -- we'll modify the state of any
     history objects with an empty state before saving them (see
     changes for Workflow::Factory)

       Another result: the value of '$wf->state' inside your
     Action now refers to the EXISTING state of the workflow not the
     SOON TO BE state. Earlier versions had the SOON TO BE state set
     into the workflow before executing the action to make things less
     confusing. Now that it's changed any code you have using the
     state of the workflow (such as in our example 'Trouble Ticket'
     application in eg/ticket/) will give a different value than the
     previous Workflow version.

       This behavior seems more consistent, but comments/suggestions
     are welcome.

     - In 'execute_action()' -- once we're done executing the main
     action, check to see if our new state is an autorun state, and if
     so run it.

  Workflow::Action::Null

     - New class: use if you want to move the workflow from one state
     to another without actually doing anything.

  Workflow::Condition::Evaluate

     - New class: allow inline conditions expressed as Perl code in
     the 'test' attribution of 'condition'; has access to the values
     in the current workflow context in a Safe compartment.

  Workflow::Factory

     - In save_workflow(), call 'set_new_state()' with the workflow
     state on all unsaved Workflow::History objects before saving them.

  Workflow::State

     - Add 'autorun' property and 'get_autorun_action_name()' to
     retrieve the single valid action name available from an autorun
     state.

     - The 'resulting_state' property of an action within a state can
     now be multivalued, which means the next state depends on the
     return value of the action that's executed. For instance, we
     might have:

     <state name="create user">
         <action name="create">
           <resulting_state return="admin"    state="assign as admin" />
           <resulting_state return="helpdesk" state="assign as helpdesk" />
           <resulting_state return="*"        state="assign as luser" />
         </action>
        ....

       So if the action 'create' returns 'admin', the new state will be
     'assign as admin'; on 'helpdesk' it will be 'assign as helpdesk',
     and all other values will go to state 'assign as luser'.

       Existing behavior (actions returning nothing for a single
     'resulting_state') is unchanged.


0.05  Thu Sep 30 23:11:01 EDT 2004

  Workflow::Persister::DBI

      - Trying to fetch a workflow with a non-existent ID didn't work
      properly, returning an empty workflow object (which blew up when
      you tried to call a method on it) instead of undef (as
      documented). Thanks to Martin Winkler <mw@arsnavigandi.de> for
      pointing the problem out.


0.04  Sun Sep 12 22:17:48 EDT 2004

  eg (example application):

      - Add CGI interface ('ticket.cgi') to example application, and
      move most of the logic into App::Web, which is now a full object
      instead of a bunch of class methods. Both the standalone web
      server ('ticket_web.pl') and the CGI script use the same logic,
      templates, template processing, etc.

  Workflow::Config

      - Move Perl/XML configuration parsers to separate classes and
      make this class a factory.

      - Add class method 'parse_all_files()' to allow you to pass in a
      list of mixed-type files (some XML, some Perl) and have them be
      parsed properly.

      - Add documentation about implementing your own configuration reader

  Workflow::Config::Perl

      - New class: code moved from Workflow::Config for perl-only parsing

  Workflow::Config::XML

      - New class: code moved from Workflow::Config for XML-only parsing

  Workflow::Factory

      - Invoke class method in Workflow::Config to deal with
      potentially different types of configuration (e.g., mixing and
      matching 'xml' and 'perl' files).

  Workflow::Persister::DBI::AutoGeneratedId:

      - Fix typo bug spotted by Martin Winkler (winkler-martin@web.de)


0.03  Mon May 24 19:16:40 EDT 2004

      * Applied modified patches from Jim Smith (jgsmith@tamu.edu) to
        do the following:

      - Allow you to read in the XML/Perl configuration file from
      somewhere else and pass it to Workflow::Config as a scalar
      reference.

      - You can subclass Workflow::Factory and still use 'FACTORY' to
      import the factory of the class you want and 'instance()' to do
      the same.

      * Added docs for these new features, and added tests for at
        least the factory subclassing feature.


0.02  Sat May 22 00:34:43 EDT 2004

      Updates to test scripts and files they require from CPAN tester
      report -- thanks Barbie!


0.01  Thu May 13 22:08:29 EDT 2004

      First CPAN release -- everything is new!