úδê¬ZU      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTNoneTReturn the unique name of a workflow with a parameter (executed with exec or start) Qshow the state changes along the workflow, that is, all the intermediate results Udefault instances ( V WXYZ[\]^_`abcdefghijklmnopqrstUuvwx$ V WXYZ[\]^_`abcdefghijklmyznopqrs V aWXYZ[\]^_`bcdefghijklmnopqrstUuvwxNone,.Return conditions from the invocation of start/restart primitives adapted from the MonadCatchIO-mtli package. However, in tis case is needed to express serializable constraints about the returned values, Jso the usual class definitions for lifting IO functions are not suitable. Generalized version of { Generalized version of | Generalized version of }  PMonadTrans\ permits |to define a partial monad transformer. They are not defined for all kinds of data mbut the ones that have instances of certain classes.That is because in the lift instance code there are some Shidden use of these classes. This also may permit an accurate control of effects. 8An instance of MonadTrans is an instance of PMonadTrans fExecutes a computation inside of the workflow monad whatever the monad encapsulated in the workflow. 0 Warning: this computation is executed whenever ~ the workflow restarts, no matter if it has been already executed previously. This is useful for intializations or debugging. / To avoid re-execution when restarting use: & $ unsafeIOtoWF... iTo perform IO actions in a workflow that encapsulates an IO monad, use step over the IO action directly:   & $ action instead of  & $ unsafeIOtoWF $ action Generalized version of ~ !@Start or restart an anonymous workflow inside another workflow. A Its state is deleted when finished and the result is stored in  the parent' s WF state. "TA version of exec1 that deletes its state after complete execution or thread killed #*A version of exec with no seed parameter. $5Start or continue a workflow with exception handling ; the workflow flags are updated even in case of exception  WFerrors are raised as exceptions %>executes a workflow, but does not mark it as finished even if  the process ended. * The workflow will return the las result. &sLifts a monadic computation to the WF monad, and provides transparent state loging and resuming the computation a Note: Side effect can be repeated at recovery time if the log was not complete before shut down * see the integer sequence example, above. For debugging purposes. F At recovery time, instead of returning the stored value from the log & , stepDebug executes the computation f as normally. ; . It permits the exact re-execution of a workflow process * Start or continue a workflow .   and exceptions are returned as Left err. (even if they were triggered as exceptions). " Other exceptions are returned as Left (Exception e)  use 5 or 7# in case of erro to clear the log. +QStart or continue a workflow from a list of workflows with exception handling.  see *0 for details about exception and error handling ,lRe-start the non finished workflows in the list, for all the initial values that they may have been invoked -AReturn all the steps of the workflow log. The values are dynamic /to get all the steps with result of type Int:  all <- -  let lfacts = mapMaybe  all :: [Int] .GReturn the keys of the workflows that are running with a given prefix /=Return the current state of the computation, in the IO monad 0"Delete the history of a workflow. $ Be sure that this WF has finished. 2%wait until the workflow is restarted 3<Kill the executing thread if not killed, but not its state.  $ * or , will continue the workflow 4 A version of  KillThreadWF+ for workflows started wit no parameter by # 5;Kill the process (if running) and drop it from the list of R restart-able workflows. Its state history remains , so it can be inspected with   getWfHistory printWFHistory and so on 6 A version of KillWF+ for workflows started wit no parameter by # 7[Delete the WF from the running list and delete the workflow state from persistent storage. < Use it to perform cleanup if the process has been killed. 8 A version of 7+ for workflows started wit no parameter by # :>Log a value in the workflow log and return a reference to it.  newWFRef x= ; (return x) >>= return . fst;PExecute an step and return a reference to the result besides the result itself =\Read the content of a Workflow reference. Note that its result is not in the Workflow monad >OWrites a new value en in the workflow reference, that is, in the workflow log.  Why would you use this?. Don'=t do that!. modifiying the content of the workflow log would e change the excution flow when the workflow restarts. This metod is used internally in the package. Q The best way to communicate with a workflow is trough a persistent queue, using Data.Persistent.Collection: worflow= exec1 wf do  r <- ; expr  push "queue" r  back <- pop " queueback"  ... ?VMoves the state of workflow with a seed value to become the state of other seed value / This may be of interest when the entry value ? changes its key value but should not initiate a new workflow $ but continues with the current one @ALog a message in the workflow history. I can be printed out with printWFhistory 3 The message is printed in the standard output too €nWait until a TCache object (with a certaing key) meet a certain condition (useful to check external actions ) ^ NOTE if anoter process delete the object from te cache, then waitForData will no longer work 4 inside the wokflow, it can be used by lifting it :  do  x < - step $ ..  y <- step $ waitForData ...  .. A3Observe the workflow log until a condition is met. C9Start the timeout and return the flag to be monitored by D l This timeout is persistent. This means that the counter is initialized in the first call to getTimeoutFlag j no matter if the workflow is restarted. The time during which the worlkflow has been stopped count also. ; Thus, the wait time can exceed the time between failures. % when timeout is 0 means no timeout. DVWait until a certain clock time has passed by monitoring its flag, in the STM monad. F This permits to compose timeouts with locks waiting for data using  iexample: wait for any respoinse from a Queue if no response is given in 5 minutes, it is returned True.   flag <- C $ 5 * 60  ap <- &4 . atomically $ readSomewhere >>= return . Just  D flag >> return Nothing  case ap of  Nothing -> do @ timeout ...  Just x -> do @ $ received ++ show x ... ‚UWait until a certain clock time has passed by monitoring its flag, in the IO monad.  See D ENReturn either the result of the STM conputation or Nothing in case of timeout l This timeout is persistent. This means that the counter is initialized in the first call to getTimeoutFlag j no matter if the workflow is restarted. The time during which the worlkflow has been stopped count also. ; Thus, the wait time can exceed the time between failures. ( when timeout is 0 it means no timeout. F<Executes a computation understanding that it is inside the  workflow identified by ƒ. If f finish after time  it genetates a > exception which may result in the end of the workflow if the  programmer does not catch it. $ If the workflow is restarted after time2 has elapsed, the workflow V will restart from the beginning. If not, it will restart after the last logged step. Usually  time2> time time2=0 means time2 is infinite „8An instance of MonadTrans is an instance of PMonadTrans …  plift= stepU†‡ˆ‰Š‹ !"#$%Œ&'(Ž)*#name thar identifies the workflow. workflow to execute Ginitial value (ever use the initial value for restarting the workflow) result of the computation ‘+&Name of workflow in the workflow list HInitial value (ever use the initial value even to restart the workflow) function to execute Result of the computation ,-./01234’56789:;<=“>?@€2The condition that the retrieved object must meet Ba partially defined object for which keyResource can be extracted Jreturn the retrieved object that meet the condition and has the given key ”2The condition that the retrieved object must meet Ba partially defined object for which keyResource can be extracted Jreturn the retrieved object that meet the condition and has the given key A2The condition that the retrieved object must meet The workflow name 3the INITIAL value used in the workflow to start it (The first event that meet the condition B2The condition that the retrieved object must meet The workflow name 'The INITIAL value used in the workflow (The first event that meet the condition C•D‚–EF—˜™š›œ„…žG  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFG  *$"#%!+,&'( :;=<>?2-./ABDCEF@935746801)H†‡ˆ‰Š‹ !"#$%Œ&'(Ž)*‘+,-./01234’56789:;<=“>?@€”ABC•D‚–EF—˜™š›œ„…žNoneGCto execute a computation every time it is invoked. A synonimous of  HDto execute one computation once . It executes at the first run only Iexecutes a computation with H and G statements  a synonym of % GHIGHIHGIGHINone K=Select this output, kill all and return the selected outputs L>Discard this output, kill all and return the selected outputs MContinue the source process NDiscard the source output Oselect the source output P%spawn a list of independent workflow actions with a seed value a  The results are reduced by Q or R QYwait for the results and apply the cond to produce a single output in the Workflow monad R0select the outputs of the workflows produced by P constrained within a timeout. P The check filter, can select , discard or finish the entire computation before E the timeout is reached. When the computation finalizes, it kill all ? the pending workflows and return the list of selected outputs ? the timeout is in seconds and it is is in the workflow monad, : so it is possible to restart the process if interrupted,  so it can proceed for years. fThis is necessary for the modelization of real-life institutional cycles such are political elections " A timeout of 0 means no timeout. SEspawn a list of workflows and reduces the results according with the comp" parameter within a given timeout   vote timeout actions comp x= N split actions x >>= select timeout (const $ return Select) >>= comp TMsum the outputs of a list of workflows according with its monoid definition @ sumUp timeout actions = vote timeout actions (return . mconcat)JKLMNOŸ PQ¡R¢ST£¤¥¦§ JKLMNOPQRST PQRSTJONMLKJONMLKŸ PQ¡R¢ST£¤¥¦§¨      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWSXYZ[\]^_`abcdefghhijklmnopqrstuvwxyz{|}~€!€‚"€‚#€‚ƒ„…€†‡ˆ€‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¥¦§¨©ª«¬­Workflow-0.8.0.3Control.WorkflowControl.Workflow.ConfigurationControl.Workflow.PatternsControl.Workflow.StatTCache-0.10.0.6Data.Persistent.IDynamic safeFromIDyn Data.TCache syncWrite Synchronous cacheSizecheck frecuency Asyncronous SyncManualSyncModeData.TCache.DefsdefPathkey IndexableWFRefStatkeyWF showHistoryWFErrors WFExceptionTimeoutAlreadyRunningNotFoundHasForkfork MonadCatchIOcatchblockunblock PMonadTransplift WorkflowListWorkflow unsafeIOtoWFthrowwfExecexec1dexec1execexec1ncstep getWFStatstepExec isInRecoverstartstartWFrestartWorkflowsgetAll getWFKeys getWFHistory delWFHistory delWFHistory1 waitWFActive killThreadWF killThreadWF1killWFkillWF1delWFdelWF1clearRunningFlagnewWFRef stepWFRefgetWFRef readWFRef writeWFRef moveStatelogWFwaitFor waitForSTMgetTimeoutFlag waitUntilSTM withTimeoutwithKillTimeouteveroncerunConfigurationSelect FinishSelect FinishDiscardContinueDiscardsplitmergeselectvotesumUp $fSerializeaselfwfNamestaterecovertimeout lastActivecontext referencesversionsRunningWFststat0 statPrefix1 statPrefixheader getHeaderlenLen pathWFlowsstFNamefrsafe hReadFile readHeader keyRunningshowp1wFRefStr$fSerializeWFRef$fSerializeThreadId$fIResourceStat$fIndexableWFRef$fSerializeStatfwfdbaseControl.Exception.BaseGHC.IOthrowIO stepDebug waitForData GHC.Conc.SyncorElse waitUntilGHC.Baseid$fPMonadTranstma$fPMonadTransWFmaWFInfonamefinishedhaserror tvRunningWfsmv getTempName stepExec1getStaterunWFrunWF1 killThreadWFmjustifyMwaitForDataSTMgetTimeSecondswaittransientTimeout$fExceptionWFErrors $fHasForkWF $fHasForkIO$fMonadCatchIOWFa $fMonadIOWF $fFunctorWF $fMonadWFActionWF readWFRef1justifymainfmain2main3$fExceptionSelect