From a88fce4f79819367edeca49eb55e58368386304e Mon Sep 17 00:00:00 2001
From: Johannes Hoermann <j.hoermann@adito.de>
Date: Tue, 11 Jun 2019 13:39:26 +0200
Subject: [PATCH] Task Status verhalten angepasst 1039416

---
 .../Ticketmanagement/insert_TaskType_Task.xml |   24 +
 .../KeywordEntry_entity.aod                   | 1043 +++++++-------
 .../whitelistids_param/documentation.adoc     |    2 +
 .../recordcontainers/db/conditionProcess.js   |    3 +
 entity/Task_entity/Task_entity.aod            | 1234 +++++++++--------
 .../containername_param/valueProcess.js       |    4 +-
 .../whitelistids_param/valueProcess.js        |    5 +
 .../priority_icon/valueProcess.js             |    2 +-
 .../status/displayValueProcess.js             |    4 +-
 .../entityfields/status/valueProcess.js       |   13 +-
 process/ActivityTask_lib/process.js           |   14 +-
 process/Sql_lib/process.js                    |  133 +-
 12 files changed, 1315 insertions(+), 1166 deletions(-)
 create mode 100644 entity/KeywordEntry_entity/entityfields/whitelistids_param/documentation.adoc
 create mode 100644 entity/Task_entity/entityfields/keywordstates/children/whitelistids_param/valueProcess.js

diff --git a/.liquibase/Data_alias/basic/2019.2/Ticketmanagement/insert_TaskType_Task.xml b/.liquibase/Data_alias/basic/2019.2/Ticketmanagement/insert_TaskType_Task.xml
index d351078271..4013cfcce2 100644
--- a/.liquibase/Data_alias/basic/2019.2/Ticketmanagement/insert_TaskType_Task.xml
+++ b/.liquibase/Data_alias/basic/2019.2/Ticketmanagement/insert_TaskType_Task.xml
@@ -19,6 +19,12 @@
             <column name="CONTAINER" value="TaskType"/>
             <column name="TYPE" value="CHAR_VALUE"/>
         </insert>
+        <insert tableName="AB_KEYWORD_ATTRIBUTE">
+            <column name="AB_KEYWORD_ATTRIBUTEID" value="729a41d1-0463-480d-bf7b-0eb6c2e96f37"/>
+            <column name="NAME" value="defaultStatus"/>
+            <column name="CONTAINER" value="TaskType"/>
+            <column name="TYPE" value="CHAR_VALUE"/>
+        </insert>
         <insert tableName="AB_KEYWORD_ATTRIBUTE">
             <column name="AB_KEYWORD_ATTRIBUTEID" value="9ac96671-b519-488b-bbad-6dea3e5baafd"/>
             <column name="NAME" value="showCode"/>
@@ -38,6 +44,12 @@
             <column name="AB_KEYWORD_ATTRIBUTE_ID" value="9ac96671-b519-488b-bbad-6dea3e5baafd"/>
             <column name="BOOL_VALUE" valueNumeric="0"/>
         </insert>
+        <insert tableName="AB_KEYWORD_ATTRIBUTERELATION">
+            <column name="AB_KEYWORD_ATTRIBUTERELATIONID" value="169edc60-5bad-45eb-b938-46a47b10a0a3"/>
+            <column name="AB_KEYWORD_ENTRY_ID" value="9e30365b-a9a6-4b57-ae6b-140c9e5a4eb4"/>
+            <column name="AB_KEYWORD_ATTRIBUTE_ID" value="729a41d1-0463-480d-bf7b-0eb6c2e96f37"/>
+            <column name="CHAR_VALUE" value="21bc4d20-1a87-4247-8f7c-8d3a09631850"/>
+        </insert>
         
         <insert tableName="AB_KEYWORD_ENTRY">
             <column name="AB_KEYWORD_ENTRYID" value="2ef84e0e-988a-44b4-9d14-3461555d2f18"/>
@@ -60,6 +72,12 @@
             <column name="AB_KEYWORD_ATTRIBUTE_ID" value="af6a0af9-0102-426b-a1f7-c8abfea79793"/>
             <column name="CHAR_VALUE" value="[&quot;ff8b1caf-cf30-4edb-b5ca-a9a219ba8399&quot;]"/>
         </insert>
+        <insert tableName="AB_KEYWORD_ATTRIBUTERELATION">
+            <column name="AB_KEYWORD_ATTRIBUTERELATIONID" value="4cabba92-fa98-42c8-aabb-8bff718c1502"/>
+            <column name="AB_KEYWORD_ENTRY_ID" value="2ef84e0e-988a-44b4-9d14-3461555d2f18"/>
+            <column name="AB_KEYWORD_ATTRIBUTE_ID" value="729a41d1-0463-480d-bf7b-0eb6c2e96f37"/>
+            <column name="CHAR_VALUE" value="21bc4d20-1a87-4247-8f7c-8d3a09631850"/>
+        </insert>
         
         <insert tableName="AB_KEYWORD_ENTRY">
             <column name="AB_KEYWORD_ENTRYID" value="9d326a2a-923c-41de-adb9-b0f86417e7c2"/>
@@ -82,5 +100,11 @@
             <column name="AB_KEYWORD_ATTRIBUTE_ID" value="af6a0af9-0102-426b-a1f7-c8abfea79793"/>
             <column name="CHAR_VALUE" value="[&quot;01d761e0-802a-46d0-827f-b6ca5d9a2148&quot;]"/>
         </insert>
+        <insert tableName="AB_KEYWORD_ATTRIBUTERELATION">
+            <column name="AB_KEYWORD_ATTRIBUTERELATIONID" value="b7d946e4-3644-4f97-96cb-f2331fc3aa1e"/>
+            <column name="AB_KEYWORD_ENTRY_ID" value="9d326a2a-923c-41de-adb9-b0f86417e7c2"/>
+            <column name="AB_KEYWORD_ATTRIBUTE_ID" value="729a41d1-0463-480d-bf7b-0eb6c2e96f37"/>
+            <column name="CHAR_VALUE" value="21bc4d20-1a87-4247-8f7c-8d3a09631850"/>
+        </insert>
     </changeSet>
 </databaseChangeLog>
\ No newline at end of file
diff --git a/entity/KeywordEntry_entity/KeywordEntry_entity.aod b/entity/KeywordEntry_entity/KeywordEntry_entity.aod
index b3ee81517b..ba905c2bdf 100644
--- a/entity/KeywordEntry_entity/KeywordEntry_entity.aod
+++ b/entity/KeywordEntry_entity/KeywordEntry_entity.aod
@@ -1,519 +1,524 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.6">
-  <name>KeywordEntry_entity</name>
-  <majorModelMode>DISTRIBUTED</majorModelMode>
-  <documentation>%aditoprj%/entity/KeywordEntry_entity/documentation.adoc</documentation>
-  <title>Keyword</title>
-  <siblings />
-  <contentTitleProcess>%aditoprj%/entity/KeywordEntry_entity/contentTitleProcess.js</contentTitleProcess>
-  <onValidation>%aditoprj%/entity/KeywordEntry_entity/onValidation.js</onValidation>
-  <iconId>VAADIN:KEY</iconId>
-  <iconIdProcess>%aditoprj%/entity/KeywordEntry_entity/iconIdProcess.js</iconIdProcess>
-  <titlePlural>Keywords</titlePlural>
-  <recordContainer>db</recordContainer>
-  <entityFields>
-    <entityProvider>
-      <name>#PROVIDER</name>
-      <lookupIdfield>KEYID</lookupIdfield>
-      <recordContainer>db</recordContainer>
-    </entityProvider>
-    <entityField>
-      <name>CONTAINER</name>
-      <documentation>%aditoprj%/entity/KeywordEntry_entity/entityfields/container/documentation.adoc</documentation>
-      <title>Container</title>
-      <groupable v="true" />
-      <mandatory v="true" />
-      <dropDownProcess>%aditoprj%/entity/KeywordEntry_entity/entityfields/container/dropDownProcess.js</dropDownProcess>
-      <textInputAllowed v="true" />
-      <state>READONLY</state>
-      <stateProcess>%aditoprj%/entity/KeywordEntry_entity/entityfields/container/stateProcess.js</stateProcess>
-    </entityField>
-    <entityField>
-      <name>AB_KEYWORD_ENTRYID</name>
-      <searchable v="false" />
-      <valueProcess>%aditoprj%/entity/KeywordEntry_entity/entityfields/ab_keyword_entryid/valueProcess.js</valueProcess>
-    </entityField>
-    <entityField>
-      <name>KEYID</name>
-      <documentation>%aditoprj%/entity/KeywordEntry_entity/entityfields/keyid/documentation.adoc</documentation>
-      <title>Key</title>
-      <mandatory v="true" />
-      <state>READONLY</state>
-      <stateProcess>%aditoprj%/entity/KeywordEntry_entity/entityfields/keyid/stateProcess.js</stateProcess>
-      <valueProcess>%aditoprj%/entity/KeywordEntry_entity/entityfields/keyid/valueProcess.js</valueProcess>
-      <onValidation>%aditoprj%/entity/KeywordEntry_entity/entityfields/keyid/onValidation.js</onValidation>
-    </entityField>
-    <entityField>
-      <name>TITLE</name>
-      <title>Title (original language)</title>
-      <mandatory v="true" />
-    </entityField>
-    <entityField>
-      <name>SORTING</name>
-      <documentation>%aditoprj%/entity/KeywordEntry_entity/entityfields/sorting/documentation.adoc</documentation>
-      <title>Sorting</title>
-      <mandatory v="false" />
-      <state>AUTO</state>
-    </entityField>
-    <entityField>
-      <name>ISACTIVE</name>
-      <title>Active</title>
-      <contentType>BOOLEAN</contentType>
-      <dropDownProcess>%aditoprj%/entity/KeywordEntry_entity/entityfields/isactive/dropDownProcess.js</dropDownProcess>
-      <valueProcess>%aditoprj%/entity/KeywordEntry_entity/entityfields/isactive/valueProcess.js</valueProcess>
-    </entityField>
-    <entityField>
-      <name>ISESSENTIAL</name>
-      <documentation>%aditoprj%/entity/KeywordEntry_entity/entityfields/isessential/documentation.adoc</documentation>
-      <title>Relational</title>
-      <contentType>BOOLEAN</contentType>
-      <dropDownProcess>%aditoprj%/entity/KeywordEntry_entity/entityfields/isessential/dropDownProcess.js</dropDownProcess>
-      <state>READONLY</state>
-    </entityField>
-    <entityParameter>
-      <name>ContainerName_param</name>
-      <expose v="true" />
-      <documentation>%aditoprj%/entity/KeywordEntry_entity/entityfields/containername_param/documentation.adoc</documentation>
-    </entityParameter>
-    <entityProvider>
-      <name>SpecificContainerKeywords</name>
-      <lookupIdfield>KEYID</lookupIdfield>
-      <recordContainer>db</recordContainer>
-      <dependencies>
-        <entityDependency>
-          <name>bb48a3ee-f340-4fd4-8c80-ef73b765ab58</name>
-          <entityName>Organisation_entity</entityName>
-          <fieldName>KeywordContactStates</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>4b1d1def-36d3-45e9-9ed5-eaef12d1ec82</name>
-          <entityName>Activity_entity</entityName>
-          <fieldName>KeywordDirections</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>42219987-4eff-4429-a22c-93e8a9c55c45</name>
-          <entityName>Contract_entity</entityName>
-          <fieldName>ContractPayments</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>2712e2b3-f17f-4a9c-9752-2383f62eb2b8</name>
-          <entityName>Contract_entity</entityName>
-          <fieldName>ContractStates</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>bd68f269-457c-487d-a1b2-e045d98f74b7</name>
-          <entityName>Contract_entity</entityName>
-          <fieldName>ContractTypes</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>b88b5cc8-c29e-4110-b86e-d1d0050460e5</name>
-          <entityName>Offer_entity</entityName>
-          <fieldName>KeywordCurrencies</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>57c746ee-a8c0-484a-8c73-6301609b76b1</name>
-          <entityName>Order_entity</entityName>
-          <fieldName>KeywordCurrencies</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>bf014596-954b-4c7d-9304-8283c9bcc7ae</name>
-          <entityName>Productprice_entity</entityName>
-          <fieldName>KeywordCurrencies</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>f5dcbf08-3765-4a9d-8b42-cb1219c87f57</name>
-          <entityName>Offeritem_entity</entityName>
-          <fieldName>KeywordProductGroupcodes</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>53bcaa07-94eb-4e81-9e9e-c5748156dad5</name>
-          <entityName>Orderitem_entity</entityName>
-          <fieldName>KeywordProductGroupcodes</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>c404b010-1634-4160-adca-7edf1535ee26</name>
-          <entityName>Product_entity</entityName>
-          <fieldName>KeywordProductGroupcodes</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>3575fdd7-3dd6-4318-b0d2-32d1df821076</name>
-          <entityName>Forecast_entity</entityName>
-          <fieldName>KeywordProductGroupcodes</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>5a21cbe2-4eb0-4968-80fa-b98a64599230</name>
-          <entityName>Offer_entity</entityName>
-          <fieldName>KeywordOfferStates</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>8696e561-b263-4c7c-b753-c5da44b48055</name>
-          <entityName>Organisation_entity</entityName>
-          <fieldName>KeywordOrganisationTypes</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>0d54d283-f158-4b91-8f6d-026954ed9c50</name>
-          <entityName>Person_entity</entityName>
-          <fieldName>KeywordGenders</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>001e0934-0920-4b38-afff-caf299e96abf</name>
-          <entityName>Task_entity</entityName>
-          <fieldName>KeywordTypes</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>8d28f08b-675d-4bcf-9318-a508d45ca69e</name>
-          <entityName>Task_entity</entityName>
-          <fieldName>KeywordStates</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>b069ef7d-07a0-460c-a8e7-cde5861c96c2</name>
-          <entityName>Productprice_entity</entityName>
-          <fieldName>KeywordPricelists</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>7f134ef1-cff5-4cf4-9d2a-e288c7904c28</name>
-          <entityName>Offeritem_entity</entityName>
-          <fieldName>KeywordQuantityUnits</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>c3c3b430-a14f-46b4-909a-9b53cef35413</name>
-          <entityName>Orderitem_entity</entityName>
-          <fieldName>KeywordQuantityUnits</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>a1983efd-92f9-4a6b-8805-d2977fcde0c8</name>
-          <entityName>Product_entity</entityName>
-          <fieldName>KeywordQuantityUnits</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>026021cd-cd64-400d-8bd5-f6d044af1ad8</name>
-          <entityName>Member_entity</entityName>
-          <fieldName>KeywordMemberRoles</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>356e23f9-eb05-4e18-b0b5-cbc7c8716dba</name>
-          <entityName>SalesprojectSource_entity</entityName>
-          <fieldName>KeywordSources</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>36a72192-902f-431b-8f43-0bef311678f7</name>
-          <entityName>Order_entity</entityName>
-          <fieldName>KeywordStates</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>e2041dea-8647-49e9-aacf-4481b75b76ff</name>
-          <entityName>Stock_entity</entityName>
-          <fieldName>KeywordWarehouses</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>403c40a4-f747-4e47-ad60-07334724d6fb</name>
-          <entityName>KeywordAttribute_entity</entityName>
-          <fieldName>KeywordAttributeTypes</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>078bbd52-87fa-44cc-9902-04af935b5fbc</name>
-          <entityName>Attribute_entity</entityName>
-          <fieldName>KeywordAttributeTypes</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>718fe5a2-c75f-49ed-b67e-fc4fbf63ff1d</name>
-          <entityName>Salesproject_entity</entityName>
-          <fieldName>KeywordProbabilties</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>a44375e9-917c-4db8-9aa8-de0625caf78f</name>
-          <entityName>Activity_entity</entityName>
-          <fieldName>KeywordCategories</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>f442a641-4dff-4860-bf4c-cfddc054e075</name>
-          <entityName>Offer_entity</entityName>
-          <fieldName>KeywordProbabilities</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>fa831dac-3287-422a-8f28-504fc525876a</name>
-          <entityName>Communication_entity</entityName>
-          <fieldName>KeywordMediums</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>04b28ce6-a144-4c19-ac2d-4cfbc3568700</name>
-          <entityName>Organisation_entity</entityName>
-          <fieldName>KeywordPricePolitics</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>f024df05-2faf-4447-9eed-ae31b329d542</name>
-          <entityName>Competition_entity</entityName>
-          <fieldName>KeywordPricePolitics</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>60840c28-9875-4e3e-8099-5ca208d58bbe</name>
-          <entityName>Organisation_entity</entityName>
-          <fieldName>KeywordWeaknesses</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>854148e2-2532-4562-b393-832819e8d462</name>
-          <entityName>Organisation_entity</entityName>
-          <fieldName>KeywordStrenghts</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>613d5861-0494-45f9-a839-a705347a68da</name>
-          <entityName>Competition_entity</entityName>
-          <fieldName>KeywordWeaknesses</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>119d79d0-9e04-4dd0-80bb-0bc32eaae775</name>
-          <entityName>Competition_entity</entityName>
-          <fieldName>KeywordStrenghts</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>6e2d164c-1ac7-4ed0-ad8f-7bfda1328493</name>
-          <entityName>Salesproject_entity</entityName>
-          <fieldName>KeywordStates</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>3ca6d3c7-83d2-4761-bab4-50d2baecdbd6</name>
-          <entityName>Competition_entity</entityName>
-          <fieldName>KeywordPhases</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>f672b4a5-7d68-46c8-9834-4f706d0d8720</name>
-          <entityName>Salesproject_entity</entityName>
-          <fieldName>KeywordPhases</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>1053a90d-574a-4ca2-b41d-42b513db0fd2</name>
-          <entityName>Task_entity</entityName>
-          <fieldName>KeywordPriorities</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>bf9f7a07-dfb9-44d0-8f9b-d3814053683e</name>
-          <entityName>Competition_entity</entityName>
-          <fieldName>KeywordStates</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>ef8b9397-6292-42de-806e-5aaf3e3db5f3</name>
-          <entityName>Salesproject_entity</entityName>
-          <fieldName>KeywordWonLost</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>5d9e0e48-ece8-4b8e-ab72-beef77b5dcc3</name>
-          <entityName>Task_entity</entityName>
-          <fieldName>KeywordProgress</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>36aa04c1-5361-4e40-a036-0546db596973</name>
-          <entityName>Offer_entity</entityName>
-          <fieldName>KeywordDeliveryTerm</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>7e12cbd6-3a2c-4bd8-bc66-5001c282b690</name>
-          <entityName>Offer_entity</entityName>
-          <fieldName>KeywordPaymentTerm</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>77be3cca-8b50-4810-9549-3fd3e6fdf220</name>
-          <entityName>Person_entity</entityName>
-          <fieldName>KeywordContactStates</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>7945545b-f1e6-446d-84c3-ef68486652f4</name>
-          <entityName>Contact_entity</entityName>
-          <fieldName>KeywordContactStates</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>740a9696-d394-48ea-bcbf-a5484a093bde</name>
-          <entityName>SalesprojectMilestone_entity</entityName>
-          <fieldName>Keywords</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>b5c39776-509e-4758-8d05-a64eac4e7f38</name>
-          <entityName>CampaignStep_entity</entityName>
-          <fieldName>KeywordStates</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>13d739cb-2b97-44a0-bed0-b6868b0e579e</name>
-          <entityName>CampaignCost_entity</entityName>
-          <fieldName>KeywordCampaignManagementCostCategory</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>63bd7284-e9a0-4576-afe8-299d412e8def</name>
-          <entityName>ClassificationAdmin_entity</entityName>
-          <fieldName>KeywordClassificationTypes</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>3a81e886-0d83-47f0-9ec7-c864ffc57cda</name>
-          <entityName>Classification_entity</entityName>
-          <fieldName>KeywordClassificationTypes</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>995646a8-ccec-4962-8c81-05a54903c433</name>
-          <entityName>CommRestriction_Entity</entityName>
-          <fieldName>CommRestrictionMedium</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-      </dependencies>
-      <children>
-        <entityParameter>
-          <name>OnlyActives_param</name>
-          <valueProcess>%aditoprj%/entity/KeywordEntry_entity/entityfields/specificcontainerkeywords/children/onlyactives_param/valueProcess.js</valueProcess>
-          <expose v="true" />
-          <triggerRecalculation v="false" />
-        </entityParameter>
-        <entityParameter>
-          <name>ContainerName_param</name>
-          <expose v="true" />
-        </entityParameter>
-      </children>
-    </entityProvider>
-    <entityField>
-      <name>TITLE_TRANSLATED</name>
-      <valueProcess>%aditoprj%/entity/KeywordEntry_entity/entityfields/title_translated/valueProcess.js</valueProcess>
-    </entityField>
-    <entityParameter>
-      <name>OnlyActives_param</name>
-      <valueProcess>%aditoprj%/entity/KeywordEntry_entity/entityfields/onlyactives_param/valueProcess.js</valueProcess>
-      <expose v="true" />
-      <triggerRecalculation v="true" />
-      <description>PARAMETER</description>
-    </entityParameter>
-    <entityConsumer>
-      <name>KeywordAttributeRelations</name>
-      <dependency>
-        <name>dependency</name>
-        <entityName>KeywordAttributeRelation_entity</entityName>
-        <fieldName>AttributesForKeywordEntry</fieldName>
-      </dependency>
-      <children>
-        <entityParameter>
-          <name>KeywordEntryId_param</name>
-          <valueProcess>%aditoprj%/entity/KeywordEntry_entity/entityfields/keywordattributerelations/children/keywordentryid_param/valueProcess.js</valueProcess>
-          <expose v="true" />
-        </entityParameter>
-      </children>
-    </entityConsumer>
-    <entityConsumer>
-      <name>KeywordAttributeRelationsReadOnly</name>
-      <documentation>%aditoprj%/entity/KeywordEntry_entity/entityfields/keywordattributerelationsreadonly/documentation.adoc</documentation>
-      <state>READONLY</state>
-      <dependency>
-        <name>dependency</name>
-        <entityName>KeywordAttributeRelation_entity</entityName>
-        <fieldName>AttributesForKeywordEntry</fieldName>
-      </dependency>
-      <children>
-        <entityParameter>
-          <name>KeywordEntryId_param</name>
-          <valueProcess>%aditoprj%/entity/KeywordEntry_entity/entityfields/keywordattributerelationsreadonly/children/keywordentryid_param/valueProcess.js</valueProcess>
-        </entityParameter>
-      </children>
-    </entityConsumer>
-    <entityParameter>
-      <name>ExcludedKeyIdsSubquery_param</name>
-      <expose v="true" />
-      <documentation>%aditoprj%/entity/KeywordEntry_entity/entityfields/excludedkeyidssubquery_param/documentation.adoc</documentation>
-      <description>PARAMETER</description>
-    </entityParameter>
-  </entityFields>
-  <recordContainers>
-    <dbRecordContainer>
-      <name>db</name>
-      <alias>Data_alias</alias>
-      <isPageable v="false" />
-      <conditionProcess>%aditoprj%/entity/KeywordEntry_entity/recordcontainers/db/conditionProcess.js</conditionProcess>
-      <orderClauseProcess>%aditoprj%/entity/KeywordEntry_entity/recordcontainers/db/orderClauseProcess.js</orderClauseProcess>
-      <onDBDelete>%aditoprj%/entity/KeywordEntry_entity/recordcontainers/db/onDBDelete.js</onDBDelete>
-      <linkInformation>
-        <linkInformation>
-          <name>52acbfe0-57f4-4614-83af-9882e168f431</name>
-          <tableName>AB_KEYWORD_ENTRY</tableName>
-          <primaryKey>AB_KEYWORD_ENTRYID</primaryKey>
-          <isUIDTable v="true" />
-          <readonly v="false" />
-        </linkInformation>
-      </linkInformation>
-      <recordFieldMappings>
-        <dbRecordFieldMapping>
-          <name>TITLE.value</name>
-          <recordfield>AB_KEYWORD_ENTRY.TITLE</recordfield>
-        </dbRecordFieldMapping>
-        <dbRecordFieldMapping>
-          <name>SORTING.value</name>
-          <recordfield>AB_KEYWORD_ENTRY.SORTING</recordfield>
-        </dbRecordFieldMapping>
-        <dbRecordFieldMapping>
-          <name>ISESSENTIAL.value</name>
-          <recordfield>AB_KEYWORD_ENTRY.ISESSENTIAL</recordfield>
-        </dbRecordFieldMapping>
-        <dbRecordFieldMapping>
-          <name>ISACTIVE.value</name>
-          <recordfield>AB_KEYWORD_ENTRY.ISACTIVE</recordfield>
-        </dbRecordFieldMapping>
-        <dbRecordFieldMapping>
-          <name>AB_KEYWORD_ENTRYID.value</name>
-          <recordfield>AB_KEYWORD_ENTRY.AB_KEYWORD_ENTRYID</recordfield>
-        </dbRecordFieldMapping>
-        <dbRecordFieldMapping>
-          <name>KEYID.value</name>
-          <recordfield>AB_KEYWORD_ENTRY.KEYID</recordfield>
-        </dbRecordFieldMapping>
-        <dbRecordFieldMapping>
-          <name>CONTAINER.value</name>
-          <recordfield>AB_KEYWORD_ENTRY.CONTAINER</recordfield>
-        </dbRecordFieldMapping>
-      </recordFieldMappings>
-    </dbRecordContainer>
-  </recordContainers>
-</entity>
+<?xml version="1.0" encoding="UTF-8"?>
+<entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.6">
+  <name>KeywordEntry_entity</name>
+  <majorModelMode>DISTRIBUTED</majorModelMode>
+  <documentation>%aditoprj%/entity/KeywordEntry_entity/documentation.adoc</documentation>
+  <title>Keyword</title>
+  <siblings />
+  <contentTitleProcess>%aditoprj%/entity/KeywordEntry_entity/contentTitleProcess.js</contentTitleProcess>
+  <onValidation>%aditoprj%/entity/KeywordEntry_entity/onValidation.js</onValidation>
+  <iconId>VAADIN:KEY</iconId>
+  <iconIdProcess>%aditoprj%/entity/KeywordEntry_entity/iconIdProcess.js</iconIdProcess>
+  <titlePlural>Keywords</titlePlural>
+  <recordContainer>db</recordContainer>
+  <entityFields>
+    <entityProvider>
+      <name>#PROVIDER</name>
+      <lookupIdfield>KEYID</lookupIdfield>
+      <recordContainer>db</recordContainer>
+    </entityProvider>
+    <entityField>
+      <name>CONTAINER</name>
+      <documentation>%aditoprj%/entity/KeywordEntry_entity/entityfields/container/documentation.adoc</documentation>
+      <title>Container</title>
+      <groupable v="true" />
+      <mandatory v="true" />
+      <dropDownProcess>%aditoprj%/entity/KeywordEntry_entity/entityfields/container/dropDownProcess.js</dropDownProcess>
+      <textInputAllowed v="true" />
+      <state>READONLY</state>
+      <stateProcess>%aditoprj%/entity/KeywordEntry_entity/entityfields/container/stateProcess.js</stateProcess>
+    </entityField>
+    <entityField>
+      <name>AB_KEYWORD_ENTRYID</name>
+      <searchable v="false" />
+      <valueProcess>%aditoprj%/entity/KeywordEntry_entity/entityfields/ab_keyword_entryid/valueProcess.js</valueProcess>
+    </entityField>
+    <entityField>
+      <name>KEYID</name>
+      <documentation>%aditoprj%/entity/KeywordEntry_entity/entityfields/keyid/documentation.adoc</documentation>
+      <title>Key</title>
+      <mandatory v="true" />
+      <state>READONLY</state>
+      <stateProcess>%aditoprj%/entity/KeywordEntry_entity/entityfields/keyid/stateProcess.js</stateProcess>
+      <valueProcess>%aditoprj%/entity/KeywordEntry_entity/entityfields/keyid/valueProcess.js</valueProcess>
+      <onValidation>%aditoprj%/entity/KeywordEntry_entity/entityfields/keyid/onValidation.js</onValidation>
+    </entityField>
+    <entityField>
+      <name>TITLE</name>
+      <title>Title (original language)</title>
+      <mandatory v="true" />
+    </entityField>
+    <entityField>
+      <name>SORTING</name>
+      <documentation>%aditoprj%/entity/KeywordEntry_entity/entityfields/sorting/documentation.adoc</documentation>
+      <title>Sorting</title>
+      <mandatory v="false" />
+      <state>AUTO</state>
+    </entityField>
+    <entityField>
+      <name>ISACTIVE</name>
+      <title>Active</title>
+      <contentType>BOOLEAN</contentType>
+      <dropDownProcess>%aditoprj%/entity/KeywordEntry_entity/entityfields/isactive/dropDownProcess.js</dropDownProcess>
+      <valueProcess>%aditoprj%/entity/KeywordEntry_entity/entityfields/isactive/valueProcess.js</valueProcess>
+    </entityField>
+    <entityField>
+      <name>ISESSENTIAL</name>
+      <documentation>%aditoprj%/entity/KeywordEntry_entity/entityfields/isessential/documentation.adoc</documentation>
+      <title>Relational</title>
+      <contentType>BOOLEAN</contentType>
+      <dropDownProcess>%aditoprj%/entity/KeywordEntry_entity/entityfields/isessential/dropDownProcess.js</dropDownProcess>
+      <state>READONLY</state>
+    </entityField>
+    <entityParameter>
+      <name>ContainerName_param</name>
+      <expose v="true" />
+      <documentation>%aditoprj%/entity/KeywordEntry_entity/entityfields/containername_param/documentation.adoc</documentation>
+    </entityParameter>
+    <entityProvider>
+      <name>SpecificContainerKeywords</name>
+      <lookupIdfield>KEYID</lookupIdfield>
+      <recordContainer>db</recordContainer>
+      <dependencies>
+        <entityDependency>
+          <name>bb48a3ee-f340-4fd4-8c80-ef73b765ab58</name>
+          <entityName>Organisation_entity</entityName>
+          <fieldName>KeywordContactStates</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>4b1d1def-36d3-45e9-9ed5-eaef12d1ec82</name>
+          <entityName>Activity_entity</entityName>
+          <fieldName>KeywordDirections</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>42219987-4eff-4429-a22c-93e8a9c55c45</name>
+          <entityName>Contract_entity</entityName>
+          <fieldName>ContractPayments</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>2712e2b3-f17f-4a9c-9752-2383f62eb2b8</name>
+          <entityName>Contract_entity</entityName>
+          <fieldName>ContractStates</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>bd68f269-457c-487d-a1b2-e045d98f74b7</name>
+          <entityName>Contract_entity</entityName>
+          <fieldName>ContractTypes</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>b88b5cc8-c29e-4110-b86e-d1d0050460e5</name>
+          <entityName>Offer_entity</entityName>
+          <fieldName>KeywordCurrencies</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>57c746ee-a8c0-484a-8c73-6301609b76b1</name>
+          <entityName>Order_entity</entityName>
+          <fieldName>KeywordCurrencies</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>bf014596-954b-4c7d-9304-8283c9bcc7ae</name>
+          <entityName>Productprice_entity</entityName>
+          <fieldName>KeywordCurrencies</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>f5dcbf08-3765-4a9d-8b42-cb1219c87f57</name>
+          <entityName>Offeritem_entity</entityName>
+          <fieldName>KeywordProductGroupcodes</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>53bcaa07-94eb-4e81-9e9e-c5748156dad5</name>
+          <entityName>Orderitem_entity</entityName>
+          <fieldName>KeywordProductGroupcodes</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>c404b010-1634-4160-adca-7edf1535ee26</name>
+          <entityName>Product_entity</entityName>
+          <fieldName>KeywordProductGroupcodes</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>3575fdd7-3dd6-4318-b0d2-32d1df821076</name>
+          <entityName>Forecast_entity</entityName>
+          <fieldName>KeywordProductGroupcodes</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>5a21cbe2-4eb0-4968-80fa-b98a64599230</name>
+          <entityName>Offer_entity</entityName>
+          <fieldName>KeywordOfferStates</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>8696e561-b263-4c7c-b753-c5da44b48055</name>
+          <entityName>Organisation_entity</entityName>
+          <fieldName>KeywordOrganisationTypes</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>0d54d283-f158-4b91-8f6d-026954ed9c50</name>
+          <entityName>Person_entity</entityName>
+          <fieldName>KeywordGenders</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>001e0934-0920-4b38-afff-caf299e96abf</name>
+          <entityName>Task_entity</entityName>
+          <fieldName>KeywordTypes</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>8d28f08b-675d-4bcf-9318-a508d45ca69e</name>
+          <entityName>Task_entity</entityName>
+          <fieldName>KeywordStates</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>b069ef7d-07a0-460c-a8e7-cde5861c96c2</name>
+          <entityName>Productprice_entity</entityName>
+          <fieldName>KeywordPricelists</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>7f134ef1-cff5-4cf4-9d2a-e288c7904c28</name>
+          <entityName>Offeritem_entity</entityName>
+          <fieldName>KeywordQuantityUnits</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>c3c3b430-a14f-46b4-909a-9b53cef35413</name>
+          <entityName>Orderitem_entity</entityName>
+          <fieldName>KeywordQuantityUnits</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>a1983efd-92f9-4a6b-8805-d2977fcde0c8</name>
+          <entityName>Product_entity</entityName>
+          <fieldName>KeywordQuantityUnits</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>026021cd-cd64-400d-8bd5-f6d044af1ad8</name>
+          <entityName>Member_entity</entityName>
+          <fieldName>KeywordMemberRoles</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>356e23f9-eb05-4e18-b0b5-cbc7c8716dba</name>
+          <entityName>SalesprojectSource_entity</entityName>
+          <fieldName>KeywordSources</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>36a72192-902f-431b-8f43-0bef311678f7</name>
+          <entityName>Order_entity</entityName>
+          <fieldName>KeywordStates</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>e2041dea-8647-49e9-aacf-4481b75b76ff</name>
+          <entityName>Stock_entity</entityName>
+          <fieldName>KeywordWarehouses</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>403c40a4-f747-4e47-ad60-07334724d6fb</name>
+          <entityName>KeywordAttribute_entity</entityName>
+          <fieldName>KeywordAttributeTypes</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>078bbd52-87fa-44cc-9902-04af935b5fbc</name>
+          <entityName>Attribute_entity</entityName>
+          <fieldName>KeywordAttributeTypes</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>718fe5a2-c75f-49ed-b67e-fc4fbf63ff1d</name>
+          <entityName>Salesproject_entity</entityName>
+          <fieldName>KeywordProbabilties</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>a44375e9-917c-4db8-9aa8-de0625caf78f</name>
+          <entityName>Activity_entity</entityName>
+          <fieldName>KeywordCategories</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>f442a641-4dff-4860-bf4c-cfddc054e075</name>
+          <entityName>Offer_entity</entityName>
+          <fieldName>KeywordProbabilities</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>fa831dac-3287-422a-8f28-504fc525876a</name>
+          <entityName>Communication_entity</entityName>
+          <fieldName>KeywordMediums</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>04b28ce6-a144-4c19-ac2d-4cfbc3568700</name>
+          <entityName>Organisation_entity</entityName>
+          <fieldName>KeywordPricePolitics</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>f024df05-2faf-4447-9eed-ae31b329d542</name>
+          <entityName>Competition_entity</entityName>
+          <fieldName>KeywordPricePolitics</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>60840c28-9875-4e3e-8099-5ca208d58bbe</name>
+          <entityName>Organisation_entity</entityName>
+          <fieldName>KeywordWeaknesses</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>854148e2-2532-4562-b393-832819e8d462</name>
+          <entityName>Organisation_entity</entityName>
+          <fieldName>KeywordStrenghts</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>613d5861-0494-45f9-a839-a705347a68da</name>
+          <entityName>Competition_entity</entityName>
+          <fieldName>KeywordWeaknesses</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>119d79d0-9e04-4dd0-80bb-0bc32eaae775</name>
+          <entityName>Competition_entity</entityName>
+          <fieldName>KeywordStrenghts</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>6e2d164c-1ac7-4ed0-ad8f-7bfda1328493</name>
+          <entityName>Salesproject_entity</entityName>
+          <fieldName>KeywordStates</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>3ca6d3c7-83d2-4761-bab4-50d2baecdbd6</name>
+          <entityName>Competition_entity</entityName>
+          <fieldName>KeywordPhases</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>f672b4a5-7d68-46c8-9834-4f706d0d8720</name>
+          <entityName>Salesproject_entity</entityName>
+          <fieldName>KeywordPhases</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>1053a90d-574a-4ca2-b41d-42b513db0fd2</name>
+          <entityName>Task_entity</entityName>
+          <fieldName>KeywordPriorities</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>bf9f7a07-dfb9-44d0-8f9b-d3814053683e</name>
+          <entityName>Competition_entity</entityName>
+          <fieldName>KeywordStates</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>ef8b9397-6292-42de-806e-5aaf3e3db5f3</name>
+          <entityName>Salesproject_entity</entityName>
+          <fieldName>KeywordWonLost</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>5d9e0e48-ece8-4b8e-ab72-beef77b5dcc3</name>
+          <entityName>Task_entity</entityName>
+          <fieldName>KeywordProgress</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>36aa04c1-5361-4e40-a036-0546db596973</name>
+          <entityName>Offer_entity</entityName>
+          <fieldName>KeywordDeliveryTerm</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>7e12cbd6-3a2c-4bd8-bc66-5001c282b690</name>
+          <entityName>Offer_entity</entityName>
+          <fieldName>KeywordPaymentTerm</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>77be3cca-8b50-4810-9549-3fd3e6fdf220</name>
+          <entityName>Person_entity</entityName>
+          <fieldName>KeywordContactStates</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>7945545b-f1e6-446d-84c3-ef68486652f4</name>
+          <entityName>Contact_entity</entityName>
+          <fieldName>KeywordContactStates</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>740a9696-d394-48ea-bcbf-a5484a093bde</name>
+          <entityName>SalesprojectMilestone_entity</entityName>
+          <fieldName>Keywords</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>b5c39776-509e-4758-8d05-a64eac4e7f38</name>
+          <entityName>CampaignStep_entity</entityName>
+          <fieldName>KeywordStates</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>13d739cb-2b97-44a0-bed0-b6868b0e579e</name>
+          <entityName>CampaignCost_entity</entityName>
+          <fieldName>KeywordCampaignManagementCostCategory</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>63bd7284-e9a0-4576-afe8-299d412e8def</name>
+          <entityName>ClassificationAdmin_entity</entityName>
+          <fieldName>KeywordClassificationTypes</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>3a81e886-0d83-47f0-9ec7-c864ffc57cda</name>
+          <entityName>Classification_entity</entityName>
+          <fieldName>KeywordClassificationTypes</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>995646a8-ccec-4962-8c81-05a54903c433</name>
+          <entityName>CommRestriction_Entity</entityName>
+          <fieldName>CommRestrictionMedium</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+      </dependencies>
+      <children>
+        <entityParameter>
+          <name>OnlyActives_param</name>
+          <valueProcess>%aditoprj%/entity/KeywordEntry_entity/entityfields/specificcontainerkeywords/children/onlyactives_param/valueProcess.js</valueProcess>
+          <expose v="true" />
+          <triggerRecalculation v="false" />
+        </entityParameter>
+        <entityParameter>
+          <name>ContainerName_param</name>
+          <expose v="true" />
+        </entityParameter>
+      </children>
+    </entityProvider>
+    <entityField>
+      <name>TITLE_TRANSLATED</name>
+      <valueProcess>%aditoprj%/entity/KeywordEntry_entity/entityfields/title_translated/valueProcess.js</valueProcess>
+    </entityField>
+    <entityParameter>
+      <name>OnlyActives_param</name>
+      <valueProcess>%aditoprj%/entity/KeywordEntry_entity/entityfields/onlyactives_param/valueProcess.js</valueProcess>
+      <expose v="true" />
+      <triggerRecalculation v="true" />
+      <description>PARAMETER</description>
+    </entityParameter>
+    <entityConsumer>
+      <name>KeywordAttributeRelations</name>
+      <dependency>
+        <name>dependency</name>
+        <entityName>KeywordAttributeRelation_entity</entityName>
+        <fieldName>AttributesForKeywordEntry</fieldName>
+      </dependency>
+      <children>
+        <entityParameter>
+          <name>KeywordEntryId_param</name>
+          <valueProcess>%aditoprj%/entity/KeywordEntry_entity/entityfields/keywordattributerelations/children/keywordentryid_param/valueProcess.js</valueProcess>
+          <expose v="true" />
+        </entityParameter>
+      </children>
+    </entityConsumer>
+    <entityConsumer>
+      <name>KeywordAttributeRelationsReadOnly</name>
+      <documentation>%aditoprj%/entity/KeywordEntry_entity/entityfields/keywordattributerelationsreadonly/documentation.adoc</documentation>
+      <state>READONLY</state>
+      <dependency>
+        <name>dependency</name>
+        <entityName>KeywordAttributeRelation_entity</entityName>
+        <fieldName>AttributesForKeywordEntry</fieldName>
+      </dependency>
+      <children>
+        <entityParameter>
+          <name>KeywordEntryId_param</name>
+          <valueProcess>%aditoprj%/entity/KeywordEntry_entity/entityfields/keywordattributerelationsreadonly/children/keywordentryid_param/valueProcess.js</valueProcess>
+        </entityParameter>
+      </children>
+    </entityConsumer>
+    <entityParameter>
+      <name>ExcludedKeyIdsSubquery_param</name>
+      <expose v="true" />
+      <documentation>%aditoprj%/entity/KeywordEntry_entity/entityfields/excludedkeyidssubquery_param/documentation.adoc</documentation>
+      <description>PARAMETER</description>
+    </entityParameter>
+    <entityParameter>
+      <name>WhitelistIds_param</name>
+      <expose v="true" />
+      <documentation>%aditoprj%/entity/KeywordEntry_entity/entityfields/whitelistids_param/documentation.adoc</documentation>
+    </entityParameter>
+  </entityFields>
+  <recordContainers>
+    <dbRecordContainer>
+      <name>db</name>
+      <alias>Data_alias</alias>
+      <isPageable v="false" />
+      <conditionProcess>%aditoprj%/entity/KeywordEntry_entity/recordcontainers/db/conditionProcess.js</conditionProcess>
+      <orderClauseProcess>%aditoprj%/entity/KeywordEntry_entity/recordcontainers/db/orderClauseProcess.js</orderClauseProcess>
+      <onDBDelete>%aditoprj%/entity/KeywordEntry_entity/recordcontainers/db/onDBDelete.js</onDBDelete>
+      <linkInformation>
+        <linkInformation>
+          <name>52acbfe0-57f4-4614-83af-9882e168f431</name>
+          <tableName>AB_KEYWORD_ENTRY</tableName>
+          <primaryKey>AB_KEYWORD_ENTRYID</primaryKey>
+          <isUIDTable v="true" />
+          <readonly v="false" />
+        </linkInformation>
+      </linkInformation>
+      <recordFieldMappings>
+        <dbRecordFieldMapping>
+          <name>TITLE.value</name>
+          <recordfield>AB_KEYWORD_ENTRY.TITLE</recordfield>
+        </dbRecordFieldMapping>
+        <dbRecordFieldMapping>
+          <name>SORTING.value</name>
+          <recordfield>AB_KEYWORD_ENTRY.SORTING</recordfield>
+        </dbRecordFieldMapping>
+        <dbRecordFieldMapping>
+          <name>ISESSENTIAL.value</name>
+          <recordfield>AB_KEYWORD_ENTRY.ISESSENTIAL</recordfield>
+        </dbRecordFieldMapping>
+        <dbRecordFieldMapping>
+          <name>ISACTIVE.value</name>
+          <recordfield>AB_KEYWORD_ENTRY.ISACTIVE</recordfield>
+        </dbRecordFieldMapping>
+        <dbRecordFieldMapping>
+          <name>AB_KEYWORD_ENTRYID.value</name>
+          <recordfield>AB_KEYWORD_ENTRY.AB_KEYWORD_ENTRYID</recordfield>
+        </dbRecordFieldMapping>
+        <dbRecordFieldMapping>
+          <name>KEYID.value</name>
+          <recordfield>AB_KEYWORD_ENTRY.KEYID</recordfield>
+        </dbRecordFieldMapping>
+        <dbRecordFieldMapping>
+          <name>CONTAINER.value</name>
+          <recordfield>AB_KEYWORD_ENTRY.CONTAINER</recordfield>
+        </dbRecordFieldMapping>
+      </recordFieldMappings>
+    </dbRecordContainer>
+  </recordContainers>
+</entity>
diff --git a/entity/KeywordEntry_entity/entityfields/whitelistids_param/documentation.adoc b/entity/KeywordEntry_entity/entityfields/whitelistids_param/documentation.adoc
new file mode 100644
index 0000000000..caf09a596a
--- /dev/null
+++ b/entity/KeywordEntry_entity/entityfields/whitelistids_param/documentation.adoc
@@ -0,0 +1,2 @@
+Can be filled with a JSON array containing all allowed keyIds
+["id1", "id2", ...]
\ No newline at end of file
diff --git a/entity/KeywordEntry_entity/recordcontainers/db/conditionProcess.js b/entity/KeywordEntry_entity/recordcontainers/db/conditionProcess.js
index aa341622d8..e581324d16 100644
--- a/entity/KeywordEntry_entity/recordcontainers/db/conditionProcess.js
+++ b/entity/KeywordEntry_entity/recordcontainers/db/conditionProcess.js
@@ -13,5 +13,8 @@ if (vars.get("$param.OnlyActives_param") == "true")
 if (vars.exists("$param.ExcludedKeyIdsSubquery_param") && vars.get("$param.ExcludedKeyIdsSubquery_param"))
     cond.and("AB_KEYWORD_ENTRY.KEYID not in (" + vars.get("$param.ExcludedKeyIdsSubquery_param") + ")");
 
+if (vars.exists("$param.WhitelistIds_param") && vars.getString("$param.WhitelistIds_param"))
+    cond.andIn("AB_KEYWORD_ENTRY.KEYID", JSON.parse(vars.getString("$param.WhitelistIds_param")));
+
 var condStr = db.translateCondition(cond.build("1 = 1"));
 result.string(condStr);
\ No newline at end of file
diff --git a/entity/Task_entity/Task_entity.aod b/entity/Task_entity/Task_entity.aod
index 40ca575e6d..7951ac126e 100644
--- a/entity/Task_entity/Task_entity.aod
+++ b/entity/Task_entity/Task_entity.aod
@@ -1,615 +1,619 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.6">
-  <name>Task_entity</name>
-  <majorModelMode>DISTRIBUTED</majorModelMode>
-  <documentation>%aditoprj%/entity/Task_entity/documentation.adoc</documentation>
-  <title>Task</title>
-  <contentTitleProcess>%aditoprj%/entity/Task_entity/contentTitleProcess.js</contentTitleProcess>
-  <afterUiInit>%aditoprj%/entity/Task_entity/afterUiInit.js</afterUiInit>
-  <onValidation>%aditoprj%/entity/Task_entity/onValidation.js</onValidation>
-  <iconId>VAADIN:TASKS</iconId>
-  <iconIdProcess>%aditoprj%/entity/Task_entity/iconIdProcess.js</iconIdProcess>
-  <titlePlural>Tasks</titlePlural>
-  <recordContainer>db</recordContainer>
-  <entityFields>
-    <entityProvider>
-      <name>#PROVIDER</name>
-      <recordContainer>db</recordContainer>
-    </entityProvider>
-    <entityField>
-      <name>CODE</name>
-      <title>task number</title>
-      <contentType>NUMBER</contentType>
-      <outputFormat>0000000</outputFormat>
-      <inputFormat>0000000</inputFormat>
-      <searchable v="false" />
-      <state>DISABLED</state>
-      <stateProcess>%aditoprj%/entity/Task_entity/entityfields/code/stateProcess.js</stateProcess>
-    </entityField>
-    <entityField>
-      <name>SUBJECT</name>
-      <title>subject</title>
-      <mandatory v="true" />
-    </entityField>
-    <entityField>
-      <name>STATUS</name>
-      <title>{$TASK_STATUS}</title>
-      <colorProcess>%aditoprj%/entity/Task_entity/entityfields/status/colorProcess.js</colorProcess>
-      <consumer>KeywordStates</consumer>
-      <groupable v="true" />
-      <mandatory v="true" />
-      <valueProcess>%aditoprj%/entity/Task_entity/entityfields/status/valueProcess.js</valueProcess>
-      <displayValueProcess>%aditoprj%/entity/Task_entity/entityfields/status/displayValueProcess.js</displayValueProcess>
-    </entityField>
-    <entityField>
-      <name>PRIORITY</name>
-      <title>Priority</title>
-      <consumer>KeywordPriorities</consumer>
-      <groupable v="true" />
-      <mandatory v="true" />
-      <valueProcess>%aditoprj%/entity/Task_entity/entityfields/priority/valueProcess.js</valueProcess>
-      <displayValueProcess>%aditoprj%/entity/Task_entity/entityfields/priority/displayValueProcess.js</displayValueProcess>
-    </entityField>
-    <entityField>
-      <name>REQUESTOR_CONTACT_ID</name>
-      <title>{$TASK_REQUESTOR}</title>
-      <consumer>ContactRequestors</consumer>
-      <linkedContext>Person</linkedContext>
-      <mandatory v="true" />
-      <valueProcess>%aditoprj%/entity/Task_entity/entityfields/requestor_contact_id/valueProcess.js</valueProcess>
-      <displayValueProcess>%aditoprj%/entity/Task_entity/entityfields/requestor_contact_id/displayValueProcess.js</displayValueProcess>
-    </entityField>
-    <entityField>
-      <name>EDITOR_CONTACT_ID</name>
-      <title>{$TASK_EDITOR}</title>
-      <consumer>ContactEditors</consumer>
-      <linkedContext>Person</linkedContext>
-      <displayValueProcess>%aditoprj%/entity/Task_entity/entityfields/editor_contact_id/displayValueProcess.js</displayValueProcess>
-    </entityField>
-    <entityField>
-      <name>START_DATE</name>
-      <title>Begin</title>
-      <contentType>DATE</contentType>
-      <resolution>MINUTE</resolution>
-      <outputFormat>dd.MM.yyyy HH:mm</outputFormat>
-      <inputFormat>dd.MM.yyyy HH:mm</inputFormat>
-      <groupable v="true" />
-      <valueProcess>%aditoprj%/entity/Task_entity/entityfields/start_date/valueProcess.js</valueProcess>
-    </entityField>
-    <entityField>
-      <name>MATURITY_DATE</name>
-      <title>Maturity</title>
-      <contentType>DATE</contentType>
-      <resolution>MINUTE</resolution>
-      <outputFormat>dd.MM.yyyy HH:mm</outputFormat>
-      <inputFormat>dd.MM.yyyy HH:mm</inputFormat>
-      <valueProcess>%aditoprj%/entity/Task_entity/entityfields/maturity_date/valueProcess.js</valueProcess>
-    </entityField>
-    <entityField>
-      <name>TYPE</name>
-      <title>type</title>
-      <consumer>KeywordTypes</consumer>
-      <groupable v="true" />
-      <searchable v="true" />
-      <state>READONLY</state>
-      <valueProcess>%aditoprj%/entity/Task_entity/entityfields/type/valueProcess.js</valueProcess>
-      <displayValueProcess>%aditoprj%/entity/Task_entity/entityfields/type/displayValueProcess.js</displayValueProcess>
-    </entityField>
-    <entityField>
-      <name>DESCRIPTION</name>
-      <title>description</title>
-      <contentType>LONG_TEXT</contentType>
-    </entityField>
-    <entityField>
-      <name>PROTECTIONLEVEL</name>
-      <title>Protected</title>
-      <contentType>BOOLEAN</contentType>
-      <contentTypeProcess>%aditoprj%/entity/Task_entity/entityfields/protectionlevel/contentTypeProcess.js</contentTypeProcess>
-      <dropDownProcess>%aditoprj%/entity/Task_entity/entityfields/protectionlevel/dropDownProcess.js</dropDownProcess>
-      <valueProcess>%aditoprj%/entity/Task_entity/entityfields/protectionlevel/valueProcess.js</valueProcess>
-    </entityField>
-    <entityField>
-      <name>TASKID</name>
-      <mandatory v="true" />
-      <searchable v="false" />
-      <valueProcess>%aditoprj%/entity/Task_entity/entityfields/taskid/valueProcess.js</valueProcess>
-    </entityField>
-    <entityConsumer>
-      <name>ContactEditors</name>
-      <dependency>
-        <name>dependency</name>
-        <entityName>Employee_entity</entityName>
-        <fieldName>Employees</fieldName>
-      </dependency>
-      <children>
-        <entityParameter>
-          <name>OnlyActives_param</name>
-          <valueProcess>%aditoprj%/entity/Task_entity/entityfields/contacteditors/children/onlyactives_param/valueProcess.js</valueProcess>
-        </entityParameter>
-      </children>
-    </entityConsumer>
-    <entityConsumer>
-      <name>ContactRequestors</name>
-      <dependency>
-        <name>dependency</name>
-        <entityName>Employee_entity</entityName>
-        <fieldName>Employees</fieldName>
-      </dependency>
-    </entityConsumer>
-    <entityConsumer>
-      <name>MainDocuments</name>
-      <stateProcess>%aditoprj%/entity/Task_entity/entityfields/maindocuments/stateProcess.js</stateProcess>
-      <dependency>
-        <name>dependency</name>
-        <entityName>Document_entity</entityName>
-        <fieldName>#PROVIDER</fieldName>
-      </dependency>
-      <children>
-        <entityParameter>
-          <name>AssignmentRowId_param</name>
-          <valueProcess>%aditoprj%/entity/Task_entity/entityfields/maindocuments/children/assignmentrowid_param/valueProcess.js</valueProcess>
-        </entityParameter>
-        <entityParameter>
-          <name>AssignmentTable_param</name>
-          <valueProcess>%aditoprj%/entity/Task_entity/entityfields/maindocuments/children/assignmenttable_param/valueProcess.js</valueProcess>
-        </entityParameter>
-      </children>
-    </entityConsumer>
-    <entityConsumer>
-      <name>KeywordStates</name>
-      <dependency>
-        <name>dependency</name>
-        <entityName>KeywordEntry_entity</entityName>
-        <fieldName>SpecificContainerKeywords</fieldName>
-      </dependency>
-      <children>
-        <entityParameter>
-          <name>ContainerName_param</name>
-          <valueProcess>%aditoprj%/entity/Task_entity/entityfields/keywordstates/children/containername_param/valueProcess.js</valueProcess>
-          <expose v="false" />
-        </entityParameter>
-      </children>
-    </entityConsumer>
-    <entityConsumer>
-      <name>KeywordTypes</name>
-      <dependency>
-        <name>dependency</name>
-        <entityName>KeywordEntry_entity</entityName>
-        <fieldName>SpecificContainerKeywords</fieldName>
-      </dependency>
-      <children>
-        <entityParameter>
-          <name>ContainerName_param</name>
-          <valueProcess>%aditoprj%/entity/Task_entity/entityfields/keywordtypes/children/containername_param/valueProcess.js</valueProcess>
-          <expose v="false" />
-        </entityParameter>
-      </children>
-    </entityConsumer>
-    <entityConsumer>
-      <name>ModuleTrees</name>
-      <dependency>
-        <name>dependency</name>
-        <entityName>ModuleTree_entity</entityName>
-        <fieldName>TreeProviders</fieldName>
-      </dependency>
-      <children>
-        <entityParameter>
-          <name>ID_param</name>
-          <valueProcess>%aditoprj%/entity/Task_entity/entityfields/moduletrees/children/id_param/valueProcess.js</valueProcess>
-          <expose v="false" />
-          <mandatory v="false" />
-        </entityParameter>
-        <entityParameter>
-          <name>ContextName_param</name>
-          <valueProcess>%aditoprj%/entity/Task_entity/entityfields/moduletrees/children/contextname_param/valueProcess.js</valueProcess>
-          <expose v="false" />
-          <mandatory v="false" />
-        </entityParameter>
-      </children>
-    </entityConsumer>
-    <entityField>
-      <name>PARENT_CONTEXT</name>
-      <searchable v="false" />
-      <valueProcess>%aditoprj%/entity/Task_entity/entityfields/parent_context/valueProcess.js</valueProcess>
-    </entityField>
-    <entityField>
-      <name>PARENT_ID</name>
-      <searchable v="false" />
-      <valueProcess>%aditoprj%/entity/Task_entity/entityfields/parent_id/valueProcess.js</valueProcess>
-    </entityField>
-    <entityParameter>
-      <name>ParentId_param</name>
-      <expose v="true" />
-      <description>PARAMETER</description>
-    </entityParameter>
-    <entityParameter>
-      <name>ParentContext_param</name>
-      <expose v="true" />
-      <description>PARAMETER</description>
-    </entityParameter>
-    <entityActionField>
-      <name>newActivity</name>
-      <title>New activity</title>
-      <onActionProcess>%aditoprj%/entity/Task_entity/entityfields/newactivity/onActionProcess.js</onActionProcess>
-      <iconId>VAADIN:HOURGLASS_END</iconId>
-      <tooltip>New activity</tooltip>
-      <tooltipProcess>%aditoprj%/entity/Task_entity/entityfields/newactivity/tooltipProcess.js</tooltipProcess>
-    </entityActionField>
-    <entityActionField>
-      <name>newTask</name>
-      <title>New task</title>
-      <onActionProcess>%aditoprj%/entity/Task_entity/entityfields/newtask/onActionProcess.js</onActionProcess>
-      <actionOrder v="1" />
-      <iconId>VAADIN:TASKS</iconId>
-    </entityActionField>
-    <entityParameter>
-      <name>RowId_param</name>
-      <expose v="true" />
-      <description>PARAMETER</description>
-    </entityParameter>
-    <entityParameter>
-      <name>ObjectId_param</name>
-      <expose v="true" />
-      <description>PARAMETER</description>
-    </entityParameter>
-    <entityConsumer>
-      <name>KeywordPriorities</name>
-      <dependency>
-        <name>dependency</name>
-        <entityName>KeywordEntry_entity</entityName>
-        <fieldName>SpecificContainerKeywords</fieldName>
-      </dependency>
-      <children>
-        <entityParameter>
-          <name>ContainerName_param</name>
-          <valueProcess>%aditoprj%/entity/Task_entity/entityfields/keywordpriorities/children/containername_param/valueProcess.js</valueProcess>
-          <expose v="false" />
-        </entityParameter>
-      </children>
-    </entityConsumer>
-    <entityActionField>
-      <name>newOffer</name>
-      <title>New offer</title>
-      <onActionProcess>%aditoprj%/entity/Task_entity/entityfields/newoffer/onActionProcess.js</onActionProcess>
-      <actionOrder v="0" />
-      <iconId>VAADIN:CART</iconId>
-    </entityActionField>
-    <entityField>
-      <name>PROGRESS</name>
-      <title>Progress</title>
-      <consumer>KeywordProgress</consumer>
-      <mandatory v="true" />
-      <valueProcess>%aditoprj%/entity/Task_entity/entityfields/progress/valueProcess.js</valueProcess>
-      <displayValueProcess>%aditoprj%/entity/Task_entity/entityfields/progress/displayValueProcess.js</displayValueProcess>
-    </entityField>
-    <entityConsumer>
-      <name>KeywordProgress</name>
-      <dependency>
-        <name>dependency</name>
-        <entityName>KeywordEntry_entity</entityName>
-        <fieldName>SpecificContainerKeywords</fieldName>
-      </dependency>
-      <children>
-        <entityParameter>
-          <name>ContainerName_param</name>
-          <valueProcess>%aditoprj%/entity/Task_entity/entityfields/keywordprogress/children/containername_param/valueProcess.js</valueProcess>
-        </entityParameter>
-      </children>
-    </entityConsumer>
-    <entityConsumer>
-      <name>Links</name>
-      <dependency>
-        <name>dependency</name>
-        <entityName>TaskLink_entity</entityName>
-        <fieldName>Link</fieldName>
-      </dependency>
-      <children>
-        <entityParameter>
-          <name>TaskId_param</name>
-          <valueProcess>%aditoprj%/entity/Task_entity/entityfields/links/children/taskid_param/valueProcess.js</valueProcess>
-        </entityParameter>
-      </children>
-    </entityConsumer>
-    <entityProvider>
-      <name>Tasks</name>
-      <dependencies>
-        <entityDependency>
-          <name>dd79df43-264c-494b-9c92-cadf19e61db6</name>
-          <entityName>Organisation_entity</entityName>
-          <fieldName>Tasks</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>dc29832e-15da-4f64-b17a-f1dd978ef47b</name>
-          <entityName>Person_entity</entityName>
-          <fieldName>Tasks</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>c6507834-cd91-4202-bdf7-6566f968edb4</name>
-          <entityName>Salesproject_entity</entityName>
-          <fieldName>Tasks</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>26b9b221-de02-40ef-a400-d4b5e356da0b</name>
-          <entityName>Offer_entity</entityName>
-          <fieldName>Tasks</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>b2bb448a-b647-40c8-baec-16356f3e23f5</name>
-          <entityName>Order_entity</entityName>
-          <fieldName>Tasks</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>a93f1e7e-f929-438f-8f37-21e4af8b53b6</name>
-          <entityName>Product_entity</entityName>
-          <fieldName>Tasks</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>2b0c15eb-fa9a-4ee8-a8b1-5d0f344ddad6</name>
-          <entityName>Contract_entity</entityName>
-          <fieldName>Tasks</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>335e31ad-ab67-4567-b4ea-3668f04922b2</name>
-          <entityName>Campaign_entity</entityName>
-          <fieldName>Tasks</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>fbaa2f6c-0ba1-4c93-acae-d7b636581679</name>
-          <entityName>CampaignStep_entity</entityName>
-          <fieldName>Tasks</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-      </dependencies>
-      <children>
-        <entityParameter>
-          <name>RowId_param</name>
-          <expose v="true" />
-        </entityParameter>
-        <entityParameter>
-          <name>PresetLinks_param</name>
-          <expose v="true" />
-        </entityParameter>
-        <entityParameter>
-          <name>ParentId_param</name>
-          <expose v="false" />
-        </entityParameter>
-        <entityParameter>
-          <name>ParentContext_param</name>
-          <expose v="false" />
-        </entityParameter>
-        <entityParameter>
-          <name>ObjectId_param</name>
-          <expose v="true" />
-        </entityParameter>
-      </children>
-    </entityProvider>
-    <entityParameter>
-      <name>PresetLinks_param</name>
-      <expose v="true" />
-      <documentation>%aditoprj%/entity/Task_entity/entityfields/presetlinks_param/documentation.adoc</documentation>
-      <description>PARAMETER</description>
-    </entityParameter>
-    <entityField>
-      <name>SUBJECT_DETAILS</name>
-      <title>subject</title>
-      <linkedContext>Task</linkedContext>
-    </entityField>
-    <entityParameter>
-      <name>FilterOnlyOwnTask_param</name>
-      <valueProcess>%aditoprj%/entity/Task_entity/entityfields/filteronlyowntask_param/valueProcess.js</valueProcess>
-      <expose v="true" />
-      <description>PARAMETER</description>
-    </entityParameter>
-    <entityField>
-      <name>PRIORITY_ICON</name>
-      <colorProcess>%aditoprj%/entity/Task_entity/entityfields/priority_icon/colorProcess.js</colorProcess>
-      <contentType>IMAGE</contentType>
-      <valueProcess>%aditoprj%/entity/Task_entity/entityfields/priority_icon/valueProcess.js</valueProcess>
-    </entityField>
-    <entityConsumer>
-      <name>LogHistories</name>
-      <dependency>
-        <name>dependency</name>
-        <entityName>LogHistory_entity</entityName>
-        <fieldName>LogHistoryProvider</fieldName>
-      </dependency>
-      <children>
-        <entityParameter>
-          <name>tablenames_param</name>
-          <valueProcess>%aditoprj%/entity/Task_entity/entityfields/loghistories/children/tablenames_param/valueProcess.js</valueProcess>
-        </entityParameter>
-      </children>
-    </entityConsumer>
-    <entityConsumer>
-      <name>Documents</name>
-      <dependency>
-        <name>dependency</name>
-        <entityName>Document_entity</entityName>
-        <fieldName>Documents</fieldName>
-      </dependency>
-      <children>
-        <entityParameter>
-          <name>AssignmentRowId_param</name>
-          <valueProcess>%aditoprj%/entity/Task_entity/entityfields/documents/children/assignmentrowid_param/valueProcess.js</valueProcess>
-        </entityParameter>
-        <entityParameter>
-          <name>AssignmentTable_param</name>
-          <valueProcess>%aditoprj%/entity/Task_entity/entityfields/documents/children/assignmenttable_param/valueProcess.js</valueProcess>
-        </entityParameter>
-      </children>
-    </entityConsumer>
-    <entityConsumer>
-      <name>Attributes</name>
-      <stateProcess>%aditoprj%/entity/Task_entity/entityfields/attributes/stateProcess.js</stateProcess>
-      <onValidation>%aditoprj%/entity/Task_entity/entityfields/attributes/onValidation.js</onValidation>
-      <dependency>
-        <name>dependency</name>
-        <entityName>AttributeRelation_entity</entityName>
-        <fieldName>AttributeRelations</fieldName>
-      </dependency>
-      <children>
-        <entityParameter>
-          <name>ObjectRowId_param</name>
-          <valueProcess>%aditoprj%/entity/Task_entity/entityfields/attributes/children/objectrowid_param/valueProcess.js</valueProcess>
-        </entityParameter>
-        <entityParameter>
-          <name>ObjectType_param</name>
-          <valueProcess>%aditoprj%/entity/Task_entity/entityfields/attributes/children/objecttype_param/valueProcess.js</valueProcess>
-        </entityParameter>
-        <entityParameter>
-          <name>ShowEmpty_param</name>
-          <valueProcess>%aditoprj%/entity/Task_entity/entityfields/attributes/children/showempty_param/valueProcess.js</valueProcess>
-        </entityParameter>
-        <entityParameter>
-          <name>FilteredAttributeIds_param</name>
-          <valueProcess>%aditoprj%/entity/Task_entity/entityfields/attributes/children/filteredattributeids_param/valueProcess.js</valueProcess>
-        </entityParameter>
-        <entityParameter>
-          <name>DisplaySimpleName_param</name>
-          <valueProcess>%aditoprj%/entity/Task_entity/entityfields/attributes/children/displaysimplename_param/valueProcess.js</valueProcess>
-        </entityParameter>
-      </children>
-    </entityConsumer>
-    <entityParameter>
-      <name>Type_param</name>
-      <valueProcess>%aditoprj%/entity/Task_entity/entityfields/type_param/valueProcess.js</valueProcess>
-      <expose v="true" />
-    </entityParameter>
-    <entityActionGroup>
-      <name>tableActions</name>
-      <children>
-        <entityActionField>
-          <name>newBugTicket</name>
-          <title>New Bugticket</title>
-          <onActionProcess>%aditoprj%/entity/Task_entity/entityfields/tableactions/children/newbugticket/onActionProcess.js</onActionProcess>
-          <iconId>VAADIN:PUZZLE_PIECE</iconId>
-          <tooltip>New Bugticket</tooltip>
-        </entityActionField>
-        <entityActionField>
-          <name>newSupportTicket</name>
-          <title>New Supportticket</title>
-          <onActionProcess>%aditoprj%/entity/Task_entity/entityfields/tableactions/children/newsupportticket/onActionProcess.js</onActionProcess>
-          <iconId>VAADIN:QUESTION</iconId>
-          <tooltip>New Supportticket</tooltip>
-        </entityActionField>
-      </children>
-    </entityActionGroup>
-  </entityFields>
-  <recordContainers>
-    <dbRecordContainer>
-      <name>db</name>
-      <alias>Data_alias</alias>
-      <conditionProcess>%aditoprj%/entity/Task_entity/recordcontainers/db/conditionProcess.js</conditionProcess>
-      <orderClauseProcess>%aditoprj%/entity/Task_entity/recordcontainers/db/orderClauseProcess.js</orderClauseProcess>
-      <onDBInsert>%aditoprj%/entity/Task_entity/recordcontainers/db/onDBInsert.js</onDBInsert>
-      <onDBDelete>%aditoprj%/entity/Task_entity/recordcontainers/db/onDBDelete.js</onDBDelete>
-      <linkInformation>
-        <linkInformation>
-          <name>47e1b4a5-6901-48b0-85ba-bec39b86a2d7</name>
-          <tableName>TASK</tableName>
-          <primaryKey>TASKID</primaryKey>
-          <isUIDTable v="true" />
-          <readonly v="false" />
-        </linkInformation>
-      </linkInformation>
-      <recordFieldMappings>
-        <dbRecordFieldMapping>
-          <name>CODE.value</name>
-          <recordfield>TASK.CODE</recordfield>
-        </dbRecordFieldMapping>
-        <dbRecordFieldMapping>
-          <name>DESCRIPTION.value</name>
-          <recordfield>TASK.DESCRIPTION</recordfield>
-        </dbRecordFieldMapping>
-        <dbRecordFieldMapping>
-          <name>EDITOR_CONTACT_ID.value</name>
-          <recordfield>TASK.EDITOR_CONTACT_ID</recordfield>
-        </dbRecordFieldMapping>
-        <dbRecordFieldMapping>
-          <name>MATURITY_DATE.value</name>
-          <recordfield>TASK.MATURITY_DATE</recordfield>
-        </dbRecordFieldMapping>
-        <dbRecordFieldMapping>
-          <name>PRIORITY.value</name>
-          <recordfield>TASK.PRIORITY</recordfield>
-        </dbRecordFieldMapping>
-        <dbRecordFieldMapping>
-          <name>PROTECTIONLEVEL.value</name>
-          <recordfield>TASK.PROTECTIONLEVEL</recordfield>
-        </dbRecordFieldMapping>
-        <dbRecordFieldMapping>
-          <name>REQUESTOR_CONTACT_ID.value</name>
-          <recordfield>TASK.REQUESTOR_CONTACT_ID</recordfield>
-        </dbRecordFieldMapping>
-        <dbRecordFieldMapping>
-          <name>START_DATE.value</name>
-          <recordfield>TASK.START_DATE</recordfield>
-        </dbRecordFieldMapping>
-        <dbRecordFieldMapping>
-          <name>STATUS.value</name>
-          <recordfield>TASK.STATUS</recordfield>
-        </dbRecordFieldMapping>
-        <dbRecordFieldMapping>
-          <name>SUBJECT.value</name>
-          <recordfield>TASK.SUBJECT</recordfield>
-        </dbRecordFieldMapping>
-        <dbRecordFieldMapping>
-          <name>TASKID.value</name>
-          <recordfield>TASK.TASKID</recordfield>
-        </dbRecordFieldMapping>
-        <dbRecordFieldMapping>
-          <name>TYPE.value</name>
-          <recordfield>TASK.TYPE</recordfield>
-        </dbRecordFieldMapping>
-        <dbRecordFieldMapping>
-          <name>EDITOR_CONTACT_ID.displayValue</name>
-          <expression>%aditoprj%/entity/Task_entity/recordcontainers/db/recordfieldmappings/editor_contact_id.displayvalue/expression.js</expression>
-        </dbRecordFieldMapping>
-        <dbRecordFieldMapping>
-          <name>REQUESTOR_CONTACT_ID.displayValue</name>
-          <expression>%aditoprj%/entity/Task_entity/recordcontainers/db/recordfieldmappings/requestor_contact_id.displayvalue/expression.js</expression>
-        </dbRecordFieldMapping>
-        <dbRecordFieldMapping>
-          <name>TYPE.displayValue</name>
-          <expression>%aditoprj%/entity/Task_entity/recordcontainers/db/recordfieldmappings/type.displayvalue/expression.js</expression>
-        </dbRecordFieldMapping>
-        <dbRecordFieldMapping>
-          <name>PARENT_CONTEXT.value</name>
-          <recordfield>TASK.PARENT_CONTEXT</recordfield>
-        </dbRecordFieldMapping>
-        <dbRecordFieldMapping>
-          <name>PARENT_ID.value</name>
-          <recordfield>TASK.PARENT_ID</recordfield>
-        </dbRecordFieldMapping>
-        <dbRecordFieldMapping>
-          <name>PRIORITY.displayValue</name>
-          <expression>%aditoprj%/entity/Task_entity/recordcontainers/db/recordfieldmappings/priority.displayvalue/expression.js</expression>
-        </dbRecordFieldMapping>
-        <dbRecordFieldMapping>
-          <name>PROGRESS.value</name>
-          <recordfield>TASK.PROGRESS</recordfield>
-        </dbRecordFieldMapping>
-        <dbRecordFieldMapping>
-          <name>PROGRESS.displayValue</name>
-          <expression>%aditoprj%/entity/Task_entity/recordcontainers/db/recordfieldmappings/progress.displayvalue/expression.js</expression>
-        </dbRecordFieldMapping>
-        <dbRecordFieldMapping>
-          <name>SUBJECT_DETAILS.value</name>
-          <recordfield>TASK.SUBJECT</recordfield>
-        </dbRecordFieldMapping>
-        <dbRecordFieldMapping>
-          <name>STATUS.displayValue</name>
-          <expression>%aditoprj%/entity/Task_entity/recordcontainers/db/recordfieldmappings/status.displayvalue/expression.js</expression>
-        </dbRecordFieldMapping>
-      </recordFieldMappings>
-    </dbRecordContainer>
-  </recordContainers>
-</entity>
+<?xml version="1.0" encoding="UTF-8"?>
+<entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.6">
+  <name>Task_entity</name>
+  <majorModelMode>DISTRIBUTED</majorModelMode>
+  <documentation>%aditoprj%/entity/Task_entity/documentation.adoc</documentation>
+  <title>Task</title>
+  <contentTitleProcess>%aditoprj%/entity/Task_entity/contentTitleProcess.js</contentTitleProcess>
+  <afterUiInit>%aditoprj%/entity/Task_entity/afterUiInit.js</afterUiInit>
+  <onValidation>%aditoprj%/entity/Task_entity/onValidation.js</onValidation>
+  <iconId>VAADIN:TASKS</iconId>
+  <iconIdProcess>%aditoprj%/entity/Task_entity/iconIdProcess.js</iconIdProcess>
+  <titlePlural>Tasks</titlePlural>
+  <recordContainer>db</recordContainer>
+  <entityFields>
+    <entityProvider>
+      <name>#PROVIDER</name>
+      <recordContainer>db</recordContainer>
+    </entityProvider>
+    <entityField>
+      <name>CODE</name>
+      <title>task number</title>
+      <contentType>NUMBER</contentType>
+      <outputFormat>0000000</outputFormat>
+      <inputFormat>0000000</inputFormat>
+      <searchable v="false" />
+      <state>DISABLED</state>
+      <stateProcess>%aditoprj%/entity/Task_entity/entityfields/code/stateProcess.js</stateProcess>
+    </entityField>
+    <entityField>
+      <name>SUBJECT</name>
+      <title>subject</title>
+      <mandatory v="true" />
+    </entityField>
+    <entityField>
+      <name>STATUS</name>
+      <title>{$TASK_STATUS}</title>
+      <colorProcess>%aditoprj%/entity/Task_entity/entityfields/status/colorProcess.js</colorProcess>
+      <consumer>KeywordStates</consumer>
+      <groupable v="true" />
+      <mandatory v="true" />
+      <valueProcess>%aditoprj%/entity/Task_entity/entityfields/status/valueProcess.js</valueProcess>
+      <displayValueProcess>%aditoprj%/entity/Task_entity/entityfields/status/displayValueProcess.js</displayValueProcess>
+    </entityField>
+    <entityField>
+      <name>PRIORITY</name>
+      <title>Priority</title>
+      <consumer>KeywordPriorities</consumer>
+      <groupable v="true" />
+      <mandatory v="true" />
+      <valueProcess>%aditoprj%/entity/Task_entity/entityfields/priority/valueProcess.js</valueProcess>
+      <displayValueProcess>%aditoprj%/entity/Task_entity/entityfields/priority/displayValueProcess.js</displayValueProcess>
+    </entityField>
+    <entityField>
+      <name>REQUESTOR_CONTACT_ID</name>
+      <title>{$TASK_REQUESTOR}</title>
+      <consumer>ContactRequestors</consumer>
+      <linkedContext>Person</linkedContext>
+      <mandatory v="true" />
+      <valueProcess>%aditoprj%/entity/Task_entity/entityfields/requestor_contact_id/valueProcess.js</valueProcess>
+      <displayValueProcess>%aditoprj%/entity/Task_entity/entityfields/requestor_contact_id/displayValueProcess.js</displayValueProcess>
+    </entityField>
+    <entityField>
+      <name>EDITOR_CONTACT_ID</name>
+      <title>{$TASK_EDITOR}</title>
+      <consumer>ContactEditors</consumer>
+      <linkedContext>Person</linkedContext>
+      <displayValueProcess>%aditoprj%/entity/Task_entity/entityfields/editor_contact_id/displayValueProcess.js</displayValueProcess>
+    </entityField>
+    <entityField>
+      <name>START_DATE</name>
+      <title>Begin</title>
+      <contentType>DATE</contentType>
+      <resolution>MINUTE</resolution>
+      <outputFormat>dd.MM.yyyy HH:mm</outputFormat>
+      <inputFormat>dd.MM.yyyy HH:mm</inputFormat>
+      <groupable v="true" />
+      <valueProcess>%aditoprj%/entity/Task_entity/entityfields/start_date/valueProcess.js</valueProcess>
+    </entityField>
+    <entityField>
+      <name>MATURITY_DATE</name>
+      <title>Maturity</title>
+      <contentType>DATE</contentType>
+      <resolution>MINUTE</resolution>
+      <outputFormat>dd.MM.yyyy HH:mm</outputFormat>
+      <inputFormat>dd.MM.yyyy HH:mm</inputFormat>
+      <valueProcess>%aditoprj%/entity/Task_entity/entityfields/maturity_date/valueProcess.js</valueProcess>
+    </entityField>
+    <entityField>
+      <name>TYPE</name>
+      <title>type</title>
+      <consumer>KeywordTypes</consumer>
+      <groupable v="true" />
+      <searchable v="true" />
+      <state>READONLY</state>
+      <valueProcess>%aditoprj%/entity/Task_entity/entityfields/type/valueProcess.js</valueProcess>
+      <displayValueProcess>%aditoprj%/entity/Task_entity/entityfields/type/displayValueProcess.js</displayValueProcess>
+    </entityField>
+    <entityField>
+      <name>DESCRIPTION</name>
+      <title>description</title>
+      <contentType>LONG_TEXT</contentType>
+    </entityField>
+    <entityField>
+      <name>PROTECTIONLEVEL</name>
+      <title>Protected</title>
+      <contentType>BOOLEAN</contentType>
+      <contentTypeProcess>%aditoprj%/entity/Task_entity/entityfields/protectionlevel/contentTypeProcess.js</contentTypeProcess>
+      <dropDownProcess>%aditoprj%/entity/Task_entity/entityfields/protectionlevel/dropDownProcess.js</dropDownProcess>
+      <valueProcess>%aditoprj%/entity/Task_entity/entityfields/protectionlevel/valueProcess.js</valueProcess>
+    </entityField>
+    <entityField>
+      <name>TASKID</name>
+      <mandatory v="true" />
+      <searchable v="false" />
+      <valueProcess>%aditoprj%/entity/Task_entity/entityfields/taskid/valueProcess.js</valueProcess>
+    </entityField>
+    <entityConsumer>
+      <name>ContactEditors</name>
+      <dependency>
+        <name>dependency</name>
+        <entityName>Employee_entity</entityName>
+        <fieldName>Employees</fieldName>
+      </dependency>
+      <children>
+        <entityParameter>
+          <name>OnlyActives_param</name>
+          <valueProcess>%aditoprj%/entity/Task_entity/entityfields/contacteditors/children/onlyactives_param/valueProcess.js</valueProcess>
+        </entityParameter>
+      </children>
+    </entityConsumer>
+    <entityConsumer>
+      <name>ContactRequestors</name>
+      <dependency>
+        <name>dependency</name>
+        <entityName>Employee_entity</entityName>
+        <fieldName>Employees</fieldName>
+      </dependency>
+    </entityConsumer>
+    <entityConsumer>
+      <name>MainDocuments</name>
+      <stateProcess>%aditoprj%/entity/Task_entity/entityfields/maindocuments/stateProcess.js</stateProcess>
+      <dependency>
+        <name>dependency</name>
+        <entityName>Document_entity</entityName>
+        <fieldName>#PROVIDER</fieldName>
+      </dependency>
+      <children>
+        <entityParameter>
+          <name>AssignmentRowId_param</name>
+          <valueProcess>%aditoprj%/entity/Task_entity/entityfields/maindocuments/children/assignmentrowid_param/valueProcess.js</valueProcess>
+        </entityParameter>
+        <entityParameter>
+          <name>AssignmentTable_param</name>
+          <valueProcess>%aditoprj%/entity/Task_entity/entityfields/maindocuments/children/assignmenttable_param/valueProcess.js</valueProcess>
+        </entityParameter>
+      </children>
+    </entityConsumer>
+    <entityConsumer>
+      <name>KeywordStates</name>
+      <dependency>
+        <name>dependency</name>
+        <entityName>KeywordEntry_entity</entityName>
+        <fieldName>SpecificContainerKeywords</fieldName>
+      </dependency>
+      <children>
+        <entityParameter>
+          <name>ContainerName_param</name>
+          <valueProcess>%aditoprj%/entity/Task_entity/entityfields/keywordstates/children/containername_param/valueProcess.js</valueProcess>
+          <expose v="false" />
+        </entityParameter>
+        <entityParameter>
+          <name>WhitelistIds_param</name>
+          <valueProcess>%aditoprj%/entity/Task_entity/entityfields/keywordstates/children/whitelistids_param/valueProcess.js</valueProcess>
+        </entityParameter>
+      </children>
+    </entityConsumer>
+    <entityConsumer>
+      <name>KeywordTypes</name>
+      <dependency>
+        <name>dependency</name>
+        <entityName>KeywordEntry_entity</entityName>
+        <fieldName>SpecificContainerKeywords</fieldName>
+      </dependency>
+      <children>
+        <entityParameter>
+          <name>ContainerName_param</name>
+          <valueProcess>%aditoprj%/entity/Task_entity/entityfields/keywordtypes/children/containername_param/valueProcess.js</valueProcess>
+          <expose v="false" />
+        </entityParameter>
+      </children>
+    </entityConsumer>
+    <entityConsumer>
+      <name>ModuleTrees</name>
+      <dependency>
+        <name>dependency</name>
+        <entityName>ModuleTree_entity</entityName>
+        <fieldName>TreeProviders</fieldName>
+      </dependency>
+      <children>
+        <entityParameter>
+          <name>ID_param</name>
+          <valueProcess>%aditoprj%/entity/Task_entity/entityfields/moduletrees/children/id_param/valueProcess.js</valueProcess>
+          <expose v="false" />
+          <mandatory v="false" />
+        </entityParameter>
+        <entityParameter>
+          <name>ContextName_param</name>
+          <valueProcess>%aditoprj%/entity/Task_entity/entityfields/moduletrees/children/contextname_param/valueProcess.js</valueProcess>
+          <expose v="false" />
+          <mandatory v="false" />
+        </entityParameter>
+      </children>
+    </entityConsumer>
+    <entityField>
+      <name>PARENT_CONTEXT</name>
+      <searchable v="false" />
+      <valueProcess>%aditoprj%/entity/Task_entity/entityfields/parent_context/valueProcess.js</valueProcess>
+    </entityField>
+    <entityField>
+      <name>PARENT_ID</name>
+      <searchable v="false" />
+      <valueProcess>%aditoprj%/entity/Task_entity/entityfields/parent_id/valueProcess.js</valueProcess>
+    </entityField>
+    <entityParameter>
+      <name>ParentId_param</name>
+      <expose v="true" />
+      <description>PARAMETER</description>
+    </entityParameter>
+    <entityParameter>
+      <name>ParentContext_param</name>
+      <expose v="true" />
+      <description>PARAMETER</description>
+    </entityParameter>
+    <entityActionField>
+      <name>newActivity</name>
+      <title>New activity</title>
+      <onActionProcess>%aditoprj%/entity/Task_entity/entityfields/newactivity/onActionProcess.js</onActionProcess>
+      <iconId>VAADIN:HOURGLASS_END</iconId>
+      <tooltip>New activity</tooltip>
+      <tooltipProcess>%aditoprj%/entity/Task_entity/entityfields/newactivity/tooltipProcess.js</tooltipProcess>
+    </entityActionField>
+    <entityActionField>
+      <name>newTask</name>
+      <title>New task</title>
+      <onActionProcess>%aditoprj%/entity/Task_entity/entityfields/newtask/onActionProcess.js</onActionProcess>
+      <actionOrder v="1" />
+      <iconId>VAADIN:TASKS</iconId>
+    </entityActionField>
+    <entityParameter>
+      <name>RowId_param</name>
+      <expose v="true" />
+      <description>PARAMETER</description>
+    </entityParameter>
+    <entityParameter>
+      <name>ObjectId_param</name>
+      <expose v="true" />
+      <description>PARAMETER</description>
+    </entityParameter>
+    <entityConsumer>
+      <name>KeywordPriorities</name>
+      <dependency>
+        <name>dependency</name>
+        <entityName>KeywordEntry_entity</entityName>
+        <fieldName>SpecificContainerKeywords</fieldName>
+      </dependency>
+      <children>
+        <entityParameter>
+          <name>ContainerName_param</name>
+          <valueProcess>%aditoprj%/entity/Task_entity/entityfields/keywordpriorities/children/containername_param/valueProcess.js</valueProcess>
+          <expose v="false" />
+        </entityParameter>
+      </children>
+    </entityConsumer>
+    <entityActionField>
+      <name>newOffer</name>
+      <title>New offer</title>
+      <onActionProcess>%aditoprj%/entity/Task_entity/entityfields/newoffer/onActionProcess.js</onActionProcess>
+      <actionOrder v="0" />
+      <iconId>VAADIN:CART</iconId>
+    </entityActionField>
+    <entityField>
+      <name>PROGRESS</name>
+      <title>Progress</title>
+      <consumer>KeywordProgress</consumer>
+      <mandatory v="true" />
+      <valueProcess>%aditoprj%/entity/Task_entity/entityfields/progress/valueProcess.js</valueProcess>
+      <displayValueProcess>%aditoprj%/entity/Task_entity/entityfields/progress/displayValueProcess.js</displayValueProcess>
+    </entityField>
+    <entityConsumer>
+      <name>KeywordProgress</name>
+      <dependency>
+        <name>dependency</name>
+        <entityName>KeywordEntry_entity</entityName>
+        <fieldName>SpecificContainerKeywords</fieldName>
+      </dependency>
+      <children>
+        <entityParameter>
+          <name>ContainerName_param</name>
+          <valueProcess>%aditoprj%/entity/Task_entity/entityfields/keywordprogress/children/containername_param/valueProcess.js</valueProcess>
+        </entityParameter>
+      </children>
+    </entityConsumer>
+    <entityConsumer>
+      <name>Links</name>
+      <dependency>
+        <name>dependency</name>
+        <entityName>TaskLink_entity</entityName>
+        <fieldName>Link</fieldName>
+      </dependency>
+      <children>
+        <entityParameter>
+          <name>TaskId_param</name>
+          <valueProcess>%aditoprj%/entity/Task_entity/entityfields/links/children/taskid_param/valueProcess.js</valueProcess>
+        </entityParameter>
+      </children>
+    </entityConsumer>
+    <entityProvider>
+      <name>Tasks</name>
+      <dependencies>
+        <entityDependency>
+          <name>dd79df43-264c-494b-9c92-cadf19e61db6</name>
+          <entityName>Organisation_entity</entityName>
+          <fieldName>Tasks</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>dc29832e-15da-4f64-b17a-f1dd978ef47b</name>
+          <entityName>Person_entity</entityName>
+          <fieldName>Tasks</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>c6507834-cd91-4202-bdf7-6566f968edb4</name>
+          <entityName>Salesproject_entity</entityName>
+          <fieldName>Tasks</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>26b9b221-de02-40ef-a400-d4b5e356da0b</name>
+          <entityName>Offer_entity</entityName>
+          <fieldName>Tasks</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>b2bb448a-b647-40c8-baec-16356f3e23f5</name>
+          <entityName>Order_entity</entityName>
+          <fieldName>Tasks</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>a93f1e7e-f929-438f-8f37-21e4af8b53b6</name>
+          <entityName>Product_entity</entityName>
+          <fieldName>Tasks</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>2b0c15eb-fa9a-4ee8-a8b1-5d0f344ddad6</name>
+          <entityName>Contract_entity</entityName>
+          <fieldName>Tasks</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>335e31ad-ab67-4567-b4ea-3668f04922b2</name>
+          <entityName>Campaign_entity</entityName>
+          <fieldName>Tasks</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>fbaa2f6c-0ba1-4c93-acae-d7b636581679</name>
+          <entityName>CampaignStep_entity</entityName>
+          <fieldName>Tasks</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+      </dependencies>
+      <children>
+        <entityParameter>
+          <name>RowId_param</name>
+          <expose v="true" />
+        </entityParameter>
+        <entityParameter>
+          <name>PresetLinks_param</name>
+          <expose v="true" />
+        </entityParameter>
+        <entityParameter>
+          <name>ParentId_param</name>
+          <expose v="false" />
+        </entityParameter>
+        <entityParameter>
+          <name>ParentContext_param</name>
+          <expose v="false" />
+        </entityParameter>
+        <entityParameter>
+          <name>ObjectId_param</name>
+          <expose v="true" />
+        </entityParameter>
+      </children>
+    </entityProvider>
+    <entityParameter>
+      <name>PresetLinks_param</name>
+      <expose v="true" />
+      <documentation>%aditoprj%/entity/Task_entity/entityfields/presetlinks_param/documentation.adoc</documentation>
+      <description>PARAMETER</description>
+    </entityParameter>
+    <entityField>
+      <name>SUBJECT_DETAILS</name>
+      <title>subject</title>
+      <linkedContext>Task</linkedContext>
+    </entityField>
+    <entityParameter>
+      <name>FilterOnlyOwnTask_param</name>
+      <valueProcess>%aditoprj%/entity/Task_entity/entityfields/filteronlyowntask_param/valueProcess.js</valueProcess>
+      <expose v="true" />
+      <description>PARAMETER</description>
+    </entityParameter>
+    <entityField>
+      <name>PRIORITY_ICON</name>
+      <colorProcess>%aditoprj%/entity/Task_entity/entityfields/priority_icon/colorProcess.js</colorProcess>
+      <contentType>IMAGE</contentType>
+      <valueProcess>%aditoprj%/entity/Task_entity/entityfields/priority_icon/valueProcess.js</valueProcess>
+    </entityField>
+    <entityConsumer>
+      <name>LogHistories</name>
+      <dependency>
+        <name>dependency</name>
+        <entityName>LogHistory_entity</entityName>
+        <fieldName>LogHistoryProvider</fieldName>
+      </dependency>
+      <children>
+        <entityParameter>
+          <name>tablenames_param</name>
+          <valueProcess>%aditoprj%/entity/Task_entity/entityfields/loghistories/children/tablenames_param/valueProcess.js</valueProcess>
+        </entityParameter>
+      </children>
+    </entityConsumer>
+    <entityConsumer>
+      <name>Documents</name>
+      <dependency>
+        <name>dependency</name>
+        <entityName>Document_entity</entityName>
+        <fieldName>Documents</fieldName>
+      </dependency>
+      <children>
+        <entityParameter>
+          <name>AssignmentRowId_param</name>
+          <valueProcess>%aditoprj%/entity/Task_entity/entityfields/documents/children/assignmentrowid_param/valueProcess.js</valueProcess>
+        </entityParameter>
+        <entityParameter>
+          <name>AssignmentTable_param</name>
+          <valueProcess>%aditoprj%/entity/Task_entity/entityfields/documents/children/assignmenttable_param/valueProcess.js</valueProcess>
+        </entityParameter>
+      </children>
+    </entityConsumer>
+    <entityConsumer>
+      <name>Attributes</name>
+      <stateProcess>%aditoprj%/entity/Task_entity/entityfields/attributes/stateProcess.js</stateProcess>
+      <onValidation>%aditoprj%/entity/Task_entity/entityfields/attributes/onValidation.js</onValidation>
+      <dependency>
+        <name>dependency</name>
+        <entityName>AttributeRelation_entity</entityName>
+        <fieldName>AttributeRelations</fieldName>
+      </dependency>
+      <children>
+        <entityParameter>
+          <name>ObjectRowId_param</name>
+          <valueProcess>%aditoprj%/entity/Task_entity/entityfields/attributes/children/objectrowid_param/valueProcess.js</valueProcess>
+        </entityParameter>
+        <entityParameter>
+          <name>ObjectType_param</name>
+          <valueProcess>%aditoprj%/entity/Task_entity/entityfields/attributes/children/objecttype_param/valueProcess.js</valueProcess>
+        </entityParameter>
+        <entityParameter>
+          <name>ShowEmpty_param</name>
+          <valueProcess>%aditoprj%/entity/Task_entity/entityfields/attributes/children/showempty_param/valueProcess.js</valueProcess>
+        </entityParameter>
+        <entityParameter>
+          <name>FilteredAttributeIds_param</name>
+          <valueProcess>%aditoprj%/entity/Task_entity/entityfields/attributes/children/filteredattributeids_param/valueProcess.js</valueProcess>
+        </entityParameter>
+        <entityParameter>
+          <name>DisplaySimpleName_param</name>
+          <valueProcess>%aditoprj%/entity/Task_entity/entityfields/attributes/children/displaysimplename_param/valueProcess.js</valueProcess>
+        </entityParameter>
+      </children>
+    </entityConsumer>
+    <entityParameter>
+      <name>Type_param</name>
+      <valueProcess>%aditoprj%/entity/Task_entity/entityfields/type_param/valueProcess.js</valueProcess>
+      <expose v="true" />
+    </entityParameter>
+    <entityActionGroup>
+      <name>tableActions</name>
+      <children>
+        <entityActionField>
+          <name>newBugTicket</name>
+          <title>New Bugticket</title>
+          <onActionProcess>%aditoprj%/entity/Task_entity/entityfields/tableactions/children/newbugticket/onActionProcess.js</onActionProcess>
+          <iconId>VAADIN:PUZZLE_PIECE</iconId>
+          <tooltip>New Bugticket</tooltip>
+        </entityActionField>
+        <entityActionField>
+          <name>newSupportTicket</name>
+          <title>New Supportticket</title>
+          <onActionProcess>%aditoprj%/entity/Task_entity/entityfields/tableactions/children/newsupportticket/onActionProcess.js</onActionProcess>
+          <iconId>VAADIN:QUESTION</iconId>
+          <tooltip>New Supportticket</tooltip>
+        </entityActionField>
+      </children>
+    </entityActionGroup>
+  </entityFields>
+  <recordContainers>
+    <dbRecordContainer>
+      <name>db</name>
+      <alias>Data_alias</alias>
+      <conditionProcess>%aditoprj%/entity/Task_entity/recordcontainers/db/conditionProcess.js</conditionProcess>
+      <orderClauseProcess>%aditoprj%/entity/Task_entity/recordcontainers/db/orderClauseProcess.js</orderClauseProcess>
+      <onDBInsert>%aditoprj%/entity/Task_entity/recordcontainers/db/onDBInsert.js</onDBInsert>
+      <onDBDelete>%aditoprj%/entity/Task_entity/recordcontainers/db/onDBDelete.js</onDBDelete>
+      <linkInformation>
+        <linkInformation>
+          <name>47e1b4a5-6901-48b0-85ba-bec39b86a2d7</name>
+          <tableName>TASK</tableName>
+          <primaryKey>TASKID</primaryKey>
+          <isUIDTable v="true" />
+          <readonly v="false" />
+        </linkInformation>
+      </linkInformation>
+      <recordFieldMappings>
+        <dbRecordFieldMapping>
+          <name>CODE.value</name>
+          <recordfield>TASK.CODE</recordfield>
+        </dbRecordFieldMapping>
+        <dbRecordFieldMapping>
+          <name>DESCRIPTION.value</name>
+          <recordfield>TASK.DESCRIPTION</recordfield>
+        </dbRecordFieldMapping>
+        <dbRecordFieldMapping>
+          <name>EDITOR_CONTACT_ID.value</name>
+          <recordfield>TASK.EDITOR_CONTACT_ID</recordfield>
+        </dbRecordFieldMapping>
+        <dbRecordFieldMapping>
+          <name>MATURITY_DATE.value</name>
+          <recordfield>TASK.MATURITY_DATE</recordfield>
+        </dbRecordFieldMapping>
+        <dbRecordFieldMapping>
+          <name>PRIORITY.value</name>
+          <recordfield>TASK.PRIORITY</recordfield>
+        </dbRecordFieldMapping>
+        <dbRecordFieldMapping>
+          <name>PROTECTIONLEVEL.value</name>
+          <recordfield>TASK.PROTECTIONLEVEL</recordfield>
+        </dbRecordFieldMapping>
+        <dbRecordFieldMapping>
+          <name>REQUESTOR_CONTACT_ID.value</name>
+          <recordfield>TASK.REQUESTOR_CONTACT_ID</recordfield>
+        </dbRecordFieldMapping>
+        <dbRecordFieldMapping>
+          <name>START_DATE.value</name>
+          <recordfield>TASK.START_DATE</recordfield>
+        </dbRecordFieldMapping>
+        <dbRecordFieldMapping>
+          <name>STATUS.value</name>
+          <recordfield>TASK.STATUS</recordfield>
+        </dbRecordFieldMapping>
+        <dbRecordFieldMapping>
+          <name>SUBJECT.value</name>
+          <recordfield>TASK.SUBJECT</recordfield>
+        </dbRecordFieldMapping>
+        <dbRecordFieldMapping>
+          <name>TASKID.value</name>
+          <recordfield>TASK.TASKID</recordfield>
+        </dbRecordFieldMapping>
+        <dbRecordFieldMapping>
+          <name>TYPE.value</name>
+          <recordfield>TASK.TYPE</recordfield>
+        </dbRecordFieldMapping>
+        <dbRecordFieldMapping>
+          <name>EDITOR_CONTACT_ID.displayValue</name>
+          <expression>%aditoprj%/entity/Task_entity/recordcontainers/db/recordfieldmappings/editor_contact_id.displayvalue/expression.js</expression>
+        </dbRecordFieldMapping>
+        <dbRecordFieldMapping>
+          <name>REQUESTOR_CONTACT_ID.displayValue</name>
+          <expression>%aditoprj%/entity/Task_entity/recordcontainers/db/recordfieldmappings/requestor_contact_id.displayvalue/expression.js</expression>
+        </dbRecordFieldMapping>
+        <dbRecordFieldMapping>
+          <name>TYPE.displayValue</name>
+          <expression>%aditoprj%/entity/Task_entity/recordcontainers/db/recordfieldmappings/type.displayvalue/expression.js</expression>
+        </dbRecordFieldMapping>
+        <dbRecordFieldMapping>
+          <name>PARENT_CONTEXT.value</name>
+          <recordfield>TASK.PARENT_CONTEXT</recordfield>
+        </dbRecordFieldMapping>
+        <dbRecordFieldMapping>
+          <name>PARENT_ID.value</name>
+          <recordfield>TASK.PARENT_ID</recordfield>
+        </dbRecordFieldMapping>
+        <dbRecordFieldMapping>
+          <name>PRIORITY.displayValue</name>
+          <expression>%aditoprj%/entity/Task_entity/recordcontainers/db/recordfieldmappings/priority.displayvalue/expression.js</expression>
+        </dbRecordFieldMapping>
+        <dbRecordFieldMapping>
+          <name>PROGRESS.value</name>
+          <recordfield>TASK.PROGRESS</recordfield>
+        </dbRecordFieldMapping>
+        <dbRecordFieldMapping>
+          <name>PROGRESS.displayValue</name>
+          <expression>%aditoprj%/entity/Task_entity/recordcontainers/db/recordfieldmappings/progress.displayvalue/expression.js</expression>
+        </dbRecordFieldMapping>
+        <dbRecordFieldMapping>
+          <name>SUBJECT_DETAILS.value</name>
+          <recordfield>TASK.SUBJECT</recordfield>
+        </dbRecordFieldMapping>
+        <dbRecordFieldMapping>
+          <name>STATUS.displayValue</name>
+          <expression>%aditoprj%/entity/Task_entity/recordcontainers/db/recordfieldmappings/status.displayvalue/expression.js</expression>
+        </dbRecordFieldMapping>
+      </recordFieldMappings>
+    </dbRecordContainer>
+  </recordContainers>
+</entity>
diff --git a/entity/Task_entity/entityfields/keywordstates/children/containername_param/valueProcess.js b/entity/Task_entity/entityfields/keywordstates/children/containername_param/valueProcess.js
index d2a77dbd12..11ba0b2c2f 100644
--- a/entity/Task_entity/entityfields/keywordstates/children/containername_param/valueProcess.js
+++ b/entity/Task_entity/entityfields/keywordstates/children/containername_param/valueProcess.js
@@ -1,5 +1,5 @@
+import("KeywordRegistry_basic");
 import("system.vars");
-import("ActivityTask_lib");
 import("system.result");
 
-result.string(TaskUtils.getTypeStatusKeyword(vars.get("$field.TYPE")));
\ No newline at end of file
+result.string($KeywordRegistry.taskStatus());
\ No newline at end of file
diff --git a/entity/Task_entity/entityfields/keywordstates/children/whitelistids_param/valueProcess.js b/entity/Task_entity/entityfields/keywordstates/children/whitelistids_param/valueProcess.js
new file mode 100644
index 0000000000..e9a933ca7e
--- /dev/null
+++ b/entity/Task_entity/entityfields/keywordstates/children/whitelistids_param/valueProcess.js
@@ -0,0 +1,5 @@
+import("system.vars");
+import("system.result");
+import("ActivityTask_lib");
+
+result.object(TaskUtils.getAvailableStatus(vars.get("$field.TYPE")));
\ No newline at end of file
diff --git a/entity/Task_entity/entityfields/priority_icon/valueProcess.js b/entity/Task_entity/entityfields/priority_icon/valueProcess.js
index 74ff67f1f2..5dc868f879 100644
--- a/entity/Task_entity/entityfields/priority_icon/valueProcess.js
+++ b/entity/Task_entity/entityfields/priority_icon/valueProcess.js
@@ -3,4 +3,4 @@ import("ActivityTask_lib");
 import("KeywordRegistry_basic");
 import("system.result");
 
-result.string(TaskUtils.getStatusIcon(vars.getString("$field.TYPE"), vars.getString("$field.STATUS")));
\ No newline at end of file
+result.string(TaskUtils.getStatusIcon(vars.getString("$field.STATUS")));
\ No newline at end of file
diff --git a/entity/Task_entity/entityfields/status/displayValueProcess.js b/entity/Task_entity/entityfields/status/displayValueProcess.js
index 38abbb7de7..70a16871e4 100644
--- a/entity/Task_entity/entityfields/status/displayValueProcess.js
+++ b/entity/Task_entity/entityfields/status/displayValueProcess.js
@@ -1,6 +1,6 @@
-import("ActivityTask_lib");
+import("KeywordRegistry_basic");
 import("system.vars");
 import("system.result");
 import("Keyword_lib");
 
-result.string(KeywordUtils.getViewValue(TaskUtils.getTypeStatusKeyword(vars.get("$field.TYPE")), vars.get("$field.STATUS")));
\ No newline at end of file
+result.string(KeywordUtils.getViewValue($KeywordRegistry.taskStatus(), vars.get("$field.STATUS")));
\ No newline at end of file
diff --git a/entity/Task_entity/entityfields/status/valueProcess.js b/entity/Task_entity/entityfields/status/valueProcess.js
index 15024ad9a4..7381489b62 100644
--- a/entity/Task_entity/entityfields/status/valueProcess.js
+++ b/entity/Task_entity/entityfields/status/valueProcess.js
@@ -6,15 +6,8 @@ import("system.vars");
 import("KeywordRegistry_basic");
 import("Keyword_lib");
 
-if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
+if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && !vars.get("$this.value"))
 {
-    var states = KeywordUtils.getEntryNamesAndIdsByContainer(TaskUtils.getTypeStatusKeyword(vars.get("$field.TYPE")))
-    if (states.length > 0)
-    {
-        result.string(states[0][0]);
-    }
-    else
-    {
-        result.string("");
-    }
+    var defaultState = TaskUtils.getDefaultStatus(vars.get("$field.TYPE"));
+    result.string(defaultState);
 }
\ No newline at end of file
diff --git a/process/ActivityTask_lib/process.js b/process/ActivityTask_lib/process.js
index d502802ce3..174dfc5ff2 100644
--- a/process/ActivityTask_lib/process.js
+++ b/process/ActivityTask_lib/process.js
@@ -129,9 +129,14 @@ TaskUtils.getTypeAttributes = function(pType)
     return JSON.parse(KeywordUtils.getAttributeRelation(pType, $KeywordRegistry.taskType(), "attributes", "[]"));
 }
 
-TaskUtils.getTypeStatusKeyword = function(pType)
+TaskUtils.getAvailableStatus = function(pType)
 {
-    return KeywordUtils.getAttributeRelation(pType, $KeywordRegistry.taskType(), "status", $KeywordRegistry.taskStatus());
+    return JSON.parse(KeywordUtils.getAttributeRelation(pType, $KeywordRegistry.taskType(), "availableStatus", ""));
+}
+
+TaskUtils.getDefaultStatus = function(pType)
+{
+    return KeywordUtils.getAttributeRelation(pType, $KeywordRegistry.taskType(), "defaultStatus", "");
 }
 
 TaskUtils.getShowCode = function(pType)
@@ -139,10 +144,9 @@ TaskUtils.getShowCode = function(pType)
     return KeywordUtils.getAttributeRelation(pType, $KeywordRegistry.taskType(), "showCode", true);
 }
 
-TaskUtils.getStatusIcon = function(pType, pStatus)
+TaskUtils.getStatusIcon = function(pStatus)
 {
-    var status = TaskUtils.getTypeStatusKeyword(pType)
-    return KeywordUtils.getAttributeRelation(pStatus, status, "icon", "NEON:STATUS_NOT_STARTED");
+    return KeywordUtils.getAttributeRelation(pStatus, $KeywordRegistry.taskStatus(), "icon", "NEON:STATUS_NOT_STARTED");
 }
 
 /**
diff --git a/process/Sql_lib/process.js b/process/Sql_lib/process.js
index 0818e81815..29b27316f3 100644
--- a/process/Sql_lib/process.js
+++ b/process/Sql_lib/process.js
@@ -115,8 +115,13 @@ SqlCondition.prototype.or = function(cond) {
  * @return {SqlCondition} current SqlCondition-object
  */
 SqlCondition.prototype.andAttachPrepared = function(preparedObj) {
-    this.preparedValues = this.preparedValues.concat(preparedObj[1]);
-    return this.and(preparedObj[0]);
+    if (preparedObj)
+    {
+        this.preparedValues = this.preparedValues.concat(preparedObj[1]);
+        return this.and(preparedObj[0]);
+    }
+    
+    return this;
 }
 
 /**
@@ -125,8 +130,13 @@ SqlCondition.prototype.andAttachPrepared = function(preparedObj) {
  * @return {SqlCondition} current SqlCondition-object
  */
 SqlCondition.prototype.orAttachPrepared = function(preparedObj) {
-    this.preparedValues.push(preparedObj[1]);
-    return this.or(preparedObj[0]);
+    if (preparedObj)
+    {
+        this.preparedValues = this.preparedValues.concat(preparedObj[1]);
+        return this.or(preparedObj[0]);
+    }
+    
+    return this;
 }
 
 /**
@@ -289,6 +299,74 @@ SqlCondition.prototype.orPrepareVars = function(field, variable, cond, fieldType
     return this;
 }
 
+/**
+ * creates a IN-statement out of a field and an array of values.
+ * Be carefull with a big number of values. This may have a bad performance.
+ * 
+ * @param {String | String[]} field the database field as "tablename.columnname"; e.g. "ORGANISATION.NAME" or as array with column-alias: ["ORGANISATION", "NAME", "myorgAlias"]
+ * @param {String[]} values the value that shall be set into the prepared statement
+ * @param {Numeric | Boolean} [fieldType] SQL-column-type; if the fieldType is not given it's loaded automatically;
+ *                              The loaded type is cached if no type is given. So it is also safe to use this in a loop.
+ *                              e.g.
+ *                              for (...) {
+ *                                  cond.andPrepare("SALESPROJECT_CLASSIFICATION.TYPE", entry, "# <> ?")
+ *                              }
+ * @param {Boolean} [not = undefined] if true, add not before in
+ * @return {SqlCondition} current SqlCondition-object
+ */
+SqlCondition.prototype.andIn = function(field, values, fieldType, not) {
+    return this.andAttachPrepared(this._in(field, values, fieldType, not));
+}
+
+/**
+ * creates a IN-statement out of a field and an array of values.
+ * Be carefull with a big number of values. This may have a bad performance.
+ * 
+ * @param {String | String[]} field the database field as "tablename.columnname"; e.g. "ORGANISATION.NAME" or as array with column-alias: ["ORGANISATION", "NAME", "myorgAlias"]
+ * @param {String[]} values the value that shall be set into the prepared statement
+ * @param {Numeric | Boolean} [fieldType] SQL-column-type; if the fieldType is not given it's loaded automatically;
+ *                              The loaded type is cached if no type is given. So it is also safe to use this in a loop.
+ *                              e.g.
+ *                              for (...) {
+ *                                  cond.andPrepare("SALESPROJECT_CLASSIFICATION.TYPE", entry, "# <> ?")
+ *                              }
+ * @param {Boolean} [not = undefined] if true, add not before in
+ * @return {SqlCondition} current SqlCondition-object
+ */
+SqlCondition.prototype.orIn = function(field, values, fieldType, not) {
+    return this.orAttachPrepared(this._in(field, values, fieldType, not));
+}
+
+/**
+ * creates a IN-statement out of a field and an array of values.
+ * Be carefull with a big number of values. This may have a bad performance.
+ * 
+ * @param {String | String[]} field the database field as "tablename.columnname"; e.g. "ORGANISATION.NAME" or as array with column-alias: ["ORGANISATION", "NAME", "myorgAlias"]
+ * @param {String[]} values the value that shall be set into the prepared statement
+ * @param {Numeric | Boolean} [fieldType] SQL-column-type; if the fieldType is not given it's loaded automatically;
+ *                              The loaded type is cached if no type is given. So it is also safe to use this in a loop.
+ *                              e.g.
+ *                              for (...) {
+ *                                  cond.andPrepare("SALESPROJECT_CLASSIFICATION.TYPE", entry, "# <> ?")
+ *                              }
+ * @param {Boolean} [not = undefined] if true, add not before in
+ * @return {SqlCondition} current SqlCondition-object
+ */
+SqlCondition.prototype._in = function(field, values, fieldType, not) {
+    if (values.length > 0)
+    {
+        if (fieldType == undefined)
+            fieldType = SqlUtils.getSingleColumnType(field, undefined, this.alias);
+        
+        preparedStatement = SqlUtils.getSqlInStatement(field, values, undefined, true, fieldType);
+        if (not)
+            preparedStatement[0] = " not " + preparedStatement[0];
+        return preparedStatement;
+    }
+    
+    return null;
+}
+
 /**
  * ready to use string; does not contain a where keyword at the beginning
  * @param {String} [alternativeCond=""] condition that is returned when nothing has been appended.
@@ -1314,17 +1392,29 @@ SqlUtils.getSystemAlias = function()
      * @param {String} pFieldname req name of the field with table alias
      *                                z.B ORGREL.CONTACTID
      * @param {String[]|String[][]} pData req Data as ID Array
-     * @param {String} pQuoteSymbol opt symbol for quoting values,
+     * @param {String} [pQuoteSymbol=""] symbol for quoting values,
      *                                  Strings i.e.: ' default is no symbol
+     * @param {Boolean} [pAsPrepared=undefined] true if result should be returned as prepared condition     
+     * @param {Boolean} [pPreparedDbType=undefined] if pAsPrepared is true, this param has to be filld with the correct db type
      *
-     * @return {String} SQL condition: where VALS in (1,2,3)
+     * @return {String|Array} SQL condition: where VALS in (1,2,3) OR as prepared Statement if pAsPrepared is true ["VALS in (1,2,3)", [...]
      */
-SqlUtils.getSqlInStatement = function(pFieldname, pData, pQuoteSymbol) {
+SqlUtils.getSqlInStatement = function(pFieldname, pData, pQuoteSymbol, pAsPrepared, pPreparedDbType) {
     if (pData.length == 0)
         return " 1 = 2 ";
 
     var res = "";
     var qs = pQuoteSymbol || "";
+    
+    var preparedValues;
+    if (pAsPrepared)
+    {
+        preparedValues = [];
+        if (!pPreparedDbType)
+        {
+            throw new Error(translate.text("SqlUtils.getSqlInStatement: if pAsPrepared is true, pPreparedDbType has to be filld with the correct db type"));
+        }
+    }
 
     var MAX_COUNT = 1000;
     //pData.length -1 um für den Fall, dass MAX_COUNT == pData.length ist trotzdem nur einen Aufruf
@@ -1334,17 +1424,36 @@ SqlUtils.getSqlInStatement = function(pFieldname, pData, pQuoteSymbol) {
     for (var i = 0; i <= count; i++)
     {
         if (i > 0)
-            res += "or ";
-
-        res += pFieldname + " in (" + qs + pData.slice(i * MAX_COUNT, i * MAX_COUNT + MAX_COUNT)
-        .join(qs + ", " + qs) + qs + ") ";
+            res += " or ";
+        
+        if (pAsPrepared) 
+        {
+            res += pFieldname + " in (";
+            var subData = pData.slice(i * MAX_COUNT, i * MAX_COUNT + MAX_COUNT);
+            
+            subData.forEach(function(pVal, pIndex) {
+                res += "?";
+                preparedValues.push([pVal, pPreparedDbType])
+                if (pIndex != subData.length-1)
+                    res += ", ";
+            });
+            res += ")"
+        }
+        else
+        {
+            res += pFieldname + " in (" + qs + pData.slice(i * MAX_COUNT, i * MAX_COUNT + MAX_COUNT)
+                    .join(qs + ", " + qs) + qs + ") ";
+        }
     }
 
     //wenn mehrere Zeilen mit "or" verknüpft wurden nochmal klammern
     if (count > 0)
         res = "(" + res + ")";
 
-    return res;
+    if (pAsPrepared)
+        return [res, preparedValues];
+    else
+        return res;
 }
 
 /**
-- 
GitLab