From 4e53b79400b2d4cee9658f33113fa92af75aaba3 Mon Sep 17 00:00:00 2001
From: "d.buechler" <d.buechler@adito.de>
Date: Wed, 3 Apr 2019 14:53:31 +0200
Subject: [PATCH] =?UTF-8?q?Stati=20bei=20Neuanlage=20campaign=20und=20camp?=
 =?UTF-8?q?aignStep=20werden=20nun=20vorbelegt=20Anzeige=20des=20Kampagnen?=
 =?UTF-8?q?namens=20passend=20zur=20Vorbelegung=20des=20Feldes=20Kampagne?=
 =?UTF-8?q?=20beim=20hinzuf=C3=BCgen=20eines=20neuen=20Teilnehmers=20zur?=
 =?UTF-8?q?=20Kampagne=20"Fehler:=20Bei=20speichern=20eines=20neuen=20Kamp?=
 =?UTF-8?q?agnenschrittes->=20Es=20werden=20alle=20Teilnehmer=20aller=20Ka?=
 =?UTF-8?q?mpagnen=20angezeigt"=20wurde=20behoben=20Neue=20Pflichtfelder?=
 =?UTF-8?q?=20wurden=20konfiguriert=20"Fehler:Beim=20hinzuf=C3=BCgen=20ein?=
 =?UTF-8?q?es=20Teilnehmers=20zur=20Kampagne=20wird=20Kampagne=20nicht=20v?=
 =?UTF-8?q?orbelegt"=20wurde=20behoben=20Stati=20werden=20nun=20vorbelegt?=
 =?UTF-8?q?=20Feld=20"Anzeige=20x/N=20Teilnehmern=20an=20Stufe"=20wurde=20?=
 =?UTF-8?q?implementiert=20Preview=20wird=20korrekt=20durchgeleitet?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../CampaignAddParticipants_entity.aod        |  3 +++
 .../CampaignParticipant_entity.aod            |  4 +--
 .../campaign_id/displayValueProcess.js        |  9 +++++++
 ...inkedContextProcess.js => valueProcess.js} |  0
 .../conditionProcess.js                       |  9 +++++--
 .../onDBUpdate.js                             |  0
 .../CampaignStep_entity.aod                   |  8 ++++++
 .../campaignstepid_param/valueProcess.js      |  2 ++
 .../valueProcess.js                           |  7 ++++++
 .../entityfields/state/valueProcess.js        |  7 ++++++
 entity/Campaign_entity/Campaign_entity.aod    |  2 ++
 .../entityfields/state/valueProcess.js        |  7 ++++++
 .../_____LANGUAGE_EXTRA.aod                   | 12 ++++++---
 .../_____LANGUAGE_de/_____LANGUAGE_de.aod     |  4 +++
 .../_____LANGUAGE_en/_____LANGUAGE_en.aod     | 12 ++++++---
 .../CampaignPreview_view.aod                  |  4 ---
 .../CampaignStepFilter_view.aod               |  8 +++---
 .../CampaignStepPreview_view.aod              | 18 +++++++++++++
 process/Campaign_lib/process.js               | 25 +++++++++++++++++++
 .../KeywordRegistry_basic.aod                 |  1 +
 process/KeywordRegistry_basic/process.js      |  3 ++-
 process/Proto_lib/Proto_lib.aod               |  1 +
 .../_test_clientProcess.aod                   |  1 +
 23 files changed, 128 insertions(+), 19 deletions(-)
 create mode 100644 entity/CampaignParticipant_entity/entityfields/campaign_id/displayValueProcess.js
 rename entity/CampaignParticipant_entity/entityfields/contactcontext/{linkedContextProcess.js => valueProcess.js} (100%)
 delete mode 100644 entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/onDBUpdate.js
 create mode 100644 entity/CampaignStep_entity/entityfields/currentmaxparticipantsinfo/valueProcess.js
 create mode 100644 entity/CampaignStep_entity/entityfields/state/valueProcess.js
 create mode 100644 entity/Campaign_entity/entityfields/state/valueProcess.js

diff --git a/entity/CampaignAddParticipants_entity/CampaignAddParticipants_entity.aod b/entity/CampaignAddParticipants_entity/CampaignAddParticipants_entity.aod
index 1366fd58e74..2bd6d6b593e 100644
--- a/entity/CampaignAddParticipants_entity/CampaignAddParticipants_entity.aod
+++ b/entity/CampaignAddParticipants_entity/CampaignAddParticipants_entity.aod
@@ -1,6 +1,7 @@
 <?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.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.1">
   <name>CampaignAddParticipants_entity</name>
+  <title>Add participants to Campaign</title>
   <majorModelMode>DISTRIBUTED</majorModelMode>
   <recordContainer>jdito</recordContainer>
   <entityFields>
@@ -11,11 +12,13 @@
       <name>CAMPAIGN_ID</name>
       <title>Campaign</title>
       <consumer>CampaignConsumer</consumer>
+      <mandatory v="true" />
     </entityField>
     <entityField>
       <name>CAMPAIGNSTEP_ID</name>
       <title>Campaign Step</title>
       <consumer>CampaignStepConsumer</consumer>
+      <mandatory v="true" />
     </entityField>
     <entityField>
       <name>campaignParticipantMessage</name>
diff --git a/entity/CampaignParticipant_entity/CampaignParticipant_entity.aod b/entity/CampaignParticipant_entity/CampaignParticipant_entity.aod
index 829d5af3194..24a2e510c37 100644
--- a/entity/CampaignParticipant_entity/CampaignParticipant_entity.aod
+++ b/entity/CampaignParticipant_entity/CampaignParticipant_entity.aod
@@ -64,6 +64,7 @@
       <title>Campaign</title>
       <consumer>CampaignsConsumer</consumer>
       <valueProcess>%aditoprj%/entity/CampaignParticipant_entity/entityfields/campaign_id/valueProcess.js</valueProcess>
+      <displayValueProcess>%aditoprj%/entity/CampaignParticipant_entity/entityfields/campaign_id/displayValueProcess.js</displayValueProcess>
       <onValueChange>%aditoprj%/entity/CampaignParticipant_entity/entityfields/campaign_id/onValueChange.js</onValueChange>
       <onValueChangeTypes>
         <element>MASK</element>
@@ -144,7 +145,7 @@
     </entityConsumer>
     <entityField>
       <name>CONTACTCONTEXT</name>
-      <linkedContextProcess>%aditoprj%/entity/CampaignParticipant_entity/entityfields/contactcontext/linkedContextProcess.js</linkedContextProcess>
+      <valueProcess>%aditoprj%/entity/CampaignParticipant_entity/entityfields/contactcontext/valueProcess.js</valueProcess>
     </entityField>
   </entityFields>
   <recordContainers>
@@ -152,7 +153,6 @@
       <name>ParticipantsDbRecordContainer</name>
       <alias>Data_alias</alias>
       <conditionProcess>%aditoprj%/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/conditionProcess.js</conditionProcess>
-      <onDBUpdate>%aditoprj%/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/onDBUpdate.js</onDBUpdate>
       <linkInformation>
         <linkInformation>
           <name>12b5bf2e-e376-4c40-9799-fb07961a455d</name>
diff --git a/entity/CampaignParticipant_entity/entityfields/campaign_id/displayValueProcess.js b/entity/CampaignParticipant_entity/entityfields/campaign_id/displayValueProcess.js
new file mode 100644
index 00000000000..12ea2ba316a
--- /dev/null
+++ b/entity/CampaignParticipant_entity/entityfields/campaign_id/displayValueProcess.js
@@ -0,0 +1,9 @@
+import("system.result");
+import("system.db");
+import("system.vars");
+import("Campaign_lib");
+
+var campaignId = vars.get("$field.CAMPAIGN_ID");
+var campaignName = CampaignUtils.getCampaignNameById(campaignId);
+
+result.string(campaignName);
\ No newline at end of file
diff --git a/entity/CampaignParticipant_entity/entityfields/contactcontext/linkedContextProcess.js b/entity/CampaignParticipant_entity/entityfields/contactcontext/valueProcess.js
similarity index 100%
rename from entity/CampaignParticipant_entity/entityfields/contactcontext/linkedContextProcess.js
rename to entity/CampaignParticipant_entity/entityfields/contactcontext/valueProcess.js
diff --git a/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/conditionProcess.js b/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/conditionProcess.js
index a924702b522..db030eee9a9 100644
--- a/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/conditionProcess.js
+++ b/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/conditionProcess.js
@@ -9,6 +9,11 @@ if(vars.get("$param.CampaignId_param") != null && vars.get("$param.CampaignId_pa
     
     if(vars.get("$param.CampaignStepId_param") != null && vars.get("$param.CampaignStepId_param") != "")
         resultValue += " AND CAMPAIGNSTEP_ID = '" + vars.get("$param.CampaignStepId_param") + "'";
-
+    
     result.string(resultValue);
-}
\ No newline at end of file
+}
+else if(vars.get("$param.CampaignStepId_param") != null && vars.get("$param.CampaignStepId_param") != "")
+    {
+        resultValue = "CAMPAIGNSTEP_ID = '" + vars.get("$param.CampaignStepId_param") + "'";
+        result.string(resultValue);
+    }
\ No newline at end of file
diff --git a/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/onDBUpdate.js b/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/onDBUpdate.js
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/entity/CampaignStep_entity/CampaignStep_entity.aod b/entity/CampaignStep_entity/CampaignStep_entity.aod
index d9c83b4647b..c97381d2921 100644
--- a/entity/CampaignStep_entity/CampaignStep_entity.aod
+++ b/entity/CampaignStep_entity/CampaignStep_entity.aod
@@ -11,10 +11,12 @@
     </entityProvider>
     <entityField>
       <name>CAMPAIGNSTEPID</name>
+      <mandatory v="true" />
       <valueProcess>%aditoprj%/entity/CampaignStep_entity/entityfields/campaignstepid/valueProcess.js</valueProcess>
     </entityField>
     <entityField>
       <name>CAMPAIGN_ID</name>
+      <mandatory v="true" />
       <valueProcess>%aditoprj%/entity/CampaignStep_entity/entityfields/campaign_id/valueProcess.js</valueProcess>
     </entityField>
     <entityField>
@@ -49,6 +51,7 @@
       <title>Status</title>
       <consumer>KeywordStates</consumer>
       <mandatory v="true" />
+      <valueProcess>%aditoprj%/entity/CampaignStep_entity/entityfields/state/valueProcess.js</valueProcess>
       <displayValueProcess>%aditoprj%/entity/CampaignStep_entity/entityfields/state/displayValueProcess.js</displayValueProcess>
     </entityField>
     <entityField>
@@ -162,6 +165,11 @@
         </entityParameter>
       </children>
     </entityConsumer>
+    <entityField>
+      <name>CurrentMaxParticipantsInfo</name>
+      <title>Participants</title>
+      <valueProcess>%aditoprj%/entity/CampaignStep_entity/entityfields/currentmaxparticipantsinfo/valueProcess.js</valueProcess>
+    </entityField>
   </entityFields>
   <recordContainers>
     <dbRecordContainer>
diff --git a/entity/CampaignStep_entity/entityfields/campaignparticipantsconsumer/children/campaignstepid_param/valueProcess.js b/entity/CampaignStep_entity/entityfields/campaignparticipantsconsumer/children/campaignstepid_param/valueProcess.js
index 3c2f1c06fca..737745c8c91 100644
--- a/entity/CampaignStep_entity/entityfields/campaignparticipantsconsumer/children/campaignstepid_param/valueProcess.js
+++ b/entity/CampaignStep_entity/entityfields/campaignparticipantsconsumer/children/campaignstepid_param/valueProcess.js
@@ -1,4 +1,6 @@
+import("system.logging");
 import("system.result");
 import("system.vars");
 
+logging.log("CS_entity_CPCOnsumer_CSId_param: field.CAMPAIGNSTEPID ->" + vars.getString("$field.CAMPAIGNSTEPID"));
 result.string(vars.getString("$field.CAMPAIGNSTEPID"));
\ No newline at end of file
diff --git a/entity/CampaignStep_entity/entityfields/currentmaxparticipantsinfo/valueProcess.js b/entity/CampaignStep_entity/entityfields/currentmaxparticipantsinfo/valueProcess.js
new file mode 100644
index 00000000000..f3447d7251c
--- /dev/null
+++ b/entity/CampaignStep_entity/entityfields/currentmaxparticipantsinfo/valueProcess.js
@@ -0,0 +1,7 @@
+import("system.result");
+import("system.vars");
+import("Campaign_lib");
+
+let currentParticipantsCount = CampaignUtils.getParticipantCountForStep(vars.get("$field.CAMPAIGNSTEPID"));
+let maxParticipantsStepCount = vars.get("$field.MAXPARTICIPANTS");
+result.string(currentParticipantsCount + "/" + maxParticipantsStepCount);
\ No newline at end of file
diff --git a/entity/CampaignStep_entity/entityfields/state/valueProcess.js b/entity/CampaignStep_entity/entityfields/state/valueProcess.js
new file mode 100644
index 00000000000..9524152a718
--- /dev/null
+++ b/entity/CampaignStep_entity/entityfields/state/valueProcess.js
@@ -0,0 +1,7 @@
+import("system.vars");
+import("system.result");
+import("system.neon");
+import("KeywordRegistry_basic");
+
+if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && !vars.get("$this.value"))
+    result.string($KeywordRegistry.campaignStepState$open());
\ No newline at end of file
diff --git a/entity/Campaign_entity/Campaign_entity.aod b/entity/Campaign_entity/Campaign_entity.aod
index 02c68c9a1ff..76cf93a876d 100644
--- a/entity/Campaign_entity/Campaign_entity.aod
+++ b/entity/Campaign_entity/Campaign_entity.aod
@@ -33,6 +33,7 @@
       <title>Ende</title>
       <contentType>DATE</contentType>
       <resolution>DAY</resolution>
+      <outputFormat>dd.MM.YYYY</outputFormat>
       <state>READONLY</state>
       <displayValueProcess>%aditoprj%/entity/Campaign_entity/entityfields/date_end/displayValueProcess.js</displayValueProcess>
     </entityField>
@@ -88,6 +89,7 @@
       <title>Status</title>
       <consumer>KeywordStates</consumer>
       <mandatory v="true" />
+      <valueProcess>%aditoprj%/entity/Campaign_entity/entityfields/state/valueProcess.js</valueProcess>
       <displayValueProcess>%aditoprj%/entity/Campaign_entity/entityfields/state/displayValueProcess.js</displayValueProcess>
     </entityField>
     <entityConsumer>
diff --git a/entity/Campaign_entity/entityfields/state/valueProcess.js b/entity/Campaign_entity/entityfields/state/valueProcess.js
new file mode 100644
index 00000000000..24a86c10cb9
--- /dev/null
+++ b/entity/Campaign_entity/entityfields/state/valueProcess.js
@@ -0,0 +1,7 @@
+import("system.neon");
+import("system.vars");
+import("system.result");
+import("KeywordRegistry_basic");
+
+if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && !vars.get("$this.value"))
+    result.string($KeywordRegistry.campaignState$planning());
\ No newline at end of file
diff --git a/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod b/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod
index 186bf01194b..fd5c8a00173 100644
--- a/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod
+++ b/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod
@@ -2769,9 +2769,6 @@
     <entry>
       <key>Add to Campaign</key>
     </entry>
-    <entry>
-      <key>Protected</key>
-    </entry>
     <entry>
       <key>Choose a campaign and a step to add the contact to a  campaign</key>
     </entry>
@@ -2784,6 +2781,15 @@
     <entry>
       <key>Add the selection to a campaign</key>
     </entry>
+    <entry>
+      <key>protected</key>
+    </entry>
+    <entry>
+      <key>participants will be added to the selected campaign step</key>
+    </entry>
+    <entry>
+      <key>Add participants to Campaign</key>
+    </entry>
   </keyValueMap>
   <font name="Dialog" style="0" size="11" />
   <sqlModels>
diff --git a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod
index 55f57db49cf..7b3df4cc3a1 100644
--- a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod
+++ b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod
@@ -317,6 +317,10 @@
       <key>Addresstype</key>
       <value>Adresstyp</value>
     </entry>
+    <entry>
+      <key>Add participants to Campaign</key>
+      <value>Teilnehmer/innen zu Kampagne hinzufügen</value>
+    </entry>
     <entry>
       <key>Firstname</key>
       <value>Vorname</value>
diff --git a/language/_____LANGUAGE_en/_____LANGUAGE_en.aod b/language/_____LANGUAGE_en/_____LANGUAGE_en.aod
index e5a524f35b0..ad028c1ec39 100644
--- a/language/_____LANGUAGE_en/_____LANGUAGE_en.aod
+++ b/language/_____LANGUAGE_en/_____LANGUAGE_en.aod
@@ -2799,9 +2799,6 @@
     <entry>
       <key>Add to Campaign</key>
     </entry>
-    <entry>
-      <key>Protected</key>
-    </entry>
     <entry>
       <key>Choose a campaign and a step to add the contact to a  campaign</key>
     </entry>
@@ -2814,6 +2811,15 @@
     <entry>
       <key>Add the selection to a campaign</key>
     </entry>
+    <entry>
+      <key>protected</key>
+    </entry>
+    <entry>
+      <key>participants will be added to the selected campaign step</key>
+    </entry>
+    <entry>
+      <key>Add participants to Campaign</key>
+    </entry>
   </keyValueMap>
   <font name="Dialog" style="0" size="11" />
 </language>
diff --git a/neonView/CampaignPreview_view/CampaignPreview_view.aod b/neonView/CampaignPreview_view/CampaignPreview_view.aod
index 613d6c3a587..2293d5bbed0 100644
--- a/neonView/CampaignPreview_view/CampaignPreview_view.aod
+++ b/neonView/CampaignPreview_view/CampaignPreview_view.aod
@@ -32,9 +32,5 @@
         </entityFieldLink>
       </fields>
     </genericViewTemplate>
-    <actionListViewTemplate>
-      <name>testActionList</name>
-      <entityField>#ENTITY</entityField>
-    </actionListViewTemplate>
   </children>
 </neonView>
diff --git a/neonView/CampaignStepFilter_view/CampaignStepFilter_view.aod b/neonView/CampaignStepFilter_view/CampaignStepFilter_view.aod
index 9616f2ae4ab..5b4e3ac8b18 100644
--- a/neonView/CampaignStepFilter_view/CampaignStepFilter_view.aod
+++ b/neonView/CampaignStepFilter_view/CampaignStepFilter_view.aod
@@ -23,10 +23,6 @@
           <name>d9ca59de-1441-494a-91f0-1cff91c575de</name>
           <entityField>NAME</entityField>
         </neonTableColumn>
-        <neonTableColumn>
-          <name>3efaade9-c5f6-49d7-9eda-e954487dba99</name>
-          <entityField>EMPLOYEE_CONTACT_ID</entityField>
-        </neonTableColumn>
         <neonTableColumn>
           <name>0ffcc021-2b58-49f6-91d0-21f4029f744f</name>
           <entityField>DATE_START</entityField>
@@ -35,6 +31,10 @@
           <name>2507d34f-3bc2-426c-9acc-d8ae146daee8</name>
           <entityField>DATE_END</entityField>
         </neonTableColumn>
+        <neonTableColumn>
+          <name>4ee7481b-c629-4da2-8d7a-b33e2e10821e</name>
+          <entityField>CurrentMaxParticipantsInfo</entityField>
+        </neonTableColumn>
         <neonTableColumn>
           <name>9fa9d9f4-5851-4125-ba59-09aa2fb07f89</name>
           <entityField>STATE</entityField>
diff --git a/neonView/CampaignStepPreview_view/CampaignStepPreview_view.aod b/neonView/CampaignStepPreview_view/CampaignStepPreview_view.aod
index 6b3dcd8ccab..8c395ff7f28 100644
--- a/neonView/CampaignStepPreview_view/CampaignStepPreview_view.aod
+++ b/neonView/CampaignStepPreview_view/CampaignStepPreview_view.aod
@@ -14,5 +14,23 @@
       <subtitleField>STATE</subtitleField>
       <entityField>#ENTITY</entityField>
     </cardViewTemplate>
+    <genericViewTemplate>
+      <name>CampaignStepInfosGeneric</name>
+      <entityField>#ENTITY</entityField>
+      <fields>
+        <entityFieldLink>
+          <name>4cbf0232-1dab-47f9-b62a-b539d5035c53</name>
+          <entityField>DATE_START</entityField>
+        </entityFieldLink>
+        <entityFieldLink>
+          <name>677875bc-6b50-4dd8-b8bf-eba5c0e94c56</name>
+          <entityField>DATE_END</entityField>
+        </entityFieldLink>
+        <entityFieldLink>
+          <name>1d6cc036-f0db-445f-a614-565a4c509933</name>
+          <entityField>CurrentMaxParticipantsInfo</entityField>
+        </entityFieldLink>
+      </fields>
+    </genericViewTemplate>
   </children>
 </neonView>
diff --git a/process/Campaign_lib/process.js b/process/Campaign_lib/process.js
index 6f1125961d9..debba2f9b28 100644
--- a/process/Campaign_lib/process.js
+++ b/process/Campaign_lib/process.js
@@ -1,5 +1,6 @@
 import("system.db");
 import("system.neon");
+import("Sql_lib");
 
 /**
  * Methods for campaignmanagement.
@@ -29,6 +30,30 @@ CampaignUtils.addParticipants = function(pRowIds)
     _CampaignUtils._openAddParticipantContext("CampaignAddParticipants", pRowIds, "campaignParticipants_param", "CampaignAddParticipantsEdit_view");
 }
 
+CampaignUtils.getCampaignNameById = function(pCampaignId)
+{
+    let name = "";
+    if (pCampaignId)
+    {
+        name = db.cell(SqlCondition.begin()
+                                  .andPrepare("CAMPAIGN.CAMPAIGNID", pCampaignId)
+                                  .buildSql("select CAMPAIGN.NAME from CAMPAIGN"));
+    }
+    return name;
+}
+
+CampaignUtils.getParticipantCountForStep = function(pCampaignStepId)
+{
+    let count = 0;
+    if (pCampaignStepId)
+    {
+        count = db.cell(SqlCondition.begin()
+                                  .andPrepare("CAMPAIGNPARTICIPANT.CAMPAIGNSTEP_ID", pCampaignStepId)
+                                  .buildSql("select count(*) from CAMPAIGNPARTICIPANT"));
+    }
+    return count;
+}
+
 /**
  * Methods for campaignmanagement.
  * Do not create an instance of this!
diff --git a/process/KeywordRegistry_basic/KeywordRegistry_basic.aod b/process/KeywordRegistry_basic/KeywordRegistry_basic.aod
index eddf2366e9f..f134eecec0a 100644
--- a/process/KeywordRegistry_basic/KeywordRegistry_basic.aod
+++ b/process/KeywordRegistry_basic/KeywordRegistry_basic.aod
@@ -3,4 +3,5 @@
   <name>KeywordRegistry_basic</name>
   <majorModelMode>DISTRIBUTED</majorModelMode>
   <process>%aditoprj%/process/KeywordRegistry_basic/process.js</process>
+  <publishAsWebservice v="true" />
 </process>
diff --git a/process/KeywordRegistry_basic/process.js b/process/KeywordRegistry_basic/process.js
index 8ea7f805158..4da0715ad3b 100644
--- a/process/KeywordRegistry_basic/process.js
+++ b/process/KeywordRegistry_basic/process.js
@@ -67,5 +67,6 @@ $KeywordRegistry.contactDepartment = function(){return "ContactDepartment";};
 $KeywordRegistry.contactPosition = function(){return "ContactPosition";};
 $KeywordRegistry.contactContactrole = function(){return "ContactContactrole";};
 $KeywordRegistry.campaignState = function(){return "CampaignManagementStates";};
+$KeywordRegistry.campaignState$planning = function(){return "e04c9c59-0590-463c-a10e-e25c583e9cf2";};
 $KeywordRegistry.campaignStepState = function(){return "CampaignManagementStepStates";};
-
+$KeywordRegistry.campaignStepState$open = function(){return "bbf69673-2ec6-46f8-b231-684a31be9fbd";};
diff --git a/process/Proto_lib/Proto_lib.aod b/process/Proto_lib/Proto_lib.aod
index 99585a3435e..53b5288a5b9 100644
--- a/process/Proto_lib/Proto_lib.aod
+++ b/process/Proto_lib/Proto_lib.aod
@@ -3,4 +3,5 @@
   <name>Proto_lib</name>
   <majorModelMode>DISTRIBUTED</majorModelMode>
   <process>%aditoprj%/process/Proto_lib/process.js</process>
+  <publishAsWebservice v="true" />
 </process>
diff --git a/process/_test_clientProcess/_test_clientProcess.aod b/process/_test_clientProcess/_test_clientProcess.aod
index 71b66312f6d..3156788d53a 100644
--- a/process/_test_clientProcess/_test_clientProcess.aod
+++ b/process/_test_clientProcess/_test_clientProcess.aod
@@ -3,5 +3,6 @@
   <name>_test_clientProcess</name>
   <majorModelMode>DISTRIBUTED</majorModelMode>
   <process>%aditoprj%/process/_test_clientProcess/process.js</process>
+  <publishAsWebservice v="true" />
   <alias>Data_alias</alias>
 </process>
-- 
GitLab