Did you know ... Search Documentation:
Packs (add-ons) for SWI-Prolog

Package "coworkers"

Title:Workflow definition as tree of coroutines
Rating:Not rated. Create the first rating!
Latest version:0.1.0
SHA1 sum:2979ce21a0f43a291d1997467d2b43d60beee0e8
Author:Ronan Tanguy <tanguy.ronan@gmail.com>
Maintainer:Ronan Tanguy <tanguy.ronan@gmail.com>
Packager:Ronan Tanguy <tanguy.ronan@gmail.com>
Home page:https://github.com/incodame/coworkers
Download URL:https://github.com/incodame/coworkers/archive/0.1.0.zip


No reviews. Create the first review!.

Details by download location



A simple DSL in Prolog to implement workflows as trees of coroutines


workflow('release_project', Props) :-


    props( Props ), module(workflow_module),

        % data exchange between tasks happens through variable unification


                   [ node(task('sync git repo', [ParentRepoVersions]), []),

                     node(task('modify parent repo versions', [ParentRepoVersions]), [])




Assuming that:

  • tasks and dialogs are available in a user's module workflow_module
  • tasks make use of wf_ask_parameter to ask for some input, at whichever stage of completion they are in, before they get resumed
  • dialogs make use of wf_input_parameter to augment the actual workflow's known props, and get called only when required

    the defined workflow resembles that of some coworkers in an office.

current limitations

  • tasks under a dialog get called sequentially
  • workflows are not persistent

Contents of pack "coworkers"

Pack contains 6 files holding a total of 7.1K bytes.