Coder Social home page Coder Social logo

perl-workflow-persister-spops's Introduction

NAME

Workflow::Persister::SPOPS - Persist workflows using SPOPS

VERSION

This documentation describes version 1.53 of this package

SYNOPSIS

<persister name="SPOPSPersister"
           class="Workflow::Persister::SPOPS"
           workflow_class="My::Persist::Workflow"
           history_class="My::Persist::History"/>

DESCRIPTION

Overview

Use a SPOPS classes to persist your workflow and workflow history information. Configuration is simple: just specify the class names and everything else is done.

We do not perform any class initialization, so somewhere in your server/process startup code you should have something like:

my $config = get_workflow_and_history_config();
SPOPS::Initialize->process({ config => $config });

This will generate the classes named in the persister configuration.

SPOPS Configuration

NOTE: The configuration for your workflow history object must use the SPOPS::Tool::DateConvert to translate the 'history_date' field into a DateTime object. We assume when we fetch the history object that this has already been done.

METHODS

init ( \%params)

This method initializes the SPOPS persistance entity.

It requires that a workflow_class and a history_class are specified. If not the case Workflow::Exceptions are thrown.

create_workflow

Serializes a workflow into the persistance entity configured by our workflow.

Takes a single parameter: a workflow object

Returns a single value, a id for unique identification of out serialized workflow for possible deserialization.

fetch_workflow

Deserializes a workflow from the persistance entity configured by our workflow.

Takes a single parameter: the unique id assigned to our workflow upon serialization (see "create_workflow").

Returns a hashref consisting of two keys:

  • state, the workflows current state
  • last_update, date indicating last update

update_workflow

Updates a serialized workflow in the persistance entity configured by our workflow.

Takes a single parameter: a workflow object

Returns: Nothing

create_history

Serializes history records associated with a workflow object

Takes two parameters: a workflow object and an array of workflow history objects

Returns: provided array of workflow history objects upon success

fetch_history

Deserializes history records associated with a workflow object

Takes a single parameter: a workflow object

Returns an array of workflow history objects upon success

SEE ALSO

COPYRIGHT

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

AUTHORS

Please see Workflow

perl-workflow-persister-spops's People

Contributors

ehuelsmann avatar jonasbn avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.