From e7bf93bd58b6598cf375cdbcb5e780df22768dbf Mon Sep 17 00:00:00 2001
From: "S.Listl" <S.Listl@slistl-nb.aditosoftware.local>
Date: Thu, 9 Apr 2020 16:46:16 +0200
Subject: [PATCH] Workflow entities documentation

---
 .../WorkflowDefinition_entity.aod                  |  1 +
 .../WorkflowDefinition_entity/documentation.adoc   | 10 ++++++++++
 .../WorkflowInstance_entity.aod                    |  1 +
 entity/WorkflowInstance_entity/documentation.adoc  | 14 ++++++++++++++
 entity/WorkflowTask_entity/WorkflowTask_entity.aod |  1 +
 entity/WorkflowTask_entity/documentation.adoc      |  5 +++++
 6 files changed, 32 insertions(+)
 create mode 100644 entity/WorkflowDefinition_entity/documentation.adoc
 create mode 100644 entity/WorkflowInstance_entity/documentation.adoc
 create mode 100644 entity/WorkflowTask_entity/documentation.adoc

diff --git a/entity/WorkflowDefinition_entity/WorkflowDefinition_entity.aod b/entity/WorkflowDefinition_entity/WorkflowDefinition_entity.aod
index cdd34f7a83..eea580de5c 100644
--- a/entity/WorkflowDefinition_entity/WorkflowDefinition_entity.aod
+++ b/entity/WorkflowDefinition_entity/WorkflowDefinition_entity.aod
@@ -2,6 +2,7 @@
 <entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.13" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.13">
   <name>WorkflowDefinition_entity</name>
   <majorModelMode>DISTRIBUTED</majorModelMode>
+  <documentation>%aditoprj%/entity/WorkflowDefinition_entity/documentation.adoc</documentation>
   <title>Workflow definition</title>
   <grantCreateProcess>%aditoprj%/entity/WorkflowDefinition_entity/grantCreateProcess.js</grantCreateProcess>
   <grantDelete v="false" />
diff --git a/entity/WorkflowDefinition_entity/documentation.adoc b/entity/WorkflowDefinition_entity/documentation.adoc
new file mode 100644
index 0000000000..71ec33e6c1
--- /dev/null
+++ b/entity/WorkflowDefinition_entity/documentation.adoc
@@ -0,0 +1,10 @@
+= WorkflowDefinition_entity
+
+IMPORTANT: All workflow-related entities require the process engine to be running, it must be activated in the system-configuration.
+
+This entity is used for managing the workflow definitions in the system. New definitions can be created by deploying a BPMN2.0-XML file to the process engine,
+the workflow itself has to be modeled in an external BPMN-editor like the flowable-modeler and then exported.
+The data is managed by the process engine and the communication with the engine is handled in the jdito-recordContainer.
+
+Deploying a workflow definition does not start the workflow. To start it, a new workflow instance has to be created (those are managed by the WorkflowInstance_entity).
+Where the workflow can be started is defined by WorkflowStartConfig_entity.
\ No newline at end of file
diff --git a/entity/WorkflowInstance_entity/WorkflowInstance_entity.aod b/entity/WorkflowInstance_entity/WorkflowInstance_entity.aod
index fb41ee7bd0..3ce2107560 100644
--- a/entity/WorkflowInstance_entity/WorkflowInstance_entity.aod
+++ b/entity/WorkflowInstance_entity/WorkflowInstance_entity.aod
@@ -2,6 +2,7 @@
 <entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.13" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.13">
   <name>WorkflowInstance_entity</name>
   <majorModelMode>DISTRIBUTED</majorModelMode>
+  <documentation>%aditoprj%/entity/WorkflowInstance_entity/documentation.adoc</documentation>
   <title>Workflow instance</title>
   <contentTitleProcess>%aditoprj%/entity/WorkflowInstance_entity/contentTitleProcess.js</contentTitleProcess>
   <titlePlural>Workflow instances</titlePlural>
diff --git a/entity/WorkflowInstance_entity/documentation.adoc b/entity/WorkflowInstance_entity/documentation.adoc
new file mode 100644
index 0000000000..8ac6a2c43f
--- /dev/null
+++ b/entity/WorkflowInstance_entity/documentation.adoc
@@ -0,0 +1,14 @@
+= WorkflowInstance_entity
+
+IMPORTANT: All workflow-related entities require the process engine to be running, it must be activated in the system-configuration.
+
+A workflow instance is a workflow being executed. The instance can contain muliple variables to store data that is being used for the execution, for example variables that control the behaviour of service tasks.
+Normally, a workflow instance contains at least the two variables "targetId" and "targetContext" specifying the dataset that is associated with the instance. A common component
+that is used inside a workflow definition is the user task. If user tasks are created from a workflow instance, these will be displayed inside the instance they belong to.
+It is also possible to suspend the execution of the workflow, rendering the instance inactive. While the execution remains inactive, it can't be continued
+until the execution is resumed.
+
+The jdito-recordContainer uses two sources of data:
+. running workflow instances
+. historic workflow instances
+Because of that, it is possible to load instances that are already finished and not executed anymore.
\ No newline at end of file
diff --git a/entity/WorkflowTask_entity/WorkflowTask_entity.aod b/entity/WorkflowTask_entity/WorkflowTask_entity.aod
index 9f69534cfc..283e4770a1 100644
--- a/entity/WorkflowTask_entity/WorkflowTask_entity.aod
+++ b/entity/WorkflowTask_entity/WorkflowTask_entity.aod
@@ -2,6 +2,7 @@
 <entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.13" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.13">
   <name>WorkflowTask_entity</name>
   <majorModelMode>DISTRIBUTED</majorModelMode>
+  <documentation>%aditoprj%/entity/WorkflowTask_entity/documentation.adoc</documentation>
   <title>Task</title>
   <grantCreate v="false" />
   <grantUpdateProcess>%aditoprj%/entity/WorkflowTask_entity/grantUpdateProcess.js</grantUpdateProcess>
diff --git a/entity/WorkflowTask_entity/documentation.adoc b/entity/WorkflowTask_entity/documentation.adoc
new file mode 100644
index 0000000000..23698c94b2
--- /dev/null
+++ b/entity/WorkflowTask_entity/documentation.adoc
@@ -0,0 +1,5 @@
+= WorkflowTask_entity
+
+A WorkflowTask represents a user task of a workflow instance. It can be assigned to a single user, or have candidates defined, then these candidates can see the task and
+one person can claim it to assign himself. Some tasks can contain a form definition, if that's the case the form data has to be filled by the user in order to
+complete the task.
\ No newline at end of file
-- 
GitLab