package
1.33.0-rc3
Repository: https://github.com/ovh/utask.git
Documentation: pkg.go.dev

# README

subtask Plugin

This plugin creates a new task. A step based on this type of action will remain incomplete until the subtask is fully DONE.

Configuration

FieldsDescription
templatethe name of a task template, as accepted through µTask's API
inputa map of named values, as accepted on µTask's API
json_inputa JSON string passed as input to the subtask template
resolver_usernamesa string containing a JSON array of additional resolver users for the subtask
resolver_groupsa string containing a JSON array of additional resolver groups for the subtask
watcher_usernamesa string containing a JSON array of additional watcher users for the subtask
watcher_groupsa string containing a JSON array of additional watcher groups for the subtask
delaya duration indicating if subtask execution needs to be delayed, expects Golang time.Duration format (5s, 1m, ...)

Example

An action of type subtask requires the following kind of configuration:

action:
  type: subtask
  configuration:
    # a template that must already be registered on this instance of µTask
    template: another-task-template
    # valid input, as defined by the referred template
    input:
      foo: bar
    # optionally, a list of users which are authorized to resolve this specific task
    resolver_usernames: '["authorizedUser"]'
    resolver_groups: '["authorizedGroup"]'
    watcher_usernames: '["authorizedUser"]'
    watcher_groups: '["authorizedGroup"]'
    delay: 10m

Requirements

None.

Return

Output

NameDescription
idThe public identifier of the task
stateThe state of the task
resultThe result of the task
resolver_usernameThe username of the resolver of the task
requester_usernameThe username ot the requester of the task

# Variables

the subtask plugin spawns a new µTask task, given a template and inputs an extra parameter is accepted, not available on API resolver usernames can be dynamically set for the task.

# Structs

SubtaskConfig is the necessary configuration to spawn a new task.
SubtaskContext is the metadata inherited from the "parent" task".