Skip to contents

R6 class for Task settings

Public fields

active

logical indicating if `Task` is performed in a workflow.

outputFolder

List of output files/folders to save the task output

workflowFolder

folder where workflow is run and saved

settings

list of settings for task such as plot configurations

message

message or title of the task

Methods


Method new()

Create a `Task` object

Usage

Task$new(
  outputFolder = NULL,
  inputFolder = NULL,
  inputs = NULL,
  outputs = NULL,
  workflowFolder = getwd(),
  settings = NULL,
  active = FALSE,
  message = NULL
)

Arguments

outputFolder

task output folder to save results

inputFolder

task input folder where input files are stored

inputs

expected input files required by task

outputs

expected output files generated by task

workflowFolder

folder where workflow is run and saved

settings

specific settings for task (e.g. plot configurations)

active

logical indicating if `Task` is performed in a workflow. Default value is `FALSE`

message

message of the `Task`.

Returns

A new `Task` object


Method activate()

Activate `Task`

Usage

Task$activate()


Method inactivate()

Inactivate `Task`

Usage

Task$inactivate()


Method validateInput()

Check if `Task` inputs exist

Usage

Task$validateInput()

Returns

logical indicating if input is valid


Method validateStructureSetInput()

Check if a task input from a specific `SimulationStructure` is valid

Usage

Task$validateStructureSetInput(structureSet)

Arguments

structureSet

`SimulationStructure` object

Returns

logical indicating if input is valid


Method print()

Print `Task` features

Usage

Task$print()

Returns

Text of task features


Method getRelativePath()

Get the relative path to a file to be output by this task

Usage

Task$getRelativePath(fileName)

Arguments

fileName

name (with extension) of the file to be output

Returns

Output file's relative path


Method getAbsolutePath()

Get the absolute path to a file to be output by this task

Usage

Task$getAbsolutePath(fileName)

Arguments

fileName

name (with extension) of the file to be output

Returns

Output file's absolute path


Method getInputs()

Get `Task` required input files

Usage

Task$getInputs()

Returns

Required file names


Method clone()

The objects of this class are cloneable with this method.

Usage

Task$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.