-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | library for transparent execution of computations across shutdowns and restarts
--
-- transparent low level support (state logging, resume of the
-- computation state, wait for data condition) for very long time long
-- living event driven processes. Workflow give the two first services to
-- any monadic computation of type (a-> m a) f x >>=x'-> g x'
-- >>= x''->... z by prefixing the user with the method
-- step: step f x >>= x'-> step g x' >>=
-- x''->... This means that a workflow can be described with the
-- familiar do notation. In principle, there is no other
-- limitation on the syntax but the restriction (a -> m a): All
-- computations consume and produce the same type of data. for a monadic
-- computation, Workflow provides: - transparent checkpointing for each
-- step in permanent storage (using TCache) - resume of the monadic
-- computation at the last checkpoint after soft or hard interruption -
-- use of versioning techniques for storing object changes (using
-- RefSerialize) - retrieval of the object at any previous step - suspend
-- the computation until the input object meet certain conditions. useful
-- for inter-workflow comunications. For various reasons, this package
-- force the use of TCache for storage and refSerialize for writing
-- to/from strings at the end of the workflow all the intermediate data
-- is erased. see demo.hs and the header of Control.TCache for
-- documentation.
@package Workflow
@version 0.1
module Control.Workflow
type Workflow m l = WF m (Stat l) l
-- | step lift a monadic computation (a -> m a) in in to the WF monad,
-- provides state loging and automatic resume
step :: (Workflow_ a, Monad m) => (a -> m a) -> (a -> Workflow m a)
-- | start or continue a workflow. WorkflowList is a assoclist of (name,
-- workflow computation)
startWF :: (Workflow_ a, Monad m) => String -> a -> WorkflowList m a -> m a
restartWorkflows :: (Workflow_ a, IResource a, Serialize a) => WorkflowList IO a -> IO ()
getStep :: (Monad m) => Int -> Workflow m a
getAll :: (Monad m) => WF m (Stat a) [a]
waitFor :: (IResource a, Serialize a) => Filter a -> a -> IO a
syncWrite :: (Workflow_ a, Monad m, IResource a) => Bool -> Int -> Int -> WF m (Stat a) ()
instance [overlap ok] (IResource a, Serialize a) => Workflow_ a
instance [overlap ok] (Monad m) => Monad (WF m s)
instance [overlap ok] (IResource a, Serialize a) => IResource (Stat a)
instance [overlap ok] (Serialize a) => Serialize (Stat a)