From c146e221a2d6dfb5ce32edc02f6edb5c053d3ad5 Mon Sep 17 00:00:00 2001
From: Yordan Kinkov <yordan.kinkov@vereign.com>
Date: Mon, 27 Jun 2022 10:58:57 +0300
Subject: [PATCH] "#17 add task execution documentation"

---
 docs/task.md | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/docs/task.md b/docs/task.md
index c023af2..834832a 100644
--- a/docs/task.md
+++ b/docs/task.md
@@ -36,6 +36,18 @@ given as input will be used as the body of the task request. The caller will rec
 immediately the `taskID` as response, and the result of the asynchronous task
 execution will be stored in the TSA Cache after the task is completed.
 
+The actual _Task execution_ is strictly bound to the _Task definition_. In order a _task_
+to be executed successfully, its _definition_ **must** contain either a `requestPolicy` OR
+`url` and `method`. When a `requestPolicy` is set in the _Task definition_, the task will
+evaluate it and will ignore the `url` and the `method`. If a `requestPolicy` is missing in
+the _Task definition_, the task will execute an HTTP request to the given `url` with the
+given `method`. If both `requestPolicy` AND `url` and `method` are missing in the _Task definition_,
+the task cannot be executed. Reference table:
+
+_Task definition_ contains: | `requestPolicy` only | `url` and `method` only | Both `requestPolicy` AND `url` and `method` | Neither
+--- | --- | --- | --- |---
+**_Task_ will execute** | `requestPolicy` | `url` and `method` | `requestPolicy` | None
+
 ### Task Executor Configuration
 
 There are two environment variables that control the level of concurrency
-- 
GitLab