{"componentChunkName":"component---src-templates-default-template-tsx","path":"/documentation/concepts/task_states/","result":{"data":{"asciidoc":{"id":"01343e8d-6b5c-5092-8213-bb5ebba10c92","html":"<div id=\"toc\" class=\"toc\">\n<div id=\"toctitle\">Table of Contents</div>\n<ul class=\"sectlevel1\">\n<li><a href=\"#_task_states\">Task States</a></li>\n<li><a href=\"#_typical_state_transitions_triggered_by_the_hiro_engine\">Typical state transitions triggered by the HIRO&#8482; Engine</a></li>\n<li><a href=\"#_which_status_changes_can_be_triggered_externally\">Which status changes can be triggered externally?</a></li>\n<li><a href=\"#_relation_to_knowledge_acquisition\">Relation to Knowledge Acquisition</a></li>\n</ul>\n</div>\n<div class=\"sect1\">\n<h2 id=\"_task_states\">Task States</h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>Automation in HIRO&#8482; is task-centric. Therefore, Automation Tasks are the\ncentral data objects to trigger the HIRO&#8482; Engine. Automation Tasks have a\nlifecycle - they are created, processed and finally either succeed or fail.\nThe following diagram illustrates the state machine of Automation Task status.</p>\n</div>\n<div class=\"imageblock\">\n<div class=\"content\">\n<img src=\"/7.0/images/tutorials/issue_state_diagram.png\" alt=\"Task State Diagram\">\n</div>\n<div class=\"title\">Figure 1. Task State Diagram</div>\n</div>\n<div class=\"paragraph\">\n<p>The black lines indicate transitions performed by the Engine, whereas:</p>\n</div>\n<div class=\"ulist\">\n<ul>\n<li>\n<p>some transitions will be triggered only be Engine&#8217;s internal task handling</p>\n</li>\n<li>\n<p>some transitions can be triggered by special KI language commands</p>\n</li>\n</ul>\n</div>\n<div class=\"paragraph\">\n<p>The transitions marked in red may be performed from the outside, i.e. by connectors\nor other applications.</p>\n</div>\n<div class=\"dlist\">\n<dl>\n<dt class=\"hdlist1\">NEW</dt>\n<dd>\n<p>New task which is ready to be processed by the HIRO&#8482; Engine</p>\n<div class=\"paragraph\">\n<p>For compatibility reasons a missing status value is interpreted as <code>NEW</code></p>\n</div>\n</dd>\n<dt class=\"hdlist1\">PROCESSING</dt>\n<dd>\n<p>Engine is currently working on this task to resolve it.</p>\n</dd>\n<dt class=\"hdlist1\">RESOLVED</dt>\n<dd>\n<p>Task processing has finished successfully. Technically that means: through\napplication of KIs all <em>ToDo</em> variables have been deleted.</p>\n<div class=\"paragraph\">\n<p>This is a <em>final</em> state.</p>\n</div>\n</dd>\n<dt class=\"hdlist1\">WAITING</dt>\n<dd>\n<p>Task processing was suspended to wait for some external event (e.g. user approval).\nA task in that state must be set back to PROCESSING from the outside (by the\ncontrolling connector or other application).</p>\n</dd>\n<dt class=\"hdlist1\">STOPPED</dt>\n<dd>\n<p>Task processing has been stopped. In most cases this status means the Engine ran\nout of applicable knowledge.</p>\n<div class=\"paragraph\">\n<p>This is a <em>final</em> state.</p>\n</div>\n</dd>\n<dt class=\"hdlist1\">TERMINATED</dt>\n<dd>\n<p>Task processing has been forcefully terminated. This could be triggered internally\nby some error conditions (see below) or externally (e.g. Connector/CLI).</p>\n<div class=\"paragraph\">\n<p>This is a <em>final</em> state.</p>\n</div>\n</dd>\n</dl>\n</div>\n</div>\n</div>\n<div class=\"sect1\">\n<h2 id=\"_typical_state_transitions_triggered_by_the_hiro_engine\">Typical state transitions triggered by the HIRO&#8482; Engine</h2>\n<div class=\"sectionbody\">\n<table class=\"tableblock frame-all grid-all stretch\">\n<colgroup>\n<col style=\"width: 33.3333%;\">\n<col style=\"width: 33.3333%;\">\n<col style=\"width: 33.3334%;\">\n</colgroup>\n<thead>\n<tr>\n<th class=\"tableblock halign-left valign-top\">From state</th>\n<th class=\"tableblock halign-left valign-top\">To state</th>\n<th class=\"tableblock halign-left valign-top\">Trigger</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td class=\"tableblock halign-left valign-top\"><p class=\"tableblock\">NEW</p></td>\n<td class=\"tableblock halign-left valign-top\"><p class=\"tableblock\">PROCESSING</p></td>\n<td class=\"tableblock halign-left valign-top\"><p class=\"tableblock\">successfully loaded task for processing</p></td>\n</tr>\n<tr>\n<td class=\"tableblock halign-left valign-top\"><p class=\"tableblock\">PROCESSING</p></td>\n<td class=\"tableblock halign-left valign-top\"><p class=\"tableblock\">RESOLVED</p></td>\n<td class=\"tableblock halign-left valign-top\"><p class=\"tableblock\">no remaining todo variable in task</p></td>\n</tr>\n<tr>\n<td class=\"tableblock halign-left valign-top\"><p class=\"tableblock\">PROCESSING</p></td>\n<td class=\"tableblock halign-left valign-top\"><p class=\"tableblock\">WAITING</p></td>\n<td class=\"tableblock halign-left valign-top\"><p class=\"tableblock\">KI command <code>eject_issue</code></p></td>\n</tr>\n<tr>\n<td class=\"tableblock halign-left valign-top\"><p class=\"tableblock\">PROCESSING</p></td>\n<td class=\"tableblock halign-left valign-top\"><p class=\"tableblock\">STOPPED</p></td>\n<td class=\"tableblock halign-left valign-top\"><p class=\"tableblock\">KI command <code>stop_issue</code></p></td>\n</tr>\n<tr>\n<td class=\"tableblock halign-left valign-top\"><p class=\"tableblock\">NEW / PROCESSING</p></td>\n<td class=\"tableblock halign-left valign-top\"><p class=\"tableblock\">TERMINATED</p></td>\n<td class=\"tableblock halign-left valign-top\"><p class=\"tableblock\">Processing node does not exist or is not accessible</p></td>\n</tr>\n</tbody>\n</table>\n<div class=\"admonitionblock tip\">\n<table>\n<tr>\n<td class=\"icon\">\n<i class=\"fa icon-tip\" title=\"Tip\"></i>\n</td>\n<td class=\"content\">\n<div class=\"paragraph\">\n<p>The Engine writes the reason of a status change into the\n<code>ogit/Automation/deployStatus</code> attribute. You might want to check this attribute\nto understand e.g. why tasks have been terminated.</p>\n</div>\n</td>\n</tr>\n</table>\n</div>\n</div>\n</div>\n<div class=\"sect1\">\n<h2 id=\"_which_status_changes_can_be_triggered_externally\">Which status changes can be triggered externally?</h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>The transitions listed below are allowed to be triggered by connectors or other\napplications:</p>\n</div>\n<table class=\"tableblock frame-all grid-all stretch\">\n<colgroup>\n<col style=\"width: 33.3333%;\">\n<col style=\"width: 33.3333%;\">\n<col style=\"width: 33.3334%;\">\n</colgroup>\n<thead>\n<tr>\n<th class=\"tableblock halign-left valign-top\">From state</th>\n<th class=\"tableblock halign-left valign-top\">To state</th>\n<th class=\"tableblock halign-left valign-top\">Trigger/Reason</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td class=\"tableblock halign-left valign-top\"><p class=\"tableblock\">PROCESSING</p></td>\n<td class=\"tableblock halign-left valign-top\"><p class=\"tableblock\">TERMINATED</p></td>\n<td class=\"tableblock halign-left valign-top\"><p class=\"tableblock\">External application (e.g. connector) decides then Engine\nshould not process that task anymore.</p></td>\n</tr>\n<tr>\n<td class=\"tableblock halign-left valign-top\"><p class=\"tableblock\">WAITING</p></td>\n<td class=\"tableblock halign-left valign-top\"><p class=\"tableblock\">TERMINATED</p></td>\n<td class=\"tableblock halign-left valign-top\"><p class=\"tableblock\">External application (e.g. connector) decides then Engine\nshould not process that task anymore</p></td>\n</tr>\n<tr>\n<td class=\"tableblock halign-left valign-top\"><p class=\"tableblock\">PROCESSING</p></td>\n<td class=\"tableblock halign-left valign-top\"><p class=\"tableblock\">WAITING</p></td>\n<td class=\"tableblock halign-left valign-top\"><p class=\"tableblock\">External application decides that Engine should (temporarily)\n pause processing that task (e.g. waiting for a user approval)</p></td>\n</tr>\n<tr>\n<td class=\"tableblock halign-left valign-top\"><p class=\"tableblock\">WAITING</p></td>\n<td class=\"tableblock halign-left valign-top\"><p class=\"tableblock\">PROCESSING</p></td>\n<td class=\"tableblock halign-left valign-top\"><p class=\"tableblock\">External application decides that a task processing can now\ncontinue</p></td>\n</tr>\n</tbody>\n</table>\n</div>\n</div>\n<div class=\"sect1\">\n<h2 id=\"_relation_to_knowledge_acquisition\">Relation to Knowledge Acquisition</h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>When a task status is <code>STOPPED</code>, this means that there was not sufficient knowledge\nto solve it. That&#8217;s why any task being in status <code>STOPPED</code> is a candidate for a\nnew <em>knowledge acquisition session</em>, and will be listed in the <em>Task List</em> in HIRO&#8482;.\nThe responsible Subject Matter Expert should teach the system how this task can be\nsolved the next time.</p>\n</div>\n</div>\n</div>","document":{"main":"Automation Task Lifecycle","title":"Automation Task Lifecycle","subtitle":""},"fields":{"toc":true,"location":["documentation","concepts","task_states"]}},"sidebarYaml":{"id":"6d066bdd-c982-5a69-b909-a31e6fc044e0","showIndex":null}},"pageContext":{"id":"01343e8d-6b5c-5092-8213-bb5ebba10c92","parent":"documentation"}},"staticQueryHashes":["1010459453","1010459453","2356112386","2356112386","2603905930","2603905930","3026652197","3026652197","3167850324","3167850324","63159454","63159454"]}