diff --git a/.liquibase/Data_alias/basic/2021.1.2/Registration_Webservice/changelog.xml b/.liquibase/Data_alias/basic/2021.1.2/Registration_Webservice/changelog.xml
new file mode 100644
index 0000000000000000000000000000000000000000..c6f521d06ef7703262f0e270ce3a326b146dc2d8
--- /dev/null
+++ b/.liquibase/Data_alias/basic/2021.1.2/Registration_Webservice/changelog.xml
@@ -0,0 +1,7 @@
+<?xml version="1.1" encoding="UTF-8" standalone="no"?>
+<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
+    <include relativeToChangelogFile="true" file="insert_DocumentTemplateKeywords.xml"/>
+    <include relativeToChangelogFile="true" file="insert_DocumentTemplateKeywordAttributes.xml"/>
+</databaseChangeLog>
\ No newline at end of file
diff --git a/.liquibase/Data_alias/basic/2021.1.2/Registration_Webservice/insert_DocumentTemplateKeywordAttributes.xml b/.liquibase/Data_alias/basic/2021.1.2/Registration_Webservice/insert_DocumentTemplateKeywordAttributes.xml
new file mode 100644
index 0000000000000000000000000000000000000000..6715e2bdb55513e4fe2772f30a3d45c71ffb58d3
--- /dev/null
+++ b/.liquibase/Data_alias/basic/2021.1.2/Registration_Webservice/insert_DocumentTemplateKeywordAttributes.xml
@@ -0,0 +1,26 @@
+<?xml version="1.1" encoding="UTF-8" standalone="no"?>
+<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
+  <changeSet author="m.groppe" id="76054c9d-97aa-4bc1-bba7-c0f78f508556">
+      <insert tableName="AB_KEYWORD_ATTRIBUTE">
+          <column name="AB_KEYWORD_ATTRIBUTEID" value="2dd3727b-08d2-46a7-927e-2180b7a1745c"/>
+          <column name="AB_KEYWORD_CATEGORY_ID" value="e23c8316-d43a-4606-803e-d4488823cc52"/>
+          <column name="CONTAINER" value=""/>
+          <column name="KIND" value="BOOL_VALUE"/>
+          <column name="NAME" value="HTML"/>
+      </insert>
+      <insert tableName="AB_KEYWORD_ATTRIBUTERELATION">
+          <column name="AB_KEYWORD_ATTRIBUTERELATIONID" value="e9633142-35e5-46bf-a0e8-1ec3f1ad4949"/>
+          <column name="AB_KEYWORD_ATTRIBUTE_ID" value="14c2d515-a42f-4618-b534-7a23369d2002"/>
+          <column name="AB_KEYWORD_ENTRY_ID" value="d56c5fe5-9f68-48d7-9631-c1140fa89cce"/>
+          <column name="BOOL_VALUE" value="1"/>
+      </insert>
+      <insert tableName="AB_KEYWORD_ATTRIBUTERELATION">
+          <column name="AB_KEYWORD_ATTRIBUTERELATIONID" value="4e57a45e-2f5e-4b73-99c2-7738b33026a5"/>
+          <column name="AB_KEYWORD_ATTRIBUTE_ID" value="2dd3727b-08d2-46a7-927e-2180b7a1745c"/>
+          <column name="AB_KEYWORD_ENTRY_ID" value="48c2c678-9725-4b54-be31-92f4152315bc"/>
+          <column name="BOOL_VALUE" value="1"/>
+      </insert>
+  </changeSet>
+</databaseChangeLog>
\ No newline at end of file
diff --git a/.liquibase/Data_alias/basic/2021.1.2/Registration_Webservice/insert_DocumentTemplateKeywords.xml b/.liquibase/Data_alias/basic/2021.1.2/Registration_Webservice/insert_DocumentTemplateKeywords.xml
new file mode 100644
index 0000000000000000000000000000000000000000..da57d44ac5fe59307f0292f20b141dec4451a555
--- /dev/null
+++ b/.liquibase/Data_alias/basic/2021.1.2/Registration_Webservice/insert_DocumentTemplateKeywords.xml
@@ -0,0 +1,34 @@
+<?xml version="1.1" encoding="UTF-8" standalone="no"?>
+<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
+  <changeSet author="m.groppe" id="8a201365-ec2e-49cf-937e-80e2558ddb40">
+    <insert tableName="AB_KEYWORD_ENTRY">
+        <column name="AB_KEYWORD_ENTRYID" value="12780ba9-8009-4257-b4b2-d6ff66f481a7"/>
+        <column name="AB_KEYWORD_CATEGORY_ID" value="b5afd40b-bfa7-4aee-89ea-06b8c7deb304"/>
+        <column name="KEYID" value="HTML"/>
+        <column name="TITLE" value="HTML"/>
+        <column name="SORTING" valueNumeric="4"/>
+        <column name="ISACTIVE" valueNumeric="1"/>
+        <column name="ISESSENTIAL" valueNumeric="1"/>
+    </insert>
+    <insert tableName="AB_KEYWORD_ENTRY">
+        <column name="AB_KEYWORD_ENTRYID" value="d56c5fe5-9f68-48d7-9631-c1140fa89cce"/>
+        <column name="AB_KEYWORD_CATEGORY_ID" value="e23c8316-d43a-4606-803e-d4488823cc52"/>
+        <column name="KEYID" value="8"/>
+        <column name="TITLE" value="Workflow"/>
+        <column name="SORTING" valueNumeric="8"/>
+        <column name="ISACTIVE" valueNumeric="1"/>
+        <column name="ISESSENTIAL" valueNumeric="1"/>
+    </insert>
+    <insert tableName="AB_KEYWORD_ENTRY">
+        <column name="AB_KEYWORD_ENTRYID" value="48c2c678-9725-4b54-be31-92f4152315bc"/>
+        <column name="AB_KEYWORD_CATEGORY_ID" value="e23c8316-d43a-4606-803e-d4488823cc52"/>
+        <column name="KEYID" value="9"/>
+        <column name="TITLE" value="Landingpage"/>
+        <column name="SORTING" valueNumeric="9"/>
+        <column name="ISACTIVE" valueNumeric="1"/>
+        <column name="ISESSENTIAL" valueNumeric="1"/>
+    </insert>
+  </changeSet>
+</databaseChangeLog>
\ No newline at end of file
diff --git a/.liquibase/Data_alias/basic/2021.1.2/changelog.xml b/.liquibase/Data_alias/basic/2021.1.2/changelog.xml
index 0d2d913b1a834e44e8ca26d2b8e6e87bad6f7bde..a1edbff54e9b7831c1d969fd0457397c92987634 100644
--- a/.liquibase/Data_alias/basic/2021.1.2/changelog.xml
+++ b/.liquibase/Data_alias/basic/2021.1.2/changelog.xml
@@ -2,4 +2,5 @@
 <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
     <include relativeToChangelogFile="true" file="Bulkmail/changelog.xml"/>
-</databaseChangeLog>
\ No newline at end of file
+    <include relativeToChangelogFile="true" file="Registration_Webservice/changelog.xml"/>
+</databaseChangeLog>
diff --git a/.liquibase/Data_alias/basic/workflows/blob/DOI.png b/.liquibase/Data_alias/basic/workflows/blob/DOI.png
new file mode 100644
index 0000000000000000000000000000000000000000..0e98a046e0e272558391e2f6fd2fdee665e534e8
Binary files /dev/null and b/.liquibase/Data_alias/basic/workflows/blob/DOI.png differ
diff --git a/.liquibase/Data_alias/basic/workflows/blob/DOI.xml b/.liquibase/Data_alias/basic/workflows/blob/DOI.xml
new file mode 100644
index 0000000000000000000000000000000000000000..9227bfea26e1df5d5c826acc174b271bf9c16613
--- /dev/null
+++ b/.liquibase/Data_alias/basic/workflows/blob/DOI.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:flowable="http://flowable.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.flowable.org/processdef">
+  <process id="DOI" name="DOI" isExecutable="true">
+    <documentation>Workflow to send a doi to a user</documentation>
+    <startEvent id="startEvent1" flowable:formFieldValidation="true"></startEvent>
+    <serviceTask id="sid-BFEEA045-E2FE-4B9E-B37D-E8C5A1165A97" name="Send DOI" flowable:class="de.adito.aditoweb.server.neon.workflow.WorkflowServiceTask">
+      <extensionElements>
+        <flowable:field name="jditoProcess">
+          <flowable:string><![CDATA[SendEmail_workflowService]]></flowable:string>
+        </flowable:field>
+        <flowable:field name="taskVariables">
+          <flowable:string><![CDATA[{"documentTemplateId":{"value":"000f7e94-3d82-4581-b529-4ece0e7ddf4e"},"recipientContactId":{"value":""},"linkActionType":{"value":""}}]]></flowable:string>
+        </flowable:field>
+      </extensionElements>
+    </serviceTask>
+    <endEvent id="sid-9F607B6F-D910-4081-AE9C-8C37CD90FFE3"></endEvent>
+    <sequenceFlow id="sid-9340EBEB-CC67-4ED3-8E77-9C0331FF64CB" sourceRef="startEvent1" targetRef="sid-BFEEA045-E2FE-4B9E-B37D-E8C5A1165A97"></sequenceFlow>
+    <sequenceFlow id="sid-EB34CA9A-50B1-44B9-825C-ACF8B6CD66C8" sourceRef="sid-BFEEA045-E2FE-4B9E-B37D-E8C5A1165A97" targetRef="sid-9F607B6F-D910-4081-AE9C-8C37CD90FFE3"></sequenceFlow>
+  </process>
+  <bpmndi:BPMNDiagram id="BPMNDiagram_DOI">
+    <bpmndi:BPMNPlane bpmnElement="DOI" id="BPMNPlane_DOI">
+      <bpmndi:BPMNShape bpmnElement="startEvent1" id="BPMNShape_startEvent1">
+        <omgdc:Bounds height="30.0" width="30.0" x="100.0" y="163.0"></omgdc:Bounds>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape bpmnElement="sid-BFEEA045-E2FE-4B9E-B37D-E8C5A1165A97" id="BPMNShape_sid-BFEEA045-E2FE-4B9E-B37D-E8C5A1165A97">
+        <omgdc:Bounds height="80.0" width="100.0" x="210.0" y="138.0"></omgdc:Bounds>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape bpmnElement="sid-9F607B6F-D910-4081-AE9C-8C37CD90FFE3" id="BPMNShape_sid-9F607B6F-D910-4081-AE9C-8C37CD90FFE3">
+        <omgdc:Bounds height="28.0" width="28.0" x="390.0" y="164.0"></omgdc:Bounds>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge bpmnElement="sid-9340EBEB-CC67-4ED3-8E77-9C0331FF64CB" id="BPMNEdge_sid-9340EBEB-CC67-4ED3-8E77-9C0331FF64CB">
+        <omgdi:waypoint x="129.94999913076796" y="178.0"></omgdi:waypoint>
+        <omgdi:waypoint x="209.99999999998067" y="178.0"></omgdi:waypoint>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="sid-EB34CA9A-50B1-44B9-825C-ACF8B6CD66C8" id="BPMNEdge_sid-EB34CA9A-50B1-44B9-825C-ACF8B6CD66C8">
+        <omgdi:waypoint x="309.94999999998265" y="178.0"></omgdi:waypoint>
+        <omgdi:waypoint x="390.0" y="178.0"></omgdi:waypoint>
+      </bpmndi:BPMNEdge>
+    </bpmndi:BPMNPlane>
+  </bpmndi:BPMNDiagram>
+</definitions>
\ No newline at end of file
diff --git a/.liquibase/Data_alias/basic/workflows/blob/allowEmailCommunication.png b/.liquibase/Data_alias/basic/workflows/blob/allowEmailCommunication.png
new file mode 100644
index 0000000000000000000000000000000000000000..ee6a4a4c79bda85b0b2c969d7d3ab25fb08f1eb1
Binary files /dev/null and b/.liquibase/Data_alias/basic/workflows/blob/allowEmailCommunication.png differ
diff --git a/.liquibase/Data_alias/basic/workflows/blob/allowEmailCommunication.xml b/.liquibase/Data_alias/basic/workflows/blob/allowEmailCommunication.xml
new file mode 100644
index 0000000000000000000000000000000000000000..4937c55902839c033854d6a405c9d23e24463777
--- /dev/null
+++ b/.liquibase/Data_alias/basic/workflows/blob/allowEmailCommunication.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:flowable="http://flowable.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.flowable.org/processdef">
+  <process id="allowEmailCommunication" name="Allow email communication" isExecutable="true">
+    <documentation>Sets the communication setting for email to allowed</documentation>
+    <startEvent id="startEvent1" flowable:formFieldValidation="true"></startEvent>
+    <serviceTask id="sid-81F27FC6-FB34-404B-8AA8-84384A1CFAED" name="Allow email communication" flowable:class="de.adito.aditoweb.server.neon.workflow.WorkflowServiceTask">
+      <extensionElements>
+        <flowable:field name="jditoProcess">
+          <flowable:string><![CDATA[SetCommunicationSetting_workflowService]]></flowable:string>
+        </flowable:field>
+        <flowable:field name="taskVariables">
+          <flowable:string><![CDATA[{"channelType":{"value":"COMMUNICATIONCHANNEL_COMMUNICATION"},"medium":{"value":"CAMPAIGNEMAIL"},"status":{"value":"COMMUNICATION_ALLOWED"}}]]></flowable:string>
+        </flowable:field>
+      </extensionElements>
+    </serviceTask>
+    <endEvent id="sid-A28ACC77-98D5-418A-B2DA-70EED93C00AD"></endEvent>
+    <sequenceFlow id="sid-D6DD7380-3B51-4F31-B5BC-41EFAD3B02E4" sourceRef="startEvent1" targetRef="sid-81F27FC6-FB34-404B-8AA8-84384A1CFAED"></sequenceFlow>
+    <sequenceFlow id="sid-5EC260F6-7456-4576-92C5-5C536D14E339" sourceRef="sid-81F27FC6-FB34-404B-8AA8-84384A1CFAED" targetRef="sid-A28ACC77-98D5-418A-B2DA-70EED93C00AD"></sequenceFlow>
+  </process>
+  <bpmndi:BPMNDiagram id="BPMNDiagram_allowEmailCommunication">
+    <bpmndi:BPMNPlane bpmnElement="allowEmailCommunication" id="BPMNPlane_allowEmailCommunication">
+      <bpmndi:BPMNShape bpmnElement="startEvent1" id="BPMNShape_startEvent1">
+        <omgdc:Bounds height="30.0" width="30.0" x="100.0" y="163.0"></omgdc:Bounds>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape bpmnElement="sid-81F27FC6-FB34-404B-8AA8-84384A1CFAED" id="BPMNShape_sid-81F27FC6-FB34-404B-8AA8-84384A1CFAED">
+        <omgdc:Bounds height="80.0" width="100.0" x="210.0" y="136.0"></omgdc:Bounds>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape bpmnElement="sid-A28ACC77-98D5-418A-B2DA-70EED93C00AD" id="BPMNShape_sid-A28ACC77-98D5-418A-B2DA-70EED93C00AD">
+        <omgdc:Bounds height="28.0" width="28.0" x="375.0" y="164.0"></omgdc:Bounds>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge bpmnElement="sid-D6DD7380-3B51-4F31-B5BC-41EFAD3B02E4" id="BPMNEdge_sid-D6DD7380-3B51-4F31-B5BC-41EFAD3B02E4">
+        <omgdi:waypoint x="129.94860715897664" y="177.7931227241285"></omgdi:waypoint>
+        <omgdi:waypoint x="209.9999999999986" y="176.6889655172414"></omgdi:waypoint>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="sid-5EC260F6-7456-4576-92C5-5C536D14E339" id="BPMNEdge_sid-5EC260F6-7456-4576-92C5-5C536D14E339">
+        <omgdi:waypoint x="309.95000000000005" y="176.77441860465117"></omgdi:waypoint>
+        <omgdi:waypoint x="375.00104904016473" y="177.78297128864668"></omgdi:waypoint>
+      </bpmndi:BPMNEdge>
+    </bpmndi:BPMNPlane>
+  </bpmndi:BPMNDiagram>
+</definitions>
\ No newline at end of file
diff --git a/.liquibase/Data_alias/basic/workflows/changelog.xml b/.liquibase/Data_alias/basic/workflows/changelog.xml
index a44bbdf97a503f7e49499e775058823e7bec67b2..dbdfa18ba988d02b9f8f479572d739e3c05b7299 100644
--- a/.liquibase/Data_alias/basic/workflows/changelog.xml
+++ b/.liquibase/Data_alias/basic/workflows/changelog.xml
@@ -6,4 +6,7 @@
     <include relativeToChangelogFile="true" file="insert_unsubscribeInterest.xml"/>
     <include relativeToChangelogFile="true" file="insert_advertisingShipment.xml"/>
     <include relativeToChangelogFile="true" file="insert_approveOffer.xml"/>
+    <include relativeToChangelogFile="true" file="insert_allowEmailCommunication.xml"/>
+    <include relativeToChangelogFile="true" file="insert_DOI.xml"/>
+    <include relativeToChangelogFile="true" file="insert_DOI_DOCUMENTTEMPLATE.xml"/>
 </databaseChangeLog>
\ No newline at end of file
diff --git a/.liquibase/Data_alias/basic/workflows/insert_DOI.xml b/.liquibase/Data_alias/basic/workflows/insert_DOI.xml
new file mode 100644
index 0000000000000000000000000000000000000000..1975c6a20326f283a816f0dc028f1bdd18b007c4
--- /dev/null
+++ b/.liquibase/Data_alias/basic/workflows/insert_DOI.xml
@@ -0,0 +1,15 @@
+<?xml version="1.1" encoding="UTF-8" standalone="no"?>
+<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
+  <changeSet author="m.groppe" id="e3f266c1-368d-412e-aedc-3aa15dc1dc0c">
+      <insert tableName="STANDARD_WORKFLOW">
+          <column name="STANDARD_WORKFLOWID" value="00dc24eb-a757-43c5-b8ca-889fd2b55da2"/>
+          <column name="PROCESSKEY" value="DOI"/>
+          <column name="NAME" value="DOI"/>
+          <column name="DESCRIPTION" value="Workflow to send a doi to a user"/>
+          <column name="PROCESSXML" valueBlobFile="blob/DOI.xml"/>
+          <column name="DIAGRAM" valueBlobFile="blob/DOI.png"/>
+      </insert>
+  </changeSet>
+</databaseChangeLog>
\ No newline at end of file
diff --git a/.liquibase/Data_alias/basic/workflows/insert_DOI_DOCUMENTTEMPLATE.xml b/.liquibase/Data_alias/basic/workflows/insert_DOI_DOCUMENTTEMPLATE.xml
new file mode 100644
index 0000000000000000000000000000000000000000..fd734f69a40382edddd63cfb095749673664d170
--- /dev/null
+++ b/.liquibase/Data_alias/basic/workflows/insert_DOI_DOCUMENTTEMPLATE.xml
@@ -0,0 +1,16 @@
+<?xml version="1.1" encoding="UTF-8" standalone="no"?>
+<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
+  <changeSet author="" id="3b5bde37-b68d-4a1f-a840-c1b896fcbcee">
+      <insert tableName="DOCUMENTTEMPLATE">
+          <column name="DOCUMENTTEMPLATEID" value="000f7e94-3d82-4581-b529-4ece0e7ddf4e"/>
+          <column name="NAME" value="newsletter_confirmation"/>
+          <column name="KIND" value="MAI"/>
+          <column name="CLASSIFICATION" value="8"/>
+          <column name="ISOLANGUAGE" value="deu"/>
+          <column name="USER_NEW" value="Admin"/>
+          <column name="DATE_NEW" valueDate="2021-07-13T12:19:02"/>
+      </insert>
+  </changeSet>
+</databaseChangeLog>
\ No newline at end of file
diff --git a/.liquibase/Data_alias/basic/workflows/insert_allowEmailCommunication.xml b/.liquibase/Data_alias/basic/workflows/insert_allowEmailCommunication.xml
new file mode 100644
index 0000000000000000000000000000000000000000..445fc8c0fa46a7d5267fb582f3a76a8fefcb95f0
--- /dev/null
+++ b/.liquibase/Data_alias/basic/workflows/insert_allowEmailCommunication.xml
@@ -0,0 +1,15 @@
+<?xml version="1.1" encoding="UTF-8" standalone="no"?>
+<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
+  <changeSet author="m.groppe" id="106839d5-6914-4731-b735-0bd3865a3376">
+      <insert tableName="STANDARD_WORKFLOW">
+          <column name="STANDARD_WORKFLOWID" value="715c2cfb-b60d-49b4-bc55-64479c1ef66d"/>
+          <column name="PROCESSKEY" value="allowEmailCommunication"/>
+          <column name="NAME" value="Allow email communication"/>
+          <column name="DESCRIPTION" value="Sets the communication setting for email to allowed"/>
+          <column name="PROCESSXML" valueBlobFile="blob/allowEmailCommunication.xml"/>
+          <column name="DIAGRAM" valueBlobFile="blob/allowEmailCommunication.png"/>
+      </insert>
+  </changeSet>
+</databaseChangeLog>
\ No newline at end of file
diff --git a/.liquibase/_____SYSTEMALIAS/basic/Workflow/asys_binaries_doiDocumenttemplate.xml b/.liquibase/_____SYSTEMALIAS/basic/Workflow/asys_binaries_doiDocumenttemplate.xml
new file mode 100644
index 0000000000000000000000000000000000000000..0cb30dc51391d445a5f07f8a9f74095f33086877
--- /dev/null
+++ b/.liquibase/_____SYSTEMALIAS/basic/Workflow/asys_binaries_doiDocumenttemplate.xml
@@ -0,0 +1,21 @@
+<?xml version="1.1" encoding="UTF-8" standalone="no"?>
+<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
+  <changeSet author="m.groppe" id="6f63d9cd-7702-42c8-86b9-a72da9a238f9">
+    <insert tableName="ASYS_BINARIES">
+      <column name="CONTAINERNAME" value="DOCUMENT"/>
+      <column name="USER_EDIT" value="Admin"/>
+      <column name="USER_NEW" value="Admin"/>
+      <column name="DATE_NEW" valueDate="2021-07-13T09:42:38"/>
+      <column name="FILENAME" value="newsletter_confirmation.html"/>
+      <column name="DATE_EDIT" valueDate="2019-21-13T09:42:38"/>
+      <column name="MIMETYPE" value="application/xhtml+xml"/>
+      <column name="ID" value="3486df51-5cce-48a0-8b74-28f1ffcf31d8"/>
+      <column name="DATASIZE" valueNumeric="7132"/>
+      <column name="TABLENAME" value="DOCUMENTTEMPLATE"/>
+      <column name="ROW_ID" value="000f7e94-3d82-4581-b529-4ece0e7ddf4e"/>
+      <column name="BINDATA" valueBlobFile="blob/newsletter_confirmation.html"/>
+    </insert>
+  </changeSet>
+</databaseChangeLog>
\ No newline at end of file
diff --git a/.liquibase/_____SYSTEMALIAS/basic/Workflow/blob/newsletter_confirmation.html b/.liquibase/_____SYSTEMALIAS/basic/Workflow/blob/newsletter_confirmation.html
new file mode 100644
index 0000000000000000000000000000000000000000..fbe67eaa13ce35529cedd66de694c2ff33a1346c
--- /dev/null
+++ b/.liquibase/_____SYSTEMALIAS/basic/Workflow/blob/newsletter_confirmation.html
@@ -0,0 +1,121 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:o="urn:schemas-microsoft-com:office:office"><head>
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+  <meta name="viewport" content="initial-scale=1.0">
+  <meta name="format-detection" content="telephone=no">
+  <title>TITLE</title>
+<style>
+	/* custom google fonts, be aware of design problems in different mail clients */
+	@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,600;0,700;0,800;1,300;1,400;1,600;1,700;1,800&family=Zilla+Slab+Highlight:wght@400;700&family=Zilla+Slab:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&display=swap');
+</style>
+
+  
+  <style type="text/css">
+    body{ margin: 0; padding: 0; }
+    img{ border: 0px; display: block; }
+
+    .socialLinks{ font-size: 6px; }
+    .socialLinks a{
+      display: inline-block;
+    }
+
+    .long-text p{ margin: 1em 0px; }
+    .long-text p:last-child{ margin-bottom: 0px; }
+    .long-text p:first-child{ margin-top: 0px; }
+  </style>
+  <style type="text/css">
+    /* yahoo, hotmail */
+    .ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div{ line-height: 100%; }
+    .yshortcuts a{ border-bottom: none !important; }
+    .vb-outer{ min-width: 0 !important; }
+    .RMsgBdy, .ExternalClass{
+      width: 100%;
+      background-color: #3f3f3f;
+      background-color: #3f3f3f}
+
+    /* outlook/office365 add buttons outside not-linked images and safari have 2px margin */
+    [o365] button{ margin: 0 !important; }
+
+    /* outlook */
+    table{ mso-table-rspace: 0pt; mso-table-lspace: 0pt; }
+    #outlook a{ padding: 0; }
+    img{ outline: none; text-decoration: none; border: none; -ms-interpolation-mode: bicubic; }
+    a img{ border: none; }
+
+    @media screen and (max-width: 600px) {
+      table.vb-container, table.vb-row{
+        width: 95% !important;
+      }
+
+      .mobile-hide{ display: none !important; }
+      .mobile-textcenter{ text-align: center !important; }
+
+      .mobile-full{ 
+        width: 100% !important;
+        max-width: none !important;
+      }
+    }
+    /* previously used also screen and (max-device-width: 600px) but Yahoo Mail doesn't support multiple queries */
+  </style>
+  <style type="text/css">
+    
+    #ko_textBlock_3 .links-color a, #ko_textBlock_3 .links-color a:link, #ko_textBlock_3 .links-color a:visited, #ko_textBlock_3 .links-color a:hover{
+      color: #3f3f3f;
+      color: #ED1652;
+      text-decoration: underline
+    }
+    
+    #ko_footerBlock_2 .links-color a, #ko_footerBlock_2 .links-color a:link, #ko_footerBlock_2 .links-color a:visited, #ko_footerBlock_2 .links-color a:hover{
+      color: #cccccc;
+      color: #cccccc;
+      text-decoration: underline
+    }
+    </style>
+  
+</head>
+<!--[if !(gte mso 16)]-->
+<body bgcolor="#3f3f3f" text="#919191" alink="#cccccc" vlink="#cccccc" style="margin: 0; padding: 0; background-color: #3f3f3f; color: #919191;"><!--<![endif]--><center>
+
+  
+
+  <table role="presentation" class="vb-outer" width="100%" cellpadding="0" border="0" cellspacing="0" bgcolor="#0B2D3A" style="background-color: #0B2D3A;" id="ko_spacerBlock_5">
+      <tbody><tr><td class="vb-outer" align="center" valign="top" height="24" style="padding-left: 9px; padding-right: 9px; font-size: 0; font-size: 1px; height: 1px; height: 24px;">
+      
+      &nbsp;
+    </td></tr>
+    </tbody></table><table role="presentation" class="vb-outer" width="100%" cellpadding="0" border="0" cellspacing="0" bgcolor="#0B2D3A" style="background-color: #0B2D3A;" id="ko_textBlock_3">
+      <tbody><tr><td class="vb-outer" align="center" valign="top" style="padding-left: 9px; padding-right: 9px; font-size: 0;">
+      <!--[if (gte mso 9)|(lte ie 8)]><table role="presentation" align="center" border="0" cellspacing="0" cellpadding="0" width="600"><tr><td align="center" valign="top"><![endif]--><!--
+      --><div style="margin: 0 auto; max-width: 600px; -mru-width: 0px;"><table role="presentation" border="0" cellpadding="0" cellspacing="18" bgcolor="#ffffff" width="600" class="vb-container" style="border-collapse: separate; width: 100%; background-color: #ffffff; mso-cellspacing: 18px; border-spacing: 18px; max-width: 600px; -mru-width: 0px;">
+        
+        <tbody><tr><td class="long-text links-color" width="100%" valign="top" align="left" style="font-weight: normal; color: #0B2D3A; font-size: 13px; font-family: Arial, Helvetica, sans-serif; text-align: left; line-height: normal; font-style: normal;"><p style="margin: 1em 0px; margin-top: 0px;"><br data-mce-bogus="1"></p><p style="margin: 1em 0px;">Vielen Dank für Ihr Interesse an unserem Newsletter.</p><p style="margin: 1em 0px;">&nbsp;</p><p style="margin: 1em 0px;">Bitte bestätigen Sie Ihre Anmeldung, indem Sie <a title="Newsletter Bestätigung" href="{@newsletter_confirmation@}" target="_blank" rel="noopener noreferrer" style="color: #3f3f3f; color: #ED1652; text-decoration: underline;">hier klicken</a>.</p><p style="margin: 1em 0px;">&nbsp;</p><p style="margin: 1em 0px; margin-bottom: 0px;"></p></td></tr>
+      
+      </tbody></table></div><!--
+    --><!--[if (gte mso 9)|(lte ie 8)]></td></tr></table><![endif]-->
+    </td></tr>
+    </tbody></table><table role="presentation" class="vb-outer" width="100%" cellpadding="0" border="0" cellspacing="0" bgcolor="#0B2D3A" style="background-color: #0B2D3A;" id="ko_spacerBlock_4">
+      <tbody><tr><td class="vb-outer" align="center" valign="top" height="24" style="padding-left: 9px; padding-right: 9px; font-size: 0; font-size: 1px; height: 1px; height: 24px;">
+      
+      &nbsp;
+    </td></tr>
+    </tbody></table>
+
+  
+    <!-- footerBlock -->
+    <table role="presentation" class="vb-outer" width="100%" cellpadding="0" border="0" cellspacing="0" bgcolor="#3f3f3f" style="background-color: #3f3f3f;" id="ko_footerBlock_2">
+      <tbody><tr><td class="vb-outer" align="center" valign="top" style="padding-left: 9px; padding-right: 9px; font-size: 0;">
+    <!--[if (gte mso 9)|(lte ie 8)]><table role="presentation" align="center" border="0" cellspacing="0" cellpadding="0" width="600"><tr><td align="center" valign="top"><![endif]--><!--
+      --><div style="margin: 0 auto; max-width: 600px; -mru-width: 0px;"><table role="presentation" border="0" cellpadding="0" cellspacing="0" style="border-collapse: separate; width: 100%; mso-cellspacing: 0px; border-spacing: 0px; max-width: 600px; -mru-width: 0px;" width="600" class="vb-row">
+      <tbody><tr>
+	  <td valign="top" align="left" width="600" height="1" style="vertical-align: top; font-size: 0; line-height: 0px;">
+		<img src="{@pixel@}" alt="" width="1" height="1" border="0" hspace="0" vspace="0" align="top" style="border: 0px; display: block;">
+	  </td>
+    </tr>
+    
+      </tbody></table></div><!--
+    --><!--[if (gte mso 9)|(lte ie 8)]></td></tr></table><![endif]-->
+  </td></tr>
+    </tbody></table>
+    <!-- /footerBlock -->
+    
+</center><!--[if !(gte mso 16)]--></body><!--<![endif]--></html>
\ No newline at end of file
diff --git a/.liquibase/_____SYSTEMALIAS/basic/Workflow/changelog.xml b/.liquibase/_____SYSTEMALIAS/basic/Workflow/changelog.xml
new file mode 100644
index 0000000000000000000000000000000000000000..e8e8314a1a2ef46e73a26071fc4d342aecd45880
--- /dev/null
+++ b/.liquibase/_____SYSTEMALIAS/basic/Workflow/changelog.xml
@@ -0,0 +1,7 @@
+<?xml version="1.1" encoding="UTF-8" standalone="no"?>
+<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
+    <include relativeToChangelogFile="true" file="webserviceUser_flowableIdmService.xml" context="workflow"/>
+    <include relativeToChangelogFile="true" file="asys_binaries_doiDocumenttemplate.xml" context="workflow"/>
+</databaseChangeLog>
\ No newline at end of file
diff --git a/.liquibase/_____SYSTEMALIAS/changelog.xml b/.liquibase/_____SYSTEMALIAS/changelog.xml
index b7d047b86d8cec85021361dcfe28cd2cc0796350..4151fc0b14045a137b603cebeb9d33f9bee90c98 100644
--- a/.liquibase/_____SYSTEMALIAS/changelog.xml
+++ b/.liquibase/_____SYSTEMALIAS/changelog.xml
@@ -5,5 +5,5 @@
 
     <include relativeToChangelogFile="true" file="basic/_demoData/changelog.xml" context="example"/>
     
-    <include relativeToChangelogFile="true" file="basic/Workflow/webserviceUser_flowableIdmService.xml" context="workflow"/>
+    <include relativeToChangelogFile="true" file="basic/Workflow/changelog.xml" context="workflow"/>
 </databaseChangeLog>
diff --git a/entity/Weblink_entity/Weblink_entity.aod b/entity/Weblink_entity/Weblink_entity.aod
index 433b65f149e2ada233658fd284989a93be81660b..5b1af63a87a1c20bd57aa56a63d81430d2b5ae30 100644
--- a/entity/Weblink_entity/Weblink_entity.aod
+++ b/entity/Weblink_entity/Weblink_entity.aod
@@ -108,6 +108,7 @@
       <children>
         <entityParameter>
           <name>WeblinkId_param</name>
+          <valueProcess>%aditoprj%/entity/Weblink_entity/entityfields/clicks/children/weblinkid_param/valueProcess.js</valueProcess>
         </entityParameter>
       </children>
     </entityConsumer>
diff --git a/entity/Weblink_entity/entityfields/clicks/children/weblinkid_param/valueProcess.js b/entity/Weblink_entity/entityfields/clicks/children/weblinkid_param/valueProcess.js
new file mode 100644
index 0000000000000000000000000000000000000000..2733992025cb470a43ad0b63c57c72b7d83aa463
--- /dev/null
+++ b/entity/Weblink_entity/entityfields/clicks/children/weblinkid_param/valueProcess.js
@@ -0,0 +1,4 @@
+import("system.result");
+import("system.vars");
+
+result.string(vars.get("$field.WEBLINKID"));
\ No newline at end of file
diff --git a/process/KeywordRegistry_basic/process.js b/process/KeywordRegistry_basic/process.js
index b71e5b84d7764486f2aec05ae336f0406d6219ae..0aac5d31d4eef4351145a458d003e527f5c26be2 100644
--- a/process/KeywordRegistry_basic/process.js
+++ b/process/KeywordRegistry_basic/process.js
@@ -192,6 +192,7 @@ $KeywordRegistry.documentTemplateTypeCategory = function(){return "DocumentTempl
 $KeywordRegistry.documentTemplateTypeCategory$single = function(){return "1";};
 $KeywordRegistry.documentTemplateTypeCategory$serial = function(){return "2";};
 $KeywordRegistry.documentTemplateTypeCategory$htmlTemplate = function(){return "7";};
+$KeywordRegistry.documentTemplateTypeCategory$workflow = function(){return "8";};
 
 $KeywordRegistry.classificationType = function(){return "ClassificationType";};
 $KeywordRegistry.classificationType$salesproject = function(){return "Salesproject";};
diff --git a/process/SendEmail_workflowService/process.js b/process/SendEmail_workflowService/process.js
index bdc3aab5db6de1f34a580ef8363a52707ba63617..5744b91578e253abe485ccd65caffaed8ea53e14 100644
--- a/process/SendEmail_workflowService/process.js
+++ b/process/SendEmail_workflowService/process.js
@@ -1,3 +1,6 @@
+import("Contact_lib");
+import("system.util");
+import("Sql_lib");
 import("Util_lib");
 import("Communication_lib");
 import("system.tools");
@@ -7,6 +10,7 @@ import("system.vars");
 import("Email_lib");
 import("Placeholder_lib");
 import("Workflow_lib");
+import("KeywordRegistry_basic");
 
 var processInstanceId = vars.get("$local.uid");
 var variables = JSON.parse(vars.get("$local.value"));
@@ -15,19 +19,33 @@ var documentTemplateId = variables.documentTemplateId;
 var senderName = variables.senderName;
 var mailSubject = variables.mailSubject;
 var aditoUrl = variables.originUrl;
+var recipientEmail = variables.recipientEmail||CommUtil.getStandardMail(recipientContactId);
 
 var actionParams = Utils.clone(variables);
 actionParams.processInstanceId = processInstanceId;
-var additionalPlaceholders = [];
-if (aditoUrl)
-{
-    var linkPlaceholder = WorkflowLinkActions.getActionLinkPlaceholder(actionParams.linkActionType, actionParams, actionParams.redirectLink, aditoUrl);
-    additionalPlaceholders.push(linkPlaceholder);
-}
+
+var mail_logid = util.getNewUUID();
+var baseUrl = aditoUrl + "/services/rest/redirect_rest?";
+var linkPlaceholders = newSelect(["PLACEHOLDER", "WEBLINKID", "URL", "ISREDIRECT"])
+        .from("WEBLINK")
+        .table()
+        .map(function ([placeholder, weblinkId, url, isRedirect])
+        {
+            if (Utils.toBoolean(isRedirect))
+            {
+                return new Placeholder(placeholder, Placeholder.types.FIXEDVALUE, baseUrl + "link=" + weblinkId + "&log=" + mail_logid);
+            }
+            return new Placeholder(placeholder, Placeholder.types.FIXEDVALUE, url);
+        });
+
+var webviewPlaceholder = new Placeholder("webview", Placeholder.types.FIXEDVALUE, aditoUrl+"/services/rest/webview_rest?" + "log=" + mail_logid);   
+
+var additionalPlaceholders = [webviewPlaceholder].concat(linkPlaceholders);
 
 var email = Email.fromTemplate(documentTemplateId, recipientContactId, null, additionalPlaceholders);
 email.subject = mailSubject;
-email.toRecipients = [CommUtil.getStandardMail(recipientContactId)];
+
+email.toRecipients = [recipientEmail];
 
 //if we use @@instanceId in the mail body to track the user interaction, we replace it here with the instance id
 email.body = email.body.replace("@@instanceId", processInstanceId);    
@@ -43,4 +61,31 @@ if(senderName)
 else
 {
     sendResult = email.send();  
-}
\ No newline at end of file
+}
+//create entrys in mail_log and mail_run for linktracking and because its needed for redirect webservice.
+var object_type = ContactUtils.getContextByContactId(recipientContactId);
+var mail_runid = util.getNewUUID();
+
+new SqlBuilder()
+    .tableName("MAIL_RUN")
+    .insertFields({
+            "MAIL_RUNID": mail_runid,
+            "OBJECT_ROWID": recipientContactId,
+            "OBJECT_TYPE": object_type,
+            "STATUS": $KeywordRegistry.bulkMailStatus$sent(),
+            "DATE_RUN_START":vars.get("$sys.date"),
+            "DATE_RUN_FINISHED":vars.get("$sys.date")});
+
+var status = sendResult? $KeywordRegistry.bulkMailRecipientStatus$sent():$KeywordRegistry.bulkMailRecipientStatus$failed();
+
+new SqlBuilder()
+    .tableName("MAIL_LOG")
+    .insertFields({
+        "MAIL_RUN_ID":mail_runid,
+        "MAIL_LOGID": mail_logid,
+        "CONTACT_ID":recipientContactId,
+        "DATE_SEND":vars.get("$sys.date"),
+        "STATUS":status,
+        "MAILING_SUBJECT":mailSubject,
+        "RECIPIENT_EMAIL":recipientEmail
+    });
\ No newline at end of file
diff --git a/process/SendEmail_workflowService/serviceTaskParameterProcess.js b/process/SendEmail_workflowService/serviceTaskParameterProcess.js
index b581232fe52bca0391382ac9cb294a7fe948f3c0..97c747ce1a1bb028ddd85afede4878a1c26d2084 100644
--- a/process/SendEmail_workflowService/serviceTaskParameterProcess.js
+++ b/process/SendEmail_workflowService/serviceTaskParameterProcess.js
@@ -8,6 +8,7 @@ import("Sql_lib");
 var templates = newSelect("DOCUMENTTEMPLATEID, NAME")
     .from("DOCUMENTTEMPLATE")
     .where("DOCUMENTTEMPLATE.KIND", $KeywordRegistry.documentTemplateType$mail())
+    .and("DOCUMENTTEMPLATE.CLASSIFICATION",$KeywordRegistry.documentTemplateTypeCategory$workflow())
     .table()
     .map(function (item) {return {id : item[0], name : item[1]};});
 
@@ -33,7 +34,7 @@ var parameters = [
     new WorkflowServiceTaskParameter("linkActionType", "Link action", WorkflowServiceTaskParameter.ENUM(), workflowLinkActionTypes, true)
 ];
 
-var currentValues = JSON.parse(vars.get("$local.value"));
+var currentValues = vars.get("$local.value");
 if (currentValues.linkActionType && currentValues.linkActionType.value)
 {
     parameters.push(new WorkflowServiceTaskParameter("redirectLink", "Link", WorkflowServiceTaskParameter.STRING()));
diff --git a/process/landingPage_rest/landingPage_rest.aod b/process/landingPage_rest/landingPage_rest.aod
new file mode 100644
index 0000000000000000000000000000000000000000..9b97d8d39bfe3c6dc41af737ce193cca5f59ed7e
--- /dev/null
+++ b/process/landingPage_rest/landingPage_rest.aod
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<process xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.2.2" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/process/1.2.2">
+  <name>landingPage_rest</name>
+  <majorModelMode>DISTRIBUTED</majorModelMode>
+  <process>%aditoprj%/process/landingPage_rest/process.js</process>
+  <publishAsWebservice v="true" />
+  <style>REST</style>
+  <loginTypeId>
+    <element>internal.none</element>
+  </loginTypeId>
+  <alias>Data_alias</alias>
+  <variants>
+    <element>EXECUTABLE</element>
+  </variants>
+</process>
diff --git a/process/landingPage_rest/process.js b/process/landingPage_rest/process.js
new file mode 100644
index 0000000000000000000000000000000000000000..0e6474f4b464e11102f723ea049703fdb8be6a6b
--- /dev/null
+++ b/process/landingPage_rest/process.js
@@ -0,0 +1,39 @@
+import("DocumentTemplate_lib");
+import("Email_lib");
+import("Sql_lib");
+import("Workflow_lib");
+import("Util_lib");
+import("system.util");
+import("Bulkmail_lib");
+
+function restget (pRequest)
+{
+    var request = JSON.parse(pRequest);
+    var documentTemplateId = request.query.documenttemplate;
+   
+   
+    if (documentTemplateId)
+    {
+        try 
+        {
+            var documentTemplate = DocumentTemplate.loadTemplate(documentTemplateId);
+
+            request.response.httpStatusCode = 200; //Ok
+            request.response.header["Content-Type"] = "text/html";
+            request.response.body = util.decodeBase64String(documentTemplate.content);
+   
+        } 
+        catch (ex) 
+        { 
+            request.response.httpStatusCode = 404; //not found
+        }   
+    }
+    else
+    {
+        request.response.httpStatusCode = 400; //bad request
+    }
+    
+    return JSON.stringify(request);
+}
+
+
diff --git a/process/register_rest/process.js b/process/register_rest/process.js
new file mode 100644
index 0000000000000000000000000000000000000000..9c9ae2bebdba0da5d71ba0cc4792b3ebcff016f6
--- /dev/null
+++ b/process/register_rest/process.js
@@ -0,0 +1,121 @@
+import("system.translate");
+import("system.workflow");
+import("system.vars");
+import("system.util");
+import("Sql_lib");
+import("system.entities");
+import("KeywordRegistry_basic");
+
+
+function restget (pRequest)
+{
+    var request = JSON.parse(pRequest);
+    var firstname = request.query.firstname;
+    var lastname = request.query.lastname;
+    var salutation = request.query.salutation;
+    var mailAddress = request.query.mailaddress;
+    var workflowKey = request.query.workflow;
+    
+    
+    if (mailAddress)
+    {
+        var contactid = _findPerson(firstname, lastname, mailAddress);
+        if (!contactid)
+        {
+           contactid = _insertPerson(firstname, lastname, mailAddress, salutation);       
+        }
+
+        if(workflowKey)
+        {
+            var origin =request.header["X-forwarded-proto"]+"://"+request.header["X-forwarded-host"]
+            var variables = {
+                "targetId":contactid,
+                "senderName" : "admin",
+                "recipientEmail":mailAddress,
+                "originUrl":origin.toString(),
+                "mailSubject":translate.text("Your newsletter registration")};
+            
+            workflow.startProcessByKey(workflowKey, variables);
+        }
+    }
+    return JSON.stringify(request);
+}
+
+
+function _findPerson(pFirstname, pLastname, pMailAddress)
+{
+
+    var contactId = newSelect("CONTACT.CONTACTID")
+    .from("CONTACT")
+    .join("PERSON","CONTACT.PERSON_ID = PERSON.PERSONID")
+    .join("COMMUNICATION","COMMUNICATION.CONTACT_ID = CONTACT.CONTACTID")
+    .whereIfSet("PERSON.FIRSTNAME",pFirstname)
+    .andIfSet("PERSON.LASTNAME",pLastname)
+    .and("COMMUNICATION.MEDIUM_ID",$KeywordRegistry.communicationMedium$mail())
+    .and("COMMUNICATION.ADDR",pMailAddress)
+    .cell();
+    
+    if (!contactId){
+        contactId = newSelect("CONTACT.CONTACTID")
+        .from("CONTACT")
+        .join("COMMUNICATION","COMMUNICATION.CONTACT_ID = CONTACT.CONTACTID")
+        .where("COMMUNICATION.MEDIUM_ID",$KeywordRegistry.communicationMedium$mail())
+        .and("COMMUNICATION.ADDR",pMailAddress)
+        .and("CONTACT.PERSON_ID is not null")
+        .cell();
+    }
+    
+    return contactId
+}
+
+
+function _insertPerson(pFirstname, pLastname, pMailAddress, pSalutation)
+{
+
+    var gender = newSelect("SEX")
+    .from("SALUTATION")
+    .whereIfSet("SALUTATION.SALUTATION", pSalutation)
+    .cell(true);
+
+    var organisationId = "0";
+    var contactId = util.getNewUUID();
+    var personId = util.getNewUUID();
+    
+    new SqlBuilder()
+        .tableName("CONTACT")
+        .insertFields({
+                "PERSON_ID": personId,
+                "CONTACTID": contactId,
+                "ORGANISATION_ID": organisationId,
+                "STATUS": $KeywordRegistry.contactStatus$active(),
+                "ISOLANGUAGE":"deu",
+                "DATE_NEW": vars.get("$sys.date"),
+                "USER_NEW": "register_rest"
+            });
+    
+    new SqlBuilder()
+        .tableName("PERSON")
+        .insertFields({
+            "PERSONID": personId,
+            "FIRSTNAME": pFirstname || "",
+            "LASTNAME" : pLastname,
+            "SALUTATION": pSalutation || "",
+            "GENDER": gender,
+            "USER_NEW": "register_rest",
+            "DATE_NEW": vars.get("$sys.date")
+        });
+        
+     new SqlBuilder()
+        .tableName("COMMUNICATION")
+        .insertFields({
+            "COMMUNICATIONID": util.getNewUUID(),
+            "CONTACT_ID" : contactId,
+            "MEDIUM_ID": $KeywordRegistry.communicationMedium$mail(),
+            "ADDR": pMailAddress,
+            "ISSTANDARD" : "1",
+            "USER_NEW": "register_rest",
+            "DATE_NEW": vars.get("$sys.date")
+        });
+        
+        return contactId;
+}
\ No newline at end of file
diff --git a/process/register_rest/register_rest.aod b/process/register_rest/register_rest.aod
new file mode 100644
index 0000000000000000000000000000000000000000..ada26f240e6b3701b5f1dab1fb97d1aa9a7b7f93
--- /dev/null
+++ b/process/register_rest/register_rest.aod
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<process xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.2.2" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/process/1.2.2">
+  <name>register_rest</name>
+  <majorModelMode>DISTRIBUTED</majorModelMode>
+  <process>%aditoprj%/process/register_rest/process.js</process>
+  <publishAsWebservice v="true" />
+  <style>REST</style>
+  <loginTypeId>
+    <element>internal.none</element>
+  </loginTypeId>
+  <jditoWebserviceUser>Admin</jditoWebserviceUser>
+  <alias>Data_alias</alias>
+  <variants>
+    <element>EXECUTABLE</element>
+  </variants>
+</process>