Skip to content
Snippets Groups Projects
Commit 418de9bd authored by Sebastian Listl's avatar Sebastian Listl :speech_balloon:
Browse files

1080981 Standard workflows

parent 0af1f045
No related branches found
No related tags found
No related merge requests found
Showing
with 281 additions and 18 deletions
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
<?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="unsubscribeInterest" name="Unsubscribe Interest" isExecutable="true">
<startEvent id="startEvent1" flowable:formFieldValidation="true"></startEvent>
<serviceTask id="sid-82168C15-ACC8-4369-A92F-A4F8A82EDDD7" name="Change interest link" flowable:class="de.adito.aditoweb.server.neon.workflow.WorkflowServiceTask">
<extensionElements>
<flowable:field name="jditoProcess">
<flowable:string><![CDATA[SetInterestLink_workflowService]]></flowable:string>
</flowable:field>
</extensionElements>
</serviceTask>
<sequenceFlow id="sid-7C8AD2EA-BD4C-4251-B369-DC80DA765953" sourceRef="startEvent1" targetRef="sid-82168C15-ACC8-4369-A92F-A4F8A82EDDD7"></sequenceFlow>
<endEvent id="sid-7C072C86-5A44-4054-833B-F7B39838C118"></endEvent>
<sequenceFlow id="sid-692F5534-B5CD-45AA-84DE-4BD5B0AC18BD" sourceRef="sid-82168C15-ACC8-4369-A92F-A4F8A82EDDD7" targetRef="sid-7C072C86-5A44-4054-833B-F7B39838C118"></sequenceFlow>
</process>
<bpmndi:BPMNDiagram id="BPMNDiagram_unsubscribeInterest">
<bpmndi:BPMNPlane bpmnElement="unsubscribeInterest" id="BPMNPlane_unsubscribeInterest">
<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-82168C15-ACC8-4369-A92F-A4F8A82EDDD7" id="BPMNShape_sid-82168C15-ACC8-4369-A92F-A4F8A82EDDD7">
<omgdc:Bounds height="80.0" width="100.0" x="175.0" y="138.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="sid-7C072C86-5A44-4054-833B-F7B39838C118" id="BPMNShape_sid-7C072C86-5A44-4054-833B-F7B39838C118">
<omgdc:Bounds height="28.0" width="28.0" x="332.5" y="164.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="sid-7C8AD2EA-BD4C-4251-B369-DC80DA765953" id="BPMNEdge_sid-7C8AD2EA-BD4C-4251-B369-DC80DA765953">
<omgdi:waypoint x="129.9499984899576" y="178.0"></omgdi:waypoint>
<omgdi:waypoint x="174.9999999999917" y="178.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sid-692F5534-B5CD-45AA-84DE-4BD5B0AC18BD" id="BPMNEdge_sid-692F5534-B5CD-45AA-84DE-4BD5B0AC18BD">
<omgdi:waypoint x="274.94999999998043" y="178.0"></omgdi:waypoint>
<omgdi:waypoint x="332.5" y="178.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>
\ No newline at end of file
...@@ -3,4 +3,5 @@ ...@@ -3,4 +3,5 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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"> 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_rejectEmailCommunication.xml"/> <include relativeToChangelogFile="true" file="insert_rejectEmailCommunication.xml"/>
<include relativeToChangelogFile="true" file="insert_unsubscribeInterest.xml"/>
</databaseChangeLog> </databaseChangeLog>
\ No newline at end of file
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<changeSet author="s.listl" id="e9e5f42b-5df9-430b-aaad-52ded69db85d"> <changeSet author="s.listl" id="e9e5f42b-5df9-430b-aaad-52ded69db85d">
<insert tableName="STANDARD_WORKFLOW"> <insert tableName="STANDARD_WORKFLOW">
<column name="STANDARD_WORKFLOWID" value="59d620ab-6dfc-4da7-b0ad-226fa78949e4"/> <column name="STANDARD_WORKFLOWID" value="59d620ab-6dfc-4da7-b0ad-226fa78949e4"/>
<column name="KEY" value="rejectEmailCommunication"/> <column name="PROCESSKEY" value="rejectEmailCommunication"/>
<column name="NAME" value="Reject email communication"/> <column name="NAME" value="Reject email communication"/>
<column name="DESCRIPTION" value="Sets a communication setting to reject emails"/> <column name="DESCRIPTION" value="Sets a communication setting to reject emails"/>
<column name="PROCESSXML" valueBlobFile="blob/rejectEmailCommunication.xml"/> <column name="PROCESSXML" valueBlobFile="blob/rejectEmailCommunication.xml"/>
......
<?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="s.listl" id="608978ed-2471-4c46-85cf-eeab044025b1">
<insert tableName="STANDARD_WORKFLOW">
<column name="STANDARD_WORKFLOWID" value="b14f9d59-b896-433c-a515-c6f209924efd"/>
<column name="PROCESSKEY" value="unsubscribeInterest"/>
<column name="NAME" value="Unsubscribe Interest"/>
<column name="DESCRIPTION" value="Sets an interest link with the status 'unsubscribed'"/>
<column name="PROCESSXML" valueBlobFile="blob/unsubscribeInterest.xml"/>
<column name="DIAGRAM" valueBlobFile="blob/unsubscribeInterest.png"/>
</insert>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
...@@ -20,10 +20,6 @@ ...@@ -20,10 +20,6 @@
<include relativeToChangelogFile="true" file="basic/2020.2.2/changelog.xml"/> <include relativeToChangelogFile="true" file="basic/2020.2.2/changelog.xml"/>
<include relativeToChangelogFile="true" file="basic/2020.2.3/changelog.xml"/> <include relativeToChangelogFile="true" file="basic/2020.2.3/changelog.xml"/>
<include relativeToChangelogFile="true" file="basic/2021.0.0/changelog.xml"/> <include relativeToChangelogFile="true" file="basic/2021.0.0/changelog.xml"/>
<include relativeToChangelogFile="true" file="basic/2021.0.1/changelog.xml"/>
<include relativeToChangelogFile="true" file="basic/2021.0.2/changelog.xml"/>
<include relativeToChangelogFile="true" file="basic/2021.0.3/changelog.xml"/>
<include relativeToChangelogFile="true" file="basic/2021.1.0/changelog.xml"/>
<include relativeToChangelogFile="true" file="basic/workflows/changelog.xml" context="workflow"/> <include relativeToChangelogFile="true" file="basic/workflows/changelog.xml" context="workflow"/>
<!--enable this only when you definetly want to overwrite the existing data with demo records:--> <!--enable this only when you definetly want to overwrite the existing data with demo records:-->
......
...@@ -122,8 +122,6 @@ ...@@ -122,8 +122,6 @@
<name>AnyContacts</name> <name>AnyContacts</name>
<dependency> <dependency>
<name>dependency</name> <name>dependency</name>
<entityName>AnyContact_entity</entityName>
<fieldName>ContactsByIds</fieldName>
</dependency> </dependency>
<children> <children>
<entityParameter> <entityParameter>
......
<?xml version="1.0" encoding="UTF-8"?> <?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.18" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.18"> <entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.21" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.21">
<name>StandardWorkflow_entity</name> <name>StandardWorkflow_entity</name>
<title>Standard workflow</title> <title>Standard workflow</title>
<majorModelMode>DISTRIBUTED</majorModelMode> <majorModelMode>DISTRIBUTED</majorModelMode>
<documentation>%aditoprj%/entity/StandardWorkflow_entity/documentation.adoc</documentation>
<grantCreate v="false" /> <grantCreate v="false" />
<grantUpdate v="false" /> <grantUpdate v="false" />
<grantDelete v="false" /> <grantDelete v="false" />
...@@ -11,14 +12,6 @@ ...@@ -11,14 +12,6 @@
<entityFields> <entityFields>
<entityProvider> <entityProvider>
<name>#PROVIDER</name> <name>#PROVIDER</name>
<dependencies>
<entityDependency>
<name>38e423c3-f0b2-48d6-a035-5b19c79591ac</name>
<entityName>WorkflowDefinitionStore_entity</entityName>
<fieldName>StandardWorkflows</fieldName>
<isConsumer v="false" />
</entityDependency>
</dependencies>
</entityProvider> </entityProvider>
<entityProvider> <entityProvider>
<name>#PROVIDER_AGGREGATES</name> <name>#PROVIDER_AGGREGATES</name>
......
= StandardWorkflow_entity
Standard workflows are stored in the table STANDARD_WORKFLOW. The table is filled exclusively by liquibase scripts, this entity is read-only.
<?xml version="1.0" encoding="UTF-8"?> <?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.18" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.18"> <entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.21" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.21">
<name>WorkflowDefinitionStore_entity</name> <name>WorkflowDefinitionStore_entity</name>
<title>Workflow definitions</title> <title>Workflow definitions</title>
<majorModelMode>DISTRIBUTED</majorModelMode> <majorModelMode>DISTRIBUTED</majorModelMode>
<documentation>%aditoprj%/entity/WorkflowDefinitionStore_entity/documentation.adoc</documentation>
<recordContainer>dataless</recordContainer> <recordContainer>dataless</recordContainer>
<entityFields> <entityFields>
<entityProvider> <entityProvider>
...@@ -32,7 +33,7 @@ ...@@ -32,7 +33,7 @@
</entityConsumer> </entityConsumer>
<entityActionField> <entityActionField>
<name>deploySelectedWorkflow</name> <name>deploySelectedWorkflow</name>
<title>Add selected</title> <title>Add selected workflow</title>
<onActionProcess>%aditoprj%/entity/WorkflowDefinitionStore_entity/entityfields/deployselectedworkflow/onActionProcess.js</onActionProcess> <onActionProcess>%aditoprj%/entity/WorkflowDefinitionStore_entity/entityfields/deployselectedworkflow/onActionProcess.js</onActionProcess>
<iconId>VAADIN:PLUS</iconId> <iconId>VAADIN:PLUS</iconId>
<stateProcess>%aditoprj%/entity/WorkflowDefinitionStore_entity/entityfields/deployselectedworkflow/stateProcess.js</stateProcess> <stateProcess>%aditoprj%/entity/WorkflowDefinitionStore_entity/entityfields/deployselectedworkflow/stateProcess.js</stateProcess>
...@@ -49,6 +50,13 @@ ...@@ -49,6 +50,13 @@
<contentType>BOOLEAN</contentType> <contentType>BOOLEAN</contentType>
<state>EDITABLE</state> <state>EDITABLE</state>
</entityField> </entityField>
<entityActionField>
<name>downloadSelectedWorkflow</name>
<title>Download selected workflow</title>
<onActionProcess>%aditoprj%/entity/WorkflowDefinitionStore_entity/entityfields/downloadselectedworkflow/onActionProcess.js</onActionProcess>
<iconId>VAADIN:DOWNLOAD</iconId>
<stateProcess>%aditoprj%/entity/WorkflowDefinitionStore_entity/entityfields/downloadselectedworkflow/stateProcess.js</stateProcess>
</entityActionField>
</entityFields> </entityFields>
<recordContainers> <recordContainers>
<datalessRecordContainer> <datalessRecordContainer>
......
= WorkflowDefinitionStore_entity
The purpose of this entity is to display all the standard workflow definitions that can be imported into the system. It provides an overlay
where the workflows can be selected and deployed with the actions of this entity.
Standard workflows are handled this way because the workflow engine is running inside its own service with an own database. That's why these workflows
cannot be inserted directly with liquibase. Instead, the standard workflows are stored in a database table on the ADITO side, and can be transferred
to the workflow service using this entity. An additional advantage of this solution is better flexibility, as it makes using the standard workflows
optional, the admin can choose in the client what workflow definitions to deploy.
\ No newline at end of file
import("system.neon");
import("system.util");
import("system.workflow");
import("Sql_lib");
import("system.vars");
var workflowId = vars.get("$field.selectedWorkflows");
var [name, processXml] = newSelect(["NAME", "PROCESSXML"])
.from("STANDARD_WORKFLOW")
.where("STANDARD_WORKFLOW.STANDARD_WORKFLOWID", workflowId)
.arrayRow();
neon.download(processXml, name + ".xml");
\ No newline at end of file
import("system.result");
import("system.vars");
import("system.neon");
var state = neon.COMPONENTSTATE_DISABLED;
if (vars.get("$field.selectedWorkflows"))
{
state = neon.COMPONENTSTATE_EDITABLE;
}
result.string(state);
\ No newline at end of file
...@@ -8632,6 +8632,63 @@ ...@@ -8632,6 +8632,63 @@
<entry> <entry>
<key>Global Cases </key> <key>Global Cases </key>
</entry> </entry>
<entry>
<key>Attributes of attribute group \"%0\" have to be used at least %1.</key>
</entry>
<entry>
<key>Attributes of attribute group \"%0\" can't be used more than %1.</key>
</entry>
<entry>
<key>Add selected workflow</key>
</entry>
<entry>
<key>Profiling</key>
</entry>
<entry>
<key>Add all</key>
</entry>
<entry>
<key>Standard workflow</key>
</entry>
<entry>
<key>Standard workflows</key>
</entry>
<entry>
<key>Global</key>
</entry>
<entry>
<key>Bounce (Soft)</key>
</entry>
<entry>
<key>Test1</key>
</entry>
<entry>
<key>Bounce (Hard)</key>
</entry>
<entry>
<key>Smart TV</key>
</entry>
<entry>
<key>Desktop</key>
</entry>
<entry>
<key>Download selected workflow</key>
</entry>
<entry>
<key>Send workflow signal</key>
</entry>
<entry>
<key>Tablet</key>
</entry>
<entry>
<key>Blacklist</key>
</entry>
<entry>
<key>SubTest1</key>
</entry>
<entry>
<key>Exclude existing workflows</key>
</entry>
</keyValueMap> </keyValueMap>
<font name="Dialog" style="0" size="11" /> <font name="Dialog" style="0" size="11" />
<sqlModels> <sqlModels>
......
...@@ -11347,6 +11347,63 @@ Bitte Datumseingabe prüfen</value> ...@@ -11347,6 +11347,63 @@ Bitte Datumseingabe prüfen</value>
<entry> <entry>
<key>Global Cases </key> <key>Global Cases </key>
</entry> </entry>
<entry>
<key>Add selected workflow</key>
<value>Ausgewählten Workflow hinzufügen</value>
</entry>
<entry>
<key>Profiling</key>
</entry>
<entry>
<key>Add all</key>
<value>Alle hinzufügen</value>
</entry>
<entry>
<key>Standard workflow</key>
<value>Standard Workflow</value>
</entry>
<entry>
<key>Standard workflows</key>
<value>Standard Workflows</value>
</entry>
<entry>
<key>Global</key>
</entry>
<entry>
<key>Bounce (Soft)</key>
</entry>
<entry>
<key>Test1</key>
</entry>
<entry>
<key>Bounce (Hard)</key>
</entry>
<entry>
<key>Smart TV</key>
</entry>
<entry>
<key>Desktop</key>
</entry>
<entry>
<key>Download selected workflow</key>
<value>Ausgewählten Workflow herunterladen</value>
</entry>
<entry>
<key>Send workflow signal</key>
</entry>
<entry>
<key>Tablet</key>
</entry>
<entry>
<key>Blacklist</key>
</entry>
<entry>
<key>SubTest1</key>
</entry>
<entry>
<key>Exclude existing workflows</key>
<value>Nur nicht vorhandene Workflows</value>
</entry>
</keyValueMap> </keyValueMap>
<font name="Dialog" style="0" size="11" /> <font name="Dialog" style="0" size="11" />
</language> </language>
...@@ -8717,6 +8717,63 @@ ...@@ -8717,6 +8717,63 @@
<entry> <entry>
<key>Global Cases </key> <key>Global Cases </key>
</entry> </entry>
<entry>
<key>Attributes of attribute group \"%0\" have to be used at least %1.</key>
</entry>
<entry>
<key>Attributes of attribute group \"%0\" can't be used more than %1.</key>
</entry>
<entry>
<key>Add selected workflow</key>
</entry>
<entry>
<key>Profiling</key>
</entry>
<entry>
<key>Add all</key>
</entry>
<entry>
<key>Standard workflow</key>
</entry>
<entry>
<key>Standard workflows</key>
</entry>
<entry>
<key>Global</key>
</entry>
<entry>
<key>Bounce (Soft)</key>
</entry>
<entry>
<key>Test1</key>
</entry>
<entry>
<key>Bounce (Hard)</key>
</entry>
<entry>
<key>Smart TV</key>
</entry>
<entry>
<key>Desktop</key>
</entry>
<entry>
<key>Download selected workflow</key>
</entry>
<entry>
<key>Send workflow signal</key>
</entry>
<entry>
<key>Tablet</key>
</entry>
<entry>
<key>Blacklist</key>
</entry>
<entry>
<key>SubTest1</key>
</entry>
<entry>
<key>Exclude existing workflows</key>
</entry>
</keyValueMap> </keyValueMap>
<font name="Dialog" style="0" size="11" /> <font name="Dialog" style="0" size="11" />
</language> </language>
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
<name>Actions</name> <name>Actions</name>
<actions> <actions>
<element>deploySelectedWorkflow</element> <element>deploySelectedWorkflow</element>
<element>downloadSelectedWorkflow</element>
<element>deployAllWorkflows</element> <element>deployAllWorkflows</element>
</actions> </actions>
</actionsViewTemplate> </actionsViewTemplate>
......
...@@ -6,6 +6,14 @@ import("Sql_lib"); ...@@ -6,6 +6,14 @@ import("Sql_lib");
var variables = JSON.parse(vars.get("$local.value")); var variables = JSON.parse(vars.get("$local.value"));
var contactId = variables.contactId || variables.targetId; var contactId = variables.contactId || variables.targetId;
var interestId = variables.interestId; var interestId = variables.interestId;
if (!interestId && variables.mailLogId)
{
interestId = newSelect("MAIL_RUN.INTERESTID")
.from("MAIL_LOG")
.join("MAIL_RUN", "MAIL_LOG.MAIL_RUN_ID = MAIL_RUN.MAIL_RUNID")
.where("MAIL_LOG.MAIL_LOGID", variables.mailLogId)
.cell();
}
var status = variables.status || $KeywordRegistry.interestLinkStatus$notSubscribed(); var status = variables.status || $KeywordRegistry.interestLinkStatus$notSubscribed();
var interestLinkId = new SqlBuilder() var interestLinkId = new SqlBuilder()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment