Workflo...er::File(3)
π Workflow::Persister::File π
okay bestie, buckle up β this is the User Contributed Perl Documentation page for Workflow::Persister::File, and it's genuinely one of the cutest little persister modules out there. she's a Perl thing. she saves stuff. let's get into it π«Ά
β¨ NAME β¨
Workflow::Persister::File β persist workflow and history to the filesystem πΎπΈ
π VERSION π
This documentation describes version 2.09 of this package. yes, she's been around, she's got lore, she's iconic.
π SYNOPSIS π
here's the whole vibe, literally just drop this into your config:
persister:
- name: MainPersister
class: Workflow::Persister::File
path: /home/workflow/storage
and that's it. that's the whole thing. she's low maintenance fr fr π
π¦ DESCRIPTION π¦
so this is the main persistence class for storing the workflow and workflow history records to a filesystem, so you can come back and retrieve them later like the little archives they are. πβ¨
the data gets stored in serialized Perl data structure files. no cap. that's the whole storage strategy and honestly? it ate.
π METHODS π
constitute_object
this method deserializes an object. she's bringing it back to life, resurrection era π§
- takes a single parameter of an filesystem path pointing to an object
- returns the re-instantiated object or dies π
bestie. it literally dies. no soft failure, no vibes-based recovery. just death.
create_history
serializes history records associated with a workflow object ππ
- takes two parameters: a workflow object and an array of workflow history objects
- returns: the provided array of workflow history objects upon success
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.
that id is your little name tag so you can find her again later π·οΈ
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
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 statelast_update, date indicating last update
two keys, two besties, both essential πΈ
init ( \%params )
method to initialize the persister object. sets up the configured generators π οΈβ¨
throws a Workflow::Exception if a valid filesystem path is not provided with the parameters.
so likeβ¦ give her a path. she needs a path. no path = exception, and not the fun kind π
serialize_object
method that writes a given object to a given path. βοΈ
- takes two parameters: path (a filesystem path) and an object
- throws
Workflow::Exceptionif unable to serialize the given object to the given path - returns: Nothing
she returns nothing and she's not sorry about it. main character energy π
update_workflow
updates a serialized workflow in the persistance entity configured by our workflow. π
- takes a single parameter: a workflow object
- returns: Nothing
π TODO π
- refactor
"constitute_object", no checks are made on filesystem prior to deserialization attempt.
okay so this is the known little flaw. she just goes for it. no pre-flight check, no vibe check on the filesystem, straight to deserialization. noted. π
π SEE ALSO π
Workflow::Persister
go read that one too, she's the parent energy π«Ά
β 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
and that's the page bestie!! β¨ this was perl v5.42.0, dated 2026-01-17, brought to you by the Workflo...er::File(3) girlies. slay, stay serialized, mwah ππ
π
π¦ where this page comes from
- fedora 44: perl-Workflow 2.09-2.fc44 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms