Modify Task logic
  • 23 Jul 2020
  • 3 Minutes To Read
  • Contributors
  • Print
  • Share
  • Dark
    Light

Modify Task logic

  • Print
  • Share
  • Dark
    Light

Allows to modify (update) task in other available process.

There are two required requirements for modifying tasks via Modify Task logic:

Task reference can be specified with:

  • any system parameter of the current process. For example, {{root.ref}} or {{root.task_id}}
  • any other parameter of the current task {{parameter_name}}
  • constant. For example, config, ref etc.

modify

Nodes in the gray box are added automatically for error handling.

Basic settings

copy_tasks_settings(1)

Process - selection of a process for copying from "tree of folders". It can be found by its name or its ID or using the {{conv_id}} (parameter of the task).

Reference - the reference of a new task that is created in another process.

New task reference can be specified by:

  • any system parameter. For example, {{root.ref}} or {{root.task_id}}
  • any other task parameter {{parameter_name}}
  • constant. For example, config, ref etc.

Copy all parameters - this option gives a possibility to copy all parameters to a new task.

Please note!

If both tasks have a parameter with the same name, parameter value will be updated by Modify Task.

Parameters that were not in the updated request will be added there

Parameters

copy_tasks_params(1)

Button + Add "key-value" adds new parameter

Key - parameter name
Value can be specified by:

  • constant
  • {{parameter_name}} from task which name will be pasted
  • any system parameter of the current process. For example, {{root.ref}} or {{root.task_id}}

If Copy all parameters flag is enabled, it is not required to add new parameters.

Otherwise be sure to add at least one parameter.

Additionally

modify_additionally

Alert when there is tasks queue

Critical amount of tasks in the node.

Learn more about how it works here.

Limit the time of the task in the node

Time interval value at which task will go further through process in case if Copy task logic does not reply.

Learn more about how it works here.

Synchronous callback

Synchronous callback - this option gives a possibility to modify tasks synchronously.

It means that tasks will be updated sequentially - strictly one after another (in course).

Please note! If you modify one task at the same time, an error duplicate_callback will occur.

Types of error

Internal system error when copying

Parameter name Value
conveyor_copy_task_return_type_error hardware
conveyor_copy_task_return_type_tag copy_task_fatal_error
conveyor_copy_task_return_description Error running copy task
Parameter name Value
conveyor_copy_task_return_type_error hardware
conveyor_copy_task_return_type_tag crash_api
conveyor_copy_task_return_description Error copy_task request
Parameter name Value
conveyor_copy_task_return_type_error hardware
conveyor_copy_task_return_type_tag copy_task_timeout
conveyor_copy_task_return_description timeout for executing copy_task request

Not found task

Parameter name Value
conveyor_copy_task_return_type_error software
conveyor_copy_task_return_type_tag not_found_task
conveyor_copy_task_return_description not found task

There is no task with specified reference in the process.

Incorrect parameters

Parameter name Value
conveyor_copy_task_return_type_error software
conveyor_copy_task_return_type_tag wrong_validate_params
conveyor_copy_task_return_description Param: , Error:

Failed to validate one of the parameters.

Failed to convert parameter

Parameter name Value
conveyor_copy_task_return_type_error software
conveyor_copy_task_return_type_tag copy_task_wrong_convert_param
conveyor_copy_task_return_description Param: , Value: , Try convert to:

For example, you parameter type is Number, but value is string or parameter is missed.

Inactive process

Parameter name Value
conveyor_copy_task_return_type_error software
conveyor_copy_task_return_type_tag conveyor_is_not_active
conveyor_copy_task_return_description conveyor is not active

Process must be in the Active state.

Access is denied

Parameter name Value
conveyor_copy_task_return_type_error software
conveyor_copy_task_return_type_tag access_denied
conveyor_copy_task_return_description user: <user_id>, conv_id: <proc_id>

User must have Task management access to copy task.

Task size overflow

Parameter name Value
conveyor_copy_task_return_type_error software
conveyor_copy_task_return_type_tag copy_task_size_overflow_limit
conveyor_copy_task_return_description Your task size: bytes, Max available task size: <max_size> bytes, Try to change your data or try to split your task

Maximum allowed size - 128 Kb.

Duplicate modification of the task

Parameter name Value
conveyor_copy_task_return_type_error software
conveyor_copy_task_return_type_tag duplicate_callback
conveyor_copy_task_return_description The last one callback is still running. You should wait

It appears only with the flag turned on Synchronous callback. The new changement of the request will not be activated until the previous one finishes.

Standardly if this mistake occurs the request goes to the node with the logic Delay for the second try in 30 seconds..

No callback logic in node with the task

Parameter name Value
conveyor_copy_task_return_type_error software
conveyor_copy_task_return_type_tag no_api_callback_in_node_with_task
conveyor_copy_task_return_description no api callback logic in node with task

This error occurs if Synchronous callback is enabled.

Otherwise the result is __conveyor_copy_task_result__": "ok".

Was This Article Helpful?