Skip to content
Jade Meskill edited this page Mar 31, 2016 · 3 revisions

Basic Rules

  • Access a single Cache and/or Datastore
  • Perform a single activity
  • Use HTTP status to indicate result
  • Return value of a task will not be provided to any subsequent task

Example Job with Tasks (CSON)

SearchDevices:
  start: 'authenticate'
  tasks:
    'authenticate':
      filter: 'Authenticate'
      on:
        204: 'enforce-discover-as-whitelist'
    'enforce-discover-as-whitelist':
      filter: 'EnforceDiscoverAsWhitelist'
      on:
        204: 'search-devices'
    'search-devices':
      task: 'meshblu-core-task-search-device'
      datastoreCollection: 'devices'
      cacheNamespace: 'cache:device'

Construction

A Task receives a Datastore (optional), Cache (optional), Pepper, Job Manager, UUID Alias Resolver, Public Key, and Private Key from the Dispatcher.

If the task has defined a cacheNamespace then Cache will be present. If the task has defined a datastoreCollection then Datastore will be present.