diff --git a/.aditoprj/blueprints/CreateObservationActionBlueprint.xml b/.aditoprj/blueprints/CreateObservationActionBlueprint.xml new file mode 100644 index 0000000000000000000000000000000000000000..21f989f10c424baeccf3e1aa48e95b9d32652082 --- /dev/null +++ b/.aditoprj/blueprints/CreateObservationActionBlueprint.xml @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<blueprint name="Create ObserveActions"> + <type>entityActionField</type> + <parameters> + </parameters> + <data> + <document name="context"><![CDATA[ + <entity VERSION="1.3.17"> + <entityFields> + <entityActionGroup> + <name>observeActionGroup</name> + <children> + <entityActionField> + <name>observe</name> + <title>Observe</title> + <onActionProcess>import("Observation_lib"); + +Observation.insertAction();</onActionProcess> + <isObjectAction v="true" /> + <iconId>VAADIN:EYE</iconId> + <stateProcess>import("system.result"); +import("Observation_lib"); +import("system.neon"); + +if (!Observation.countObservations()) +{ + result.string(neon.COMPONENTSTATE_EDITABLE); +} +else +{ + result.string(neon.COMPONENTSTATE_INVISIBLE); +}</stateProcess> + <titleProcess>import("system.result"); +import("Observation_lib"); +import("system.vars"); + +result.string(Observation.observeActionTitle(vars.get("$sys.selection"))); +</titleProcess> + </entityActionField> + <entityActionField> + <name>cancelObservation</name> + <onActionProcess>import("Observation_lib"); + +Observation.cancelAction();</onActionProcess> + <iconId>VAADIN:EYE_SLASH</iconId> + <stateProcess>import("system.result"); +import("Observation_lib"); +import("system.neon"); + +if (Observation.countObservations()) +{ + result.string(neon.COMPONENTSTATE_EDITABLE); +} +else +{ + result.string(neon.COMPONENTSTATE_INVISIBLE); +}</stateProcess> + <titleProcess>import("system.result"); +import("system.vars"); +import("Observation_lib"); + +result.string(Observation.cancelActionTitle(vars.get("$sys.selection"))); +</titleProcess> + </entityActionField> + </children> + </entityActionGroup> + </entityFields> + </entity> + ]]></document> + </data> +</blueprint> diff --git a/.liquibase/Data_alias/basic/2021.0.0/Observation/CreateObservation.xml b/.liquibase/Data_alias/basic/2021.0.0/Observation/CreateObservation.xml new file mode 100644 index 0000000000000000000000000000000000000000..4ff46cb083171a465fbd24a3e425fb49dceed102 --- /dev/null +++ b/.liquibase/Data_alias/basic/2021.0.0/Observation/CreateObservation.xml @@ -0,0 +1,36 @@ +<?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.pongratz" id="e7212711-2d85-4e5a-b215-0bbbeed9d538"> + <createTable tableName="OBSERVATION"> + <column name="OBSERVATIONID" type="CHAR(36)"> + <constraints primaryKey="true" primaryKeyName="PK_OBSERVATION_OBSERVATIONID"/> + </column> + <column name="OBSERVATION_ID" type="CHAR(36)" /> + + <column name="OBSERVER" type="NVARCHAR(63)" > + <constraints nullable="false"/> + </column> + <column name="OBJECT_TYPE" type="NVARCHAR(80)"> + <constraints nullable="false"/> + </column> + + <column name="OBJECT_ID" type="VARCHAR(63)" /> + <column name="OBJECT_FILTER" type="NCLOB" /> + + <column name="OBJECT_FIELD" type="NCLOB" /> + + <column name="NOTIFICATION_PRIO" type="NVARCHAR(36)" /> + + <column name="TRIGGEREVENTUPDATE" type="TINYINT"/> + <column name="TRIGGEREVENTDELETE" type="TINYINT"/> + <column name="TRIGGEREVENTINSERT" type="TINYINT"/> + + <column name="USER_NEW" type="NVARCHAR(50)" /> + <column name="DATE_NEW" type="DATETIME" /> + <column name="USER_EDIT" type="NVARCHAR(50)" /> + <column name="DATE_EDIT" type="DATETIME" /> + </createTable> + </changeSet> +</databaseChangeLog> \ No newline at end of file diff --git a/.liquibase/Data_alias/basic/2021.0.0/Observation/changelog.xml b/.liquibase/Data_alias/basic/2021.0.0/Observation/changelog.xml new file mode 100644 index 0000000000000000000000000000000000000000..44639ff557273d3b9efc4b179789c33401c28be8 --- /dev/null +++ b/.liquibase/Data_alias/basic/2021.0.0/Observation/changelog.xml @@ -0,0 +1,6 @@ +<?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="CreateObservation.xml"/> +</databaseChangeLog> \ No newline at end of file diff --git a/.liquibase/Data_alias/basic/2021.0.0/changelog.xml b/.liquibase/Data_alias/basic/2021.0.0/changelog.xml index c698b278b7ac94cc32aaafb362d2c9895d4f384f..03214d04dddb56df6468be7627898c61bed335e3 100644 --- a/.liquibase/Data_alias/basic/2021.0.0/changelog.xml +++ b/.liquibase/Data_alias/basic/2021.0.0/changelog.xml @@ -1,8 +1,9 @@ <?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="Observation/changelog.xml"/> <include relativeToChangelogFile="true" file="Classification/changelog.xml"/> <include relativeToChangelogFile="true" file="Visit/changelog.xml"/> <include relativeToChangelogFile="true" file="UpdateAddrFormats.xml"/> <include relativeToChangelogFile="true" file="Address/addLatLonIndizes.xml"/> -</databaseChangeLog> +</databaseChangeLog> \ No newline at end of file diff --git a/entity/ActivityLink_entity/ActivityLink_entity.aod b/entity/ActivityLink_entity/ActivityLink_entity.aod index 7603602585dc40819b65359733ab6f6a5773002a..a03c86a0d4e03edf89961c0dd1727394d75440e5 100644 --- a/entity/ActivityLink_entity/ActivityLink_entity.aod +++ b/entity/ActivityLink_entity/ActivityLink_entity.aod @@ -108,6 +108,9 @@ <name>db</name> <alias>Data_alias</alias> <conditionProcess>%aditoprj%/entity/ActivityLink_entity/recordcontainers/db/conditionProcess.js</conditionProcess> + <onDBInsert>%aditoprj%/entity/ActivityLink_entity/recordcontainers/db/onDBInsert.js</onDBInsert> + <onDBUpdate>%aditoprj%/entity/ActivityLink_entity/recordcontainers/db/onDBUpdate.js</onDBUpdate> + <onDBDelete>%aditoprj%/entity/ActivityLink_entity/recordcontainers/db/onDBDelete.js</onDBDelete> <linkInformation> <linkInformation> <name>66f9eb3e-6f56-4731-a868-ffc9ffcce340</name> diff --git a/entity/ActivityLink_entity/recordcontainers/db/onDBDelete.js b/entity/ActivityLink_entity/recordcontainers/db/onDBDelete.js new file mode 100644 index 0000000000000000000000000000000000000000..6ff91a5eb319120b527776868367d3cdb0f445f1 --- /dev/null +++ b/entity/ActivityLink_entity/recordcontainers/db/onDBDelete.js @@ -0,0 +1,3 @@ +import("Workflow_lib"); + +WorkflowSignalSender.deleted(); \ No newline at end of file diff --git a/entity/ActivityLink_entity/recordcontainers/db/onDBInsert.js b/entity/ActivityLink_entity/recordcontainers/db/onDBInsert.js new file mode 100644 index 0000000000000000000000000000000000000000..54f0349c9f1ddaab6b25f85f758d52928df41847 --- /dev/null +++ b/entity/ActivityLink_entity/recordcontainers/db/onDBInsert.js @@ -0,0 +1,3 @@ +import("Workflow_lib"); + +WorkflowSignalSender.inserted(); \ No newline at end of file diff --git a/entity/ActivityLink_entity/recordcontainers/db/onDBUpdate.js b/entity/ActivityLink_entity/recordcontainers/db/onDBUpdate.js new file mode 100644 index 0000000000000000000000000000000000000000..2e53f3cad9a9edf21cc5bbc6fdecc00c5001dfee --- /dev/null +++ b/entity/ActivityLink_entity/recordcontainers/db/onDBUpdate.js @@ -0,0 +1,3 @@ +import("Workflow_lib"); + +WorkflowSignalSender.updated(); \ No newline at end of file diff --git a/entity/Activity_entity/Activity_entity.aod b/entity/Activity_entity/Activity_entity.aod index ddb1971da5fe2dd72dba504187bbf76b890f6bf9..a6bcb8b4a537bdc4c08cf30d599a9b8bf7b8bbf2 100644 --- a/entity/Activity_entity/Activity_entity.aod +++ b/entity/Activity_entity/Activity_entity.aod @@ -339,21 +339,6 @@ <fieldName>TreeProviders</fieldName> </dependency> </entityConsumer> - <entityActionField> - <name>newActivity</name> - <title>New activity</title> - <onActionProcess>%aditoprj%/entity/Activity_entity/entityfields/newactivity/onActionProcess.js</onActionProcess> - <iconId>VAADIN:HOURGLASS_END</iconId> - <tooltip>New activity</tooltip> - <tooltipProcess>%aditoprj%/entity/Activity_entity/entityfields/newactivity/tooltipProcess.js</tooltipProcess> - </entityActionField> - <entityActionField> - <name>newTask</name> - <title>New task</title> - <onActionProcess>%aditoprj%/entity/Activity_entity/entityfields/newtask/onActionProcess.js</onActionProcess> - <actionOrder v="1" /> - <iconId>VAADIN:TASKS</iconId> - </entityActionField> <entityParameter> <name>ParentId_param</name> <expose v="true" /> @@ -415,13 +400,6 @@ <fieldName>AttributeRelations</fieldName> </dependency> </entityConsumer> - <entityActionField> - <name>newOffer</name> - <title>New offer</title> - <onActionProcess>%aditoprj%/entity/Activity_entity/entityfields/newoffer/onActionProcess.js</onActionProcess> - <actionOrder v="0" /> - <iconId>VAADIN:CART</iconId> - </entityActionField> <entityConsumer> <name>Employees</name> <dependency> @@ -489,19 +467,6 @@ <fieldName>LinkedAppointments</fieldName> </dependency> </entityConsumer> - <entityActionField> - <name>newSupportticket</name> - <title>New Support ticket</title> - <onActionProcess>%aditoprj%/entity/Activity_entity/entityfields/newsupportticket/onActionProcess.js</onActionProcess> - <iconId>VAADIN:CHAT</iconId> - </entityActionField> - <entityActionField> - <name>openAdminView</name> - <title>Open admin view</title> - <onActionProcess>%aditoprj%/entity/Activity_entity/entityfields/openadminview/onActionProcess.js</onActionProcess> - <iconId>VAADIN:CURLY_BRACKETS</iconId> - <stateProcess>%aditoprj%/entity/Activity_entity/entityfields/openadminview/stateProcess.js</stateProcess> - </entityActionField> <entityParameter> <name>PresetDocuments_param</name> <expose v="true" /> @@ -589,19 +554,6 @@ <fieldName>LogHistoryProvider</fieldName> </dependency> </entityConsumer> - <entityActionGroup> - <name>MSTeamsActions</name> - <title>MS Teams</title> - <state>EDITABLE</state> - <stateProcess>%aditoprj%/entity/Activity_entity/entityfields/msteamsactions/stateProcess.js</stateProcess> - <children> - <entityActionField> - <name>importFromTeams</name> - <title>Import from Teams</title> - <onActionProcess>%aditoprj%/entity/Activity_entity/entityfields/msteamsactions/children/importfromteams/onActionProcess.js</onActionProcess> - </entityActionField> - </children> - </entityActionGroup> <entityParameter> <name>Category_param</name> <expose v="true" /> @@ -703,6 +655,75 @@ </entityParameter> </children> </entityProvider> + <entityActionGroup> + <name>MSTeamsActions</name> + <title>MS Teams</title> + <state>EDITABLE</state> + <stateProcess>%aditoprj%/entity/Activity_entity/entityfields/msteamsactions/stateProcess.js</stateProcess> + <children> + <entityActionField> + <name>importFromTeams</name> + <title>Import from Teams</title> + <onActionProcess>%aditoprj%/entity/Activity_entity/entityfields/msteamsactions/children/importfromteams/onActionProcess.js</onActionProcess> + </entityActionField> + </children> + </entityActionGroup> + <entityActionField> + <name>newActivity</name> + <title>New activity</title> + <onActionProcess>%aditoprj%/entity/Activity_entity/entityfields/newactivity/onActionProcess.js</onActionProcess> + <iconId>VAADIN:HOURGLASS_END</iconId> + <tooltip>New activity</tooltip> + <tooltipProcess>%aditoprj%/entity/Activity_entity/entityfields/newactivity/tooltipProcess.js</tooltipProcess> + </entityActionField> + <entityActionField> + <name>newTask</name> + <title>New task</title> + <onActionProcess>%aditoprj%/entity/Activity_entity/entityfields/newtask/onActionProcess.js</onActionProcess> + <actionOrder v="1" /> + <iconId>VAADIN:TASKS</iconId> + </entityActionField> + <entityActionField> + <name>newOffer</name> + <title>New offer</title> + <onActionProcess>%aditoprj%/entity/Activity_entity/entityfields/newoffer/onActionProcess.js</onActionProcess> + <actionOrder v="0" /> + <iconId>VAADIN:CART</iconId> + </entityActionField> + <entityActionField> + <name>newSupportticket</name> + <title>New Support ticket</title> + <onActionProcess>%aditoprj%/entity/Activity_entity/entityfields/newsupportticket/onActionProcess.js</onActionProcess> + <iconId>VAADIN:CHAT</iconId> + </entityActionField> + <entityActionField> + <name>openAdminView</name> + <title>Open admin view</title> + <onActionProcess>%aditoprj%/entity/Activity_entity/entityfields/openadminview/onActionProcess.js</onActionProcess> + <iconId>VAADIN:CURLY_BRACKETS</iconId> + <stateProcess>%aditoprj%/entity/Activity_entity/entityfields/openadminview/stateProcess.js</stateProcess> + </entityActionField> + <entityActionGroup> + <name>filterActions</name> + <children> + <entityActionField> + <name>cancelObservation</name> + <onActionProcess>%aditoprj%/entity/Activity_entity/entityfields/filteractions/children/cancelobservation/onActionProcess.js</onActionProcess> + <iconId>VAADIN:EYE_SLASH</iconId> + <stateProcess>%aditoprj%/entity/Activity_entity/entityfields/filteractions/children/cancelobservation/stateProcess.js</stateProcess> + <titleProcess>%aditoprj%/entity/Activity_entity/entityfields/filteractions/children/cancelobservation/titleProcess.js</titleProcess> + </entityActionField> + <entityActionField> + <name>observe</name> + <title>Observe</title> + <onActionProcess>%aditoprj%/entity/Activity_entity/entityfields/filteractions/children/observe/onActionProcess.js</onActionProcess> + <isObjectAction v="true" /> + <iconId>VAADIN:EYE</iconId> + <stateProcess>%aditoprj%/entity/Activity_entity/entityfields/filteractions/children/observe/stateProcess.js</stateProcess> + <titleProcess>%aditoprj%/entity/Activity_entity/entityfields/filteractions/children/observe/titleProcess.js</titleProcess> + </entityActionField> + </children> + </entityActionGroup> </entityFields> <recordContainers> <dbRecordContainer> diff --git a/entity/Activity_entity/entityfields/filteractions/children/cancelobservation/onActionProcess.js b/entity/Activity_entity/entityfields/filteractions/children/cancelobservation/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..35102b677cbb52d1d4a9723a42cceaef3fd5ea03 --- /dev/null +++ b/entity/Activity_entity/entityfields/filteractions/children/cancelobservation/onActionProcess.js @@ -0,0 +1,3 @@ +import("Observation_lib"); + +Observation.cancelAction(); \ No newline at end of file diff --git a/entity/Activity_entity/entityfields/filteractions/children/cancelobservation/stateProcess.js b/entity/Activity_entity/entityfields/filteractions/children/cancelobservation/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..9a0350f5edebe397b96a84766e7cdb8d99f77ee5 --- /dev/null +++ b/entity/Activity_entity/entityfields/filteractions/children/cancelobservation/stateProcess.js @@ -0,0 +1,8 @@ +import("system.result"); +import("Observation_lib"); +import("system.neon"); + +if (Observation.countObservations()) + result.string(neon.COMPONENTSTATE_EDITABLE); +else + result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file diff --git a/entity/Activity_entity/entityfields/filteractions/children/cancelobservation/titleProcess.js b/entity/Activity_entity/entityfields/filteractions/children/cancelobservation/titleProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..87553a373a055879a524774695e4c18bcab617e9 --- /dev/null +++ b/entity/Activity_entity/entityfields/filteractions/children/cancelobservation/titleProcess.js @@ -0,0 +1,5 @@ +import("system.result"); +import("system.vars"); +import("Observation_lib"); + +result.string(Observation.cancelActionTitle(vars.get("$sys.selection"))); \ No newline at end of file diff --git a/entity/Activity_entity/entityfields/filteractions/children/observe/onActionProcess.js b/entity/Activity_entity/entityfields/filteractions/children/observe/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..66cf7bc2991c142ee0753fec88e151d3dcf71141 --- /dev/null +++ b/entity/Activity_entity/entityfields/filteractions/children/observe/onActionProcess.js @@ -0,0 +1,3 @@ +import("Observation_lib"); + +Observation.insertAction(); \ No newline at end of file diff --git a/entity/Activity_entity/entityfields/filteractions/children/observe/stateProcess.js b/entity/Activity_entity/entityfields/filteractions/children/observe/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..461276ea5e1e98e967047207ac6d654225a1b1c6 --- /dev/null +++ b/entity/Activity_entity/entityfields/filteractions/children/observe/stateProcess.js @@ -0,0 +1,8 @@ +import("system.result"); +import("Observation_lib"); +import("system.neon"); + +if (!Observation.countObservations()) + result.string(neon.COMPONENTSTATE_EDITABLE); +else + result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file diff --git a/entity/Activity_entity/entityfields/filteractions/children/observe/titleProcess.js b/entity/Activity_entity/entityfields/filteractions/children/observe/titleProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..abdfbd3d7c4aff7beba9ff22cbb39abc8d195a30 --- /dev/null +++ b/entity/Activity_entity/entityfields/filteractions/children/observe/titleProcess.js @@ -0,0 +1,5 @@ +import("system.result"); +import("Observation_lib"); +import("system.vars"); + +result.string(Observation.observeActionTitle(vars.get("$sys.selection"))); \ No newline at end of file diff --git a/entity/Address_entity/Address_entity.aod b/entity/Address_entity/Address_entity.aod index c6e2d95af9f9ed239aa78778b427aa164d21695c..13623adbb39d911371dd9e5aecb2688555b65b32 100644 --- a/entity/Address_entity/Address_entity.aod +++ b/entity/Address_entity/Address_entity.aod @@ -496,6 +496,7 @@ <orderClauseProcess>%aditoprj%/entity/Address_entity/recordcontainers/db/orderClauseProcess.js</orderClauseProcess> <onDBInsert>%aditoprj%/entity/Address_entity/recordcontainers/db/onDBInsert.js</onDBInsert> <onDBUpdate>%aditoprj%/entity/Address_entity/recordcontainers/db/onDBUpdate.js</onDBUpdate> + <onDBDelete>%aditoprj%/entity/Address_entity/recordcontainers/db/onDBDelete.js</onDBDelete> <linkInformation> <linkInformation> <name>6a0005cc-c64b-4044-9712-c9d00f02d7a8</name> diff --git a/entity/Address_entity/recordcontainers/db/onDBDelete.js b/entity/Address_entity/recordcontainers/db/onDBDelete.js new file mode 100644 index 0000000000000000000000000000000000000000..6ff91a5eb319120b527776868367d3cdb0f445f1 --- /dev/null +++ b/entity/Address_entity/recordcontainers/db/onDBDelete.js @@ -0,0 +1,3 @@ +import("Workflow_lib"); + +WorkflowSignalSender.deleted(); \ No newline at end of file diff --git a/entity/Address_entity/recordcontainers/db/onDBInsert.js b/entity/Address_entity/recordcontainers/db/onDBInsert.js index ac6e09eee06255c378346ac58f1c219f5b7670fb..cddb15a9f8fd75177c6a219a72f240d56a1b257b 100644 --- a/entity/Address_entity/recordcontainers/db/onDBInsert.js +++ b/entity/Address_entity/recordcontainers/db/onDBInsert.js @@ -1,3 +1,4 @@ +import("Workflow_lib"); import("Sql_lib"); import("system.logging"); import("KeywordRegistry_basic"); @@ -59,4 +60,6 @@ if (addressLocation) "LAT": addressLocation.lat, "LON": addressLocation.lon }); -} \ No newline at end of file +} + +WorkflowSignalSender.inserted(); \ No newline at end of file diff --git a/entity/Address_entity/recordcontainers/db/onDBUpdate.js b/entity/Address_entity/recordcontainers/db/onDBUpdate.js index 80e0c649be5a71951c695bfc2e3eda0f29f9048c..87c3f2c27180a26dfb2d548acf385067807800a8 100644 --- a/entity/Address_entity/recordcontainers/db/onDBUpdate.js +++ b/entity/Address_entity/recordcontainers/db/onDBUpdate.js @@ -1,3 +1,4 @@ +import("Workflow_lib"); import("Sql_lib"); import("Location_lib"); import("Address_lib"); @@ -28,4 +29,6 @@ if (isAddressChanged) "LON": addressLocation.lon }); } -} \ No newline at end of file +} + +WorkflowSignalSender.updated(); \ No newline at end of file diff --git a/entity/AttributeRelation_entity/AttributeRelation_entity.aod b/entity/AttributeRelation_entity/AttributeRelation_entity.aod index 6a92d5391d81f8fb81e4968db71c7f66ee112989..b5b408f91f1ee88b9c244c34927e14a52de04824 100644 --- a/entity/AttributeRelation_entity/AttributeRelation_entity.aod +++ b/entity/AttributeRelation_entity/AttributeRelation_entity.aod @@ -6,6 +6,7 @@ <title>Attribute</title> <grantUpdateProcess>%aditoprj%/entity/AttributeRelation_entity/grantUpdateProcess.js</grantUpdateProcess> <grantDeleteProcess>%aditoprj%/entity/AttributeRelation_entity/grantDeleteProcess.js</grantDeleteProcess> + <contentTitleProcess>%aditoprj%/entity/AttributeRelation_entity/contentTitleProcess.js</contentTitleProcess> <titlePlural>Attributes</titlePlural> <recordContainer>jdito</recordContainer> <entityFields> @@ -168,6 +169,7 @@ <children> <entityParameter> <name>GetTree_param</name> + <valueProcess>%aditoprj%/entity/AttributeRelation_entity/entityfields/attributerelations/children/gettree_param/valueProcess.js</valueProcess> <expose v="false" /> </entityParameter> </children> diff --git a/entity/AttributeRelation_entity/contentTitleProcess.js b/entity/AttributeRelation_entity/contentTitleProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..07a93ad61aa87f8fab38a45da2f8c5f879e47b73 --- /dev/null +++ b/entity/AttributeRelation_entity/contentTitleProcess.js @@ -0,0 +1,6 @@ +import("system.vars"); +import("system.result"); +import("Attribute_lib"); + +result.string(AttributeUtil.getFullAttributeName( + vars.get("$field.AB_ATTRIBUTE_ID"), false, true )); diff --git a/entity/AttributeRelation_entity/entityfields/attributerelations/children/gettree_param/valueProcess.js b/entity/AttributeRelation_entity/entityfields/attributerelations/children/gettree_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/entity/AttributeRelation_entity/recordcontainers/jdito/contentProcess.js b/entity/AttributeRelation_entity/recordcontainers/jdito/contentProcess.js index b5337ee20f4280c527eacf1890f5f42399537096..67c301db12e38dc4a793e97a6bd35cf77895ca29 100644 --- a/entity/AttributeRelation_entity/recordcontainers/jdito/contentProcess.js +++ b/entity/AttributeRelation_entity/recordcontainers/jdito/contentProcess.js @@ -204,7 +204,10 @@ attributeRelations = attributeRelations.map(function (row) ]; }); -minCountInsurance.loadMinCounts(objectType); +if (objectType){ + minCountInsurance.loadMinCounts(objectType); +} + attributeRelations.forEach(function (attributeRelation) { var attrId = attributeRelation[4]; diff --git a/entity/Campaign_entity/Campaign_entity.aod b/entity/Campaign_entity/Campaign_entity.aod index 0fba3da6c0fe603c6ec1051bd827ebd09ee38bde..1c9ab608217f2bcf30c094ec942da7c85daaf33f 100644 --- a/entity/Campaign_entity/Campaign_entity.aod +++ b/entity/Campaign_entity/Campaign_entity.aod @@ -23,6 +23,27 @@ <titlePlural>Campaigns</titlePlural> <recordContainer>db</recordContainer> <entityFields> + <entityActionGroup> + <name>observeActionGroup</name> + <children> + <entityActionField> + <name>observe</name> + <title>Observe</title> + <onActionProcess>%aditoprj%/entity/Campaign_entity/entityfields/observeactiongroup/children/observe/onActionProcess.js</onActionProcess> + <isObjectAction v="true" /> + <iconId>VAADIN:EYE</iconId> + <stateProcess>%aditoprj%/entity/Campaign_entity/entityfields/observeactiongroup/children/observe/stateProcess.js</stateProcess> + <titleProcess>%aditoprj%/entity/Campaign_entity/entityfields/observeactiongroup/children/observe/titleProcess.js</titleProcess> + </entityActionField> + <entityActionField> + <name>cancelObservation</name> + <onActionProcess>%aditoprj%/entity/Campaign_entity/entityfields/observeactiongroup/children/cancelobservation/onActionProcess.js</onActionProcess> + <iconId>VAADIN:EYE_SLASH</iconId> + <stateProcess>%aditoprj%/entity/Campaign_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js</stateProcess> + <titleProcess>%aditoprj%/entity/Campaign_entity/entityfields/observeactiongroup/children/cancelobservation/titleProcess.js</titleProcess> + </entityActionField> + </children> + </entityActionGroup> <entityProvider> <name>#PROVIDER</name> <dependencies> diff --git a/entity/Campaign_entity/entityfields/observeactiongroup/children/cancelobservation/onActionProcess.js b/entity/Campaign_entity/entityfields/observeactiongroup/children/cancelobservation/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..35102b677cbb52d1d4a9723a42cceaef3fd5ea03 --- /dev/null +++ b/entity/Campaign_entity/entityfields/observeactiongroup/children/cancelobservation/onActionProcess.js @@ -0,0 +1,3 @@ +import("Observation_lib"); + +Observation.cancelAction(); \ No newline at end of file diff --git a/entity/Campaign_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js b/entity/Campaign_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..9a0350f5edebe397b96a84766e7cdb8d99f77ee5 --- /dev/null +++ b/entity/Campaign_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js @@ -0,0 +1,8 @@ +import("system.result"); +import("Observation_lib"); +import("system.neon"); + +if (Observation.countObservations()) + result.string(neon.COMPONENTSTATE_EDITABLE); +else + result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file diff --git a/entity/Campaign_entity/entityfields/observeactiongroup/children/cancelobservation/titleProcess.js b/entity/Campaign_entity/entityfields/observeactiongroup/children/cancelobservation/titleProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..87553a373a055879a524774695e4c18bcab617e9 --- /dev/null +++ b/entity/Campaign_entity/entityfields/observeactiongroup/children/cancelobservation/titleProcess.js @@ -0,0 +1,5 @@ +import("system.result"); +import("system.vars"); +import("Observation_lib"); + +result.string(Observation.cancelActionTitle(vars.get("$sys.selection"))); \ No newline at end of file diff --git a/entity/Campaign_entity/entityfields/observeactiongroup/children/observe/onActionProcess.js b/entity/Campaign_entity/entityfields/observeactiongroup/children/observe/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..66cf7bc2991c142ee0753fec88e151d3dcf71141 --- /dev/null +++ b/entity/Campaign_entity/entityfields/observeactiongroup/children/observe/onActionProcess.js @@ -0,0 +1,3 @@ +import("Observation_lib"); + +Observation.insertAction(); \ No newline at end of file diff --git a/entity/Campaign_entity/entityfields/observeactiongroup/children/observe/stateProcess.js b/entity/Campaign_entity/entityfields/observeactiongroup/children/observe/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..461276ea5e1e98e967047207ac6d654225a1b1c6 --- /dev/null +++ b/entity/Campaign_entity/entityfields/observeactiongroup/children/observe/stateProcess.js @@ -0,0 +1,8 @@ +import("system.result"); +import("Observation_lib"); +import("system.neon"); + +if (!Observation.countObservations()) + result.string(neon.COMPONENTSTATE_EDITABLE); +else + result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file diff --git a/entity/Campaign_entity/entityfields/observeactiongroup/children/observe/titleProcess.js b/entity/Campaign_entity/entityfields/observeactiongroup/children/observe/titleProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..abdfbd3d7c4aff7beba9ff22cbb39abc8d195a30 --- /dev/null +++ b/entity/Campaign_entity/entityfields/observeactiongroup/children/observe/titleProcess.js @@ -0,0 +1,5 @@ +import("system.result"); +import("Observation_lib"); +import("system.vars"); + +result.string(Observation.observeActionTitle(vars.get("$sys.selection"))); \ No newline at end of file diff --git a/entity/CommRestriction_Entity/CommRestriction_Entity.aod b/entity/CommRestriction_Entity/CommRestriction_Entity.aod index 407e45312848c4daf741f99d7df616f30754ca5b..00537fadd1ac275a047f057f57e58bc57a71b2f7 100644 --- a/entity/CommRestriction_Entity/CommRestriction_Entity.aod +++ b/entity/CommRestriction_Entity/CommRestriction_Entity.aod @@ -4,6 +4,7 @@ <majorModelMode>DISTRIBUTED</majorModelMode> <documentation>%aditoprj%/entity/CommRestriction_Entity/documentation.adoc</documentation> <title>Advertising ban</title> + <contentTitleProcess>%aditoprj%/entity/CommRestriction_Entity/contentTitleProcess.js</contentTitleProcess> <titlePlural>Advertising bans</titlePlural> <recordContainer>db</recordContainer> <entityFields> @@ -125,6 +126,9 @@ <name>db</name> <alias>Data_alias</alias> <conditionProcess>%aditoprj%/entity/CommRestriction_Entity/recordcontainers/db/conditionProcess.js</conditionProcess> + <onDBInsert>%aditoprj%/entity/CommRestriction_Entity/recordcontainers/db/onDBInsert.js</onDBInsert> + <onDBUpdate>%aditoprj%/entity/CommRestriction_Entity/recordcontainers/db/onDBUpdate.js</onDBUpdate> + <onDBDelete>%aditoprj%/entity/CommRestriction_Entity/recordcontainers/db/onDBDelete.js</onDBDelete> <linkInformation> <linkInformation> <name>d02c4bb0-c0aa-46fa-bf1b-4bcc44aeb012</name> diff --git a/entity/CommRestriction_Entity/contentTitleProcess.js b/entity/CommRestriction_Entity/contentTitleProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..b959e2abda60ee4ced3a7efe1281a0727eeff0f2 --- /dev/null +++ b/entity/CommRestriction_Entity/contentTitleProcess.js @@ -0,0 +1,5 @@ +import("system.translate"); +import("system.vars"); +import("system.result"); + +result.string(translate.text("Advertising ban") + " " + translate.text(vars.get("$field.MEDIUM"))); \ No newline at end of file diff --git a/entity/CommRestriction_Entity/recordcontainers/db/onDBDelete.js b/entity/CommRestriction_Entity/recordcontainers/db/onDBDelete.js new file mode 100644 index 0000000000000000000000000000000000000000..6ff91a5eb319120b527776868367d3cdb0f445f1 --- /dev/null +++ b/entity/CommRestriction_Entity/recordcontainers/db/onDBDelete.js @@ -0,0 +1,3 @@ +import("Workflow_lib"); + +WorkflowSignalSender.deleted(); \ No newline at end of file diff --git a/entity/CommRestriction_Entity/recordcontainers/db/onDBInsert.js b/entity/CommRestriction_Entity/recordcontainers/db/onDBInsert.js new file mode 100644 index 0000000000000000000000000000000000000000..54f0349c9f1ddaab6b25f85f758d52928df41847 --- /dev/null +++ b/entity/CommRestriction_Entity/recordcontainers/db/onDBInsert.js @@ -0,0 +1,3 @@ +import("Workflow_lib"); + +WorkflowSignalSender.inserted(); \ No newline at end of file diff --git a/entity/CommRestriction_Entity/recordcontainers/db/onDBUpdate.js b/entity/CommRestriction_Entity/recordcontainers/db/onDBUpdate.js new file mode 100644 index 0000000000000000000000000000000000000000..2e53f3cad9a9edf21cc5bbc6fdecc00c5001dfee --- /dev/null +++ b/entity/CommRestriction_Entity/recordcontainers/db/onDBUpdate.js @@ -0,0 +1,3 @@ +import("Workflow_lib"); + +WorkflowSignalSender.updated(); \ No newline at end of file diff --git a/entity/Communication_entity/Communication_entity.aod b/entity/Communication_entity/Communication_entity.aod index f931c15531a870c0828c7706d110e39542b74bbd..db52c114fe2cb84471b5be2266aba07985872a8f 100644 --- a/entity/Communication_entity/Communication_entity.aod +++ b/entity/Communication_entity/Communication_entity.aod @@ -295,6 +295,7 @@ Usually this is used for filtering COMMUNICATION-entries by a specified contact <orderClauseProcess>%aditoprj%/entity/Communication_entity/recordcontainers/db/orderClauseProcess.js</orderClauseProcess> <onDBInsert>%aditoprj%/entity/Communication_entity/recordcontainers/db/onDBInsert.js</onDBInsert> <onDBUpdate>%aditoprj%/entity/Communication_entity/recordcontainers/db/onDBUpdate.js</onDBUpdate> + <onDBDelete>%aditoprj%/entity/Communication_entity/recordcontainers/db/onDBDelete.js</onDBDelete> <linkInformation> <linkInformation> <name>5f6cd42e-34d5-4a1c-b9f0-8c87bf914f22</name> diff --git a/entity/Communication_entity/recordcontainers/db/onDBDelete.js b/entity/Communication_entity/recordcontainers/db/onDBDelete.js new file mode 100644 index 0000000000000000000000000000000000000000..6ff91a5eb319120b527776868367d3cdb0f445f1 --- /dev/null +++ b/entity/Communication_entity/recordcontainers/db/onDBDelete.js @@ -0,0 +1,3 @@ +import("Workflow_lib"); + +WorkflowSignalSender.deleted(); \ No newline at end of file diff --git a/entity/Communication_entity/recordcontainers/db/onDBInsert.js b/entity/Communication_entity/recordcontainers/db/onDBInsert.js index bb0e24a57917452a50f6549918c678ceb98c2228..5497aac10e4c84e9d6f63bdd28012b0bfe75cc06 100644 --- a/entity/Communication_entity/recordcontainers/db/onDBInsert.js +++ b/entity/Communication_entity/recordcontainers/db/onDBInsert.js @@ -1,3 +1,4 @@ +import("Workflow_lib"); import("system.logging"); import("system.util"); import("system.db"); @@ -43,4 +44,6 @@ if (vars.exists("$param.AdditionalContactIds_param") && vars.get("$param.Additio new StandardObject("Communication", row[3][0], "Person", row[3][2]) .onCommunicationInsert(row[3][3]); }) -} \ No newline at end of file +} + +WorkflowSignalSender.inserted(); \ No newline at end of file diff --git a/entity/Communication_entity/recordcontainers/db/onDBUpdate.js b/entity/Communication_entity/recordcontainers/db/onDBUpdate.js index d3d0371cec1d21f9cb927d351939dc5beac8cb99..da680f82c23c27da4f2cfb65488df9b1426b77bc 100644 --- a/entity/Communication_entity/recordcontainers/db/onDBUpdate.js +++ b/entity/Communication_entity/recordcontainers/db/onDBUpdate.js @@ -1,3 +1,4 @@ +import("Workflow_lib"); import("DataPrivacy_lib"); import("system.vars"); import("StandardObject_lib"); @@ -10,4 +11,6 @@ if (rowdata["COMMUNICATION.CONTACT_ID"] != null) standard.onCommunicationUpdate(rowdata["COMMUNICATION.MEDIUM_ID"]); } -DataPrivacyUtils.notifyNeedDataPrivacyUpdate(rowdata["COMMUNICATION.CONTACT_ID"], vars.get("$param.ShowDsgvoMessage_param")); \ No newline at end of file +DataPrivacyUtils.notifyNeedDataPrivacyUpdate(rowdata["COMMUNICATION.CONTACT_ID"], vars.get("$param.ShowDsgvoMessage_param")); + +WorkflowSignalSender.updated(); \ No newline at end of file diff --git a/entity/Contact_entity/Contact_entity.aod b/entity/Contact_entity/Contact_entity.aod index 051d569c5b1e50b704fc389e793839d515280e2d..32fd41440ff5cdb3a12f52d1e9b952c25f689b82 100644 --- a/entity/Contact_entity/Contact_entity.aod +++ b/entity/Contact_entity/Contact_entity.aod @@ -263,6 +263,8 @@ <fromClauseProcess>%aditoprj%/entity/Contact_entity/recordcontainers/db/fromClauseProcess.js</fromClauseProcess> <conditionProcess>%aditoprj%/entity/Contact_entity/recordcontainers/db/conditionProcess.js</conditionProcess> <orderClauseProcess>%aditoprj%/entity/Contact_entity/recordcontainers/db/orderClauseProcess.js</orderClauseProcess> + <onDBInsert>%aditoprj%/entity/Contact_entity/recordcontainers/db/onDBInsert.js</onDBInsert> + <onDBUpdate>%aditoprj%/entity/Contact_entity/recordcontainers/db/onDBUpdate.js</onDBUpdate> <onDBDelete>%aditoprj%/entity/Contact_entity/recordcontainers/db/onDBDelete.js</onDBDelete> <linkInformation> <linkInformation> diff --git a/entity/Contact_entity/recordcontainers/db/onDBInsert.js b/entity/Contact_entity/recordcontainers/db/onDBInsert.js new file mode 100644 index 0000000000000000000000000000000000000000..54f0349c9f1ddaab6b25f85f758d52928df41847 --- /dev/null +++ b/entity/Contact_entity/recordcontainers/db/onDBInsert.js @@ -0,0 +1,3 @@ +import("Workflow_lib"); + +WorkflowSignalSender.inserted(); \ No newline at end of file diff --git a/entity/Contact_entity/recordcontainers/db/onDBUpdate.js b/entity/Contact_entity/recordcontainers/db/onDBUpdate.js new file mode 100644 index 0000000000000000000000000000000000000000..2e53f3cad9a9edf21cc5bbc6fdecc00c5001dfee --- /dev/null +++ b/entity/Contact_entity/recordcontainers/db/onDBUpdate.js @@ -0,0 +1,3 @@ +import("Workflow_lib"); + +WorkflowSignalSender.updated(); \ No newline at end of file diff --git a/entity/Context_entity/Context_entity.aod b/entity/Context_entity/Context_entity.aod index 8e8f8d01c34ea6b4acb2208b165bd6bcc58e60a5..56d28cdc85a3b20f0729357bb0e6b56e4af53d2d 100644 --- a/entity/Context_entity/Context_entity.aod +++ b/entity/Context_entity/Context_entity.aod @@ -153,6 +153,12 @@ <fieldName>Contexts</fieldName> <isConsumer v="false" /> </entityDependency> + <entityDependency> + <name>f69007c7-d495-42d2-9a12-6426c24771a4</name> + <entityName>Observation_entity</entityName> + <fieldName>Contexts</fieldName> + <isConsumer v="false" /> + </entityDependency> </dependencies> </entityProvider> <entityProvider> diff --git a/entity/Contract_entity/Contract_entity.aod b/entity/Contract_entity/Contract_entity.aod index 3281aae04f01796444be478eb344530931f2c173..1762eb6b3f6008a713824f7a190847daca38cf05 100644 --- a/entity/Contract_entity/Contract_entity.aod +++ b/entity/Contract_entity/Contract_entity.aod @@ -15,6 +15,27 @@ <titlePlural>Contracts</titlePlural> <recordContainer>db</recordContainer> <entityFields> + <entityActionGroup> + <name>observeActionGroup</name> + <children> + <entityActionField> + <name>observe</name> + <title>Observe</title> + <onActionProcess>%aditoprj%/entity/Contract_entity/entityfields/observeactiongroup/children/observe/onActionProcess.js</onActionProcess> + <isObjectAction v="true" /> + <iconId>VAADIN:EYE</iconId> + <stateProcess>%aditoprj%/entity/Contract_entity/entityfields/observeactiongroup/children/observe/stateProcess.js</stateProcess> + <titleProcess>%aditoprj%/entity/Contract_entity/entityfields/observeactiongroup/children/observe/titleProcess.js</titleProcess> + </entityActionField> + <entityActionField> + <name>cancelObservation</name> + <onActionProcess>%aditoprj%/entity/Contract_entity/entityfields/observeactiongroup/children/cancelobservation/onActionProcess.js</onActionProcess> + <iconId>VAADIN:EYE_SLASH</iconId> + <stateProcess>%aditoprj%/entity/Contract_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js</stateProcess> + <titleProcess>%aditoprj%/entity/Contract_entity/entityfields/observeactiongroup/children/cancelobservation/titleProcess.js</titleProcess> + </entityActionField> + </children> + </entityActionGroup> <entityField> <name>CONTRACTCODE</name> <documentation>%aditoprj%/entity/Contract_entity/entityfields/contractcode/documentation.adoc</documentation> diff --git a/entity/Contract_entity/entityfields/observeactiongroup/children/cancelobservation/onActionProcess.js b/entity/Contract_entity/entityfields/observeactiongroup/children/cancelobservation/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..35102b677cbb52d1d4a9723a42cceaef3fd5ea03 --- /dev/null +++ b/entity/Contract_entity/entityfields/observeactiongroup/children/cancelobservation/onActionProcess.js @@ -0,0 +1,3 @@ +import("Observation_lib"); + +Observation.cancelAction(); \ No newline at end of file diff --git a/entity/Contract_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js b/entity/Contract_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..9a0350f5edebe397b96a84766e7cdb8d99f77ee5 --- /dev/null +++ b/entity/Contract_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js @@ -0,0 +1,8 @@ +import("system.result"); +import("Observation_lib"); +import("system.neon"); + +if (Observation.countObservations()) + result.string(neon.COMPONENTSTATE_EDITABLE); +else + result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file diff --git a/entity/Contract_entity/entityfields/observeactiongroup/children/cancelobservation/titleProcess.js b/entity/Contract_entity/entityfields/observeactiongroup/children/cancelobservation/titleProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..87553a373a055879a524774695e4c18bcab617e9 --- /dev/null +++ b/entity/Contract_entity/entityfields/observeactiongroup/children/cancelobservation/titleProcess.js @@ -0,0 +1,5 @@ +import("system.result"); +import("system.vars"); +import("Observation_lib"); + +result.string(Observation.cancelActionTitle(vars.get("$sys.selection"))); \ No newline at end of file diff --git a/entity/Contract_entity/entityfields/observeactiongroup/children/observe/onActionProcess.js b/entity/Contract_entity/entityfields/observeactiongroup/children/observe/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..66cf7bc2991c142ee0753fec88e151d3dcf71141 --- /dev/null +++ b/entity/Contract_entity/entityfields/observeactiongroup/children/observe/onActionProcess.js @@ -0,0 +1,3 @@ +import("Observation_lib"); + +Observation.insertAction(); \ No newline at end of file diff --git a/entity/Contract_entity/entityfields/observeactiongroup/children/observe/stateProcess.js b/entity/Contract_entity/entityfields/observeactiongroup/children/observe/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..461276ea5e1e98e967047207ac6d654225a1b1c6 --- /dev/null +++ b/entity/Contract_entity/entityfields/observeactiongroup/children/observe/stateProcess.js @@ -0,0 +1,8 @@ +import("system.result"); +import("Observation_lib"); +import("system.neon"); + +if (!Observation.countObservations()) + result.string(neon.COMPONENTSTATE_EDITABLE); +else + result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file diff --git a/entity/Contract_entity/entityfields/observeactiongroup/children/observe/titleProcess.js b/entity/Contract_entity/entityfields/observeactiongroup/children/observe/titleProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..abdfbd3d7c4aff7beba9ff22cbb39abc8d195a30 --- /dev/null +++ b/entity/Contract_entity/entityfields/observeactiongroup/children/observe/titleProcess.js @@ -0,0 +1,5 @@ +import("system.result"); +import("Observation_lib"); +import("system.vars"); + +result.string(Observation.observeActionTitle(vars.get("$sys.selection"))); \ No newline at end of file diff --git a/entity/Document_entity/Document_entity.aod b/entity/Document_entity/Document_entity.aod index f1dda1cc413a7dc2f7f2678ef59c6188096c0d5f..3fc6eca196d662322011f791b8c3e03d08c73243 100644 --- a/entity/Document_entity/Document_entity.aod +++ b/entity/Document_entity/Document_entity.aod @@ -5,6 +5,7 @@ <documentation>%aditoprj%/entity/Document_entity/documentation.adoc</documentation> <title>Document</title> <grantCreateProcess>%aditoprj%/entity/Document_entity/grantCreateProcess.js</grantCreateProcess> + <contentTitleProcess>%aditoprj%/entity/Document_entity/contentTitleProcess.js</contentTitleProcess> <iconId>VAADIN:FILE</iconId> <titlePlural>Documents</titlePlural> <recordContainer>jdito</recordContainer> @@ -393,6 +394,10 @@ <name>MSTTeamId_param</name> <expose v="true" /> </entityParameter> + <entityField> + <name>assignmentRowID</name> + <valueProcess>%aditoprj%/entity/Document_entity/entityfields/assignmentrowid/valueProcess.js</valueProcess> + </entityField> </entityFields> <recordContainers> <jDitoRecordContainer> @@ -427,6 +432,9 @@ <jDitoRecordFieldMapping> <name>KEYWORD.value</name> </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>assignmentRowID.value</name> + </jDitoRecordFieldMapping> </recordFieldMappings> </jDitoRecordContainer> </recordContainers> diff --git a/entity/Document_entity/contentTitleProcess.js b/entity/Document_entity/contentTitleProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..28fd67de270b497ba718dd4e91766bd22936f67e --- /dev/null +++ b/entity/Document_entity/contentTitleProcess.js @@ -0,0 +1,4 @@ +import("system.vars"); +import("system.result"); + +result.string(vars.get("$field.NAME")); \ No newline at end of file diff --git a/entity/Document_entity/entityfields/assignmentrowid/valueProcess.js b/entity/Document_entity/entityfields/assignmentrowid/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..00e8882d0d160871dd3a4482345307be2e9af9f4 --- /dev/null +++ b/entity/Document_entity/entityfields/assignmentrowid/valueProcess.js @@ -0,0 +1,5 @@ +import("system.vars"); +import("system.result"); + +if (!vars.get("$this.value")) + result.string(vars.get("$param.AssignmentRowId_param")); \ No newline at end of file diff --git a/entity/Document_entity/recordcontainers/jdito/contentProcess.js b/entity/Document_entity/recordcontainers/jdito/contentProcess.js index 1d34f32095204dab4a658272f9725848ba444e1e..139a1d284ebec853cbfb0d6eb6a0b9b1f1351019 100644 --- a/entity/Document_entity/recordcontainers/jdito/contentProcess.js +++ b/entity/Document_entity/recordcontainers/jdito/contentProcess.js @@ -30,7 +30,7 @@ if(vars.exists("$param.AssignmentTable_param") && var previewAvatar = metadata[i].preview || "VAADIN:FILE"; documents.push( [metadata[i].id, metadata[i].filename, metadata[i].size, metadata[i].edit, previewAvatar, metadata[i].mimetype, - metadata[i].description, metadata[i].keyword]); + metadata[i].description, metadata[i].keyword, assignmentRowId]); } result.object(documents); diff --git a/entity/Document_entity/recordcontainers/jdito/onDelete.js b/entity/Document_entity/recordcontainers/jdito/onDelete.js index 74fe70263290d64f3566a2806e4b2dd25bd81cf4..8a2470d3de3c31639294f911d2a53078d96f1a09 100644 --- a/entity/Document_entity/recordcontainers/jdito/onDelete.js +++ b/entity/Document_entity/recordcontainers/jdito/onDelete.js @@ -1,2 +1,5 @@ +import("Workflow_lib"); import("Document_lib"); DocumentUtil.deleteCurrentDocument(); + +WorkflowSignalSender.deleted(); diff --git a/entity/Document_entity/recordcontainers/jdito/onInsert.js b/entity/Document_entity/recordcontainers/jdito/onInsert.js index 99bcdc3cb62d9a1f3c1830416e54b9a537026640..3f40dd1a2053a6cb5a202c82085fe3c51afda898 100644 --- a/entity/Document_entity/recordcontainers/jdito/onInsert.js +++ b/entity/Document_entity/recordcontainers/jdito/onInsert.js @@ -1,3 +1,4 @@ +import("Workflow_lib"); import("system.db"); import("system.vars"); import("Document_lib"); @@ -21,3 +22,5 @@ if(bindata != '' && filename != ''){ bindata, filename, description, keyword, alias, id); } + +WorkflowSignalSender.inserted(); \ No newline at end of file diff --git a/entity/Document_entity/recordcontainers/jdito/onUpdate.js b/entity/Document_entity/recordcontainers/jdito/onUpdate.js index 322511925adce14197428d398bd53320f3bd3d14..a4b360c42e9aa648f78c5a03e10b7d2b7e153629 100644 --- a/entity/Document_entity/recordcontainers/jdito/onUpdate.js +++ b/entity/Document_entity/recordcontainers/jdito/onUpdate.js @@ -1,3 +1,4 @@ +import("Workflow_lib"); import("system.vars"); import("system.db"); import("Document_lib"); @@ -22,4 +23,6 @@ if(vars.get("$field.IS_MAIN_DOCUMENT") == '1') { if(bindata != '') db.updateBinary(id, parentId, bindata, fileName, description, keyword, alias); else - db.updateBinaryMetadata(id, parentId, fileName, description, keyword, alias); \ No newline at end of file + db.updateBinaryMetadata(id, parentId, fileName, description, keyword, alias); + +WorkflowSignalSender.updated(); \ No newline at end of file diff --git a/entity/Employee_entity/Employee_entity.aod b/entity/Employee_entity/Employee_entity.aod index 1a1e23ee1f1ae219859ec7c852cfb9d68271b8aa..150eac2cf11ccf6954ce63d70d8b3eece779e91c 100644 --- a/entity/Employee_entity/Employee_entity.aod +++ b/entity/Employee_entity/Employee_entity.aod @@ -14,6 +14,27 @@ <titlePlural>Employees</titlePlural> <recordContainer>jdito</recordContainer> <entityFields> + <entityActionGroup> + <name>observeActionGroup</name> + <children> + <entityActionField> + <name>observe</name> + <title>Observe</title> + <onActionProcess>%aditoprj%/entity/Employee_entity/entityfields/observeactiongroup/children/observe/onActionProcess.js</onActionProcess> + <isObjectAction v="true" /> + <iconId>VAADIN:EYE</iconId> + <stateProcess>%aditoprj%/entity/Employee_entity/entityfields/observeactiongroup/children/observe/stateProcess.js</stateProcess> + <titleProcess>%aditoprj%/entity/Employee_entity/entityfields/observeactiongroup/children/observe/titleProcess.js</titleProcess> + </entityActionField> + <entityActionField> + <name>cancelObservation</name> + <onActionProcess>%aditoprj%/entity/Employee_entity/entityfields/observeactiongroup/children/cancelobservation/onActionProcess.js</onActionProcess> + <iconId>VAADIN:EYE_SLASH</iconId> + <stateProcess>%aditoprj%/entity/Employee_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js</stateProcess> + <titleProcess>%aditoprj%/entity/Employee_entity/entityfields/observeactiongroup/children/cancelobservation/titleProcess.js</titleProcess> + </entityActionField> + </children> + </entityActionGroup> <entityProvider> <name>#PROVIDER</name> <lookupIdfield>CONTACT_ID</lookupIdfield> @@ -337,6 +358,12 @@ <fieldName>Employees</fieldName> <isConsumer v="false" /> </entityDependency> + <entityDependency> + <name>c83ebe7a-5a3b-49ed-b40c-d667bb72f268</name> + <entityName>Observation_entity</entityName> + <fieldName>Ussers</fieldName> + <isConsumer v="false" /> + </entityDependency> </dependencies> </entityProvider> <entityProvider> diff --git a/entity/Employee_entity/entityfields/observeactiongroup/children/cancelobservation/onActionProcess.js b/entity/Employee_entity/entityfields/observeactiongroup/children/cancelobservation/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..35102b677cbb52d1d4a9723a42cceaef3fd5ea03 --- /dev/null +++ b/entity/Employee_entity/entityfields/observeactiongroup/children/cancelobservation/onActionProcess.js @@ -0,0 +1,3 @@ +import("Observation_lib"); + +Observation.cancelAction(); \ No newline at end of file diff --git a/entity/Employee_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js b/entity/Employee_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..9a0350f5edebe397b96a84766e7cdb8d99f77ee5 --- /dev/null +++ b/entity/Employee_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js @@ -0,0 +1,8 @@ +import("system.result"); +import("Observation_lib"); +import("system.neon"); + +if (Observation.countObservations()) + result.string(neon.COMPONENTSTATE_EDITABLE); +else + result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file diff --git a/entity/Employee_entity/entityfields/observeactiongroup/children/cancelobservation/titleProcess.js b/entity/Employee_entity/entityfields/observeactiongroup/children/cancelobservation/titleProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..87553a373a055879a524774695e4c18bcab617e9 --- /dev/null +++ b/entity/Employee_entity/entityfields/observeactiongroup/children/cancelobservation/titleProcess.js @@ -0,0 +1,5 @@ +import("system.result"); +import("system.vars"); +import("Observation_lib"); + +result.string(Observation.cancelActionTitle(vars.get("$sys.selection"))); \ No newline at end of file diff --git a/entity/Employee_entity/entityfields/observeactiongroup/children/observe/onActionProcess.js b/entity/Employee_entity/entityfields/observeactiongroup/children/observe/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..66cf7bc2991c142ee0753fec88e151d3dcf71141 --- /dev/null +++ b/entity/Employee_entity/entityfields/observeactiongroup/children/observe/onActionProcess.js @@ -0,0 +1,3 @@ +import("Observation_lib"); + +Observation.insertAction(); \ No newline at end of file diff --git a/entity/Employee_entity/entityfields/observeactiongroup/children/observe/stateProcess.js b/entity/Employee_entity/entityfields/observeactiongroup/children/observe/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..461276ea5e1e98e967047207ac6d654225a1b1c6 --- /dev/null +++ b/entity/Employee_entity/entityfields/observeactiongroup/children/observe/stateProcess.js @@ -0,0 +1,8 @@ +import("system.result"); +import("Observation_lib"); +import("system.neon"); + +if (!Observation.countObservations()) + result.string(neon.COMPONENTSTATE_EDITABLE); +else + result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file diff --git a/entity/Employee_entity/entityfields/observeactiongroup/children/observe/titleProcess.js b/entity/Employee_entity/entityfields/observeactiongroup/children/observe/titleProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..abdfbd3d7c4aff7beba9ff22cbb39abc8d195a30 --- /dev/null +++ b/entity/Employee_entity/entityfields/observeactiongroup/children/observe/titleProcess.js @@ -0,0 +1,5 @@ +import("system.result"); +import("Observation_lib"); +import("system.vars"); + +result.string(Observation.observeActionTitle(vars.get("$sys.selection"))); \ No newline at end of file diff --git a/entity/KeywordEntry_entity/KeywordEntry_entity.aod b/entity/KeywordEntry_entity/KeywordEntry_entity.aod index d4054b78086a57ff19b59201546b0f0483bebb0c..463fb78bbb04ba2c6c5920231aabac315d478e8c 100644 --- a/entity/KeywordEntry_entity/KeywordEntry_entity.aod +++ b/entity/KeywordEntry_entity/KeywordEntry_entity.aod @@ -31,6 +31,12 @@ <fieldName>PrioKeywords</fieldName> <isConsumer v="false" /> </entityDependency> + <entityDependency> + <name>01b9bba5-3b65-4db0-b466-1e41061feb1a</name> + <entityName>Observation_entity</entityName> + <fieldName>PrioKeywords</fieldName> + <isConsumer v="false" /> + </entityDependency> </dependencies> </entityProvider> <entityField> diff --git a/entity/Leadimport_entity/Leadimport_entity.aod b/entity/Leadimport_entity/Leadimport_entity.aod index 141e0c172a3f2b0d90e9efc1bff354503ff3d12e..e19536e31454b62d8ee12bd44f6e77c73c3584fe 100644 --- a/entity/Leadimport_entity/Leadimport_entity.aod +++ b/entity/Leadimport_entity/Leadimport_entity.aod @@ -16,6 +16,27 @@ <titlePlural>Lead Imports</titlePlural> <recordContainer>db</recordContainer> <entityFields> + <entityActionGroup> + <name>observeActionGroup</name> + <children> + <entityActionField> + <name>observe</name> + <title>Observe</title> + <onActionProcess>%aditoprj%/entity/Leadimport_entity/entityfields/observeactiongroup/children/observe/onActionProcess.js</onActionProcess> + <isObjectAction v="true" /> + <iconId>VAADIN:EYE</iconId> + <stateProcess>%aditoprj%/entity/Leadimport_entity/entityfields/observeactiongroup/children/observe/stateProcess.js</stateProcess> + <titleProcess>%aditoprj%/entity/Leadimport_entity/entityfields/observeactiongroup/children/observe/titleProcess.js</titleProcess> + </entityActionField> + <entityActionField> + <name>cancelObservation</name> + <onActionProcess>%aditoprj%/entity/Leadimport_entity/entityfields/observeactiongroup/children/cancelobservation/onActionProcess.js</onActionProcess> + <iconId>VAADIN:EYE_SLASH</iconId> + <stateProcess>%aditoprj%/entity/Leadimport_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js</stateProcess> + <titleProcess>%aditoprj%/entity/Leadimport_entity/entityfields/observeactiongroup/children/cancelobservation/titleProcess.js</titleProcess> + </entityActionField> + </children> + </entityActionGroup> <entityProvider> <name>#PROVIDER</name> <dependencies> diff --git a/entity/Leadimport_entity/entityfields/observeactiongroup/children/cancelobservation/onActionProcess.js b/entity/Leadimport_entity/entityfields/observeactiongroup/children/cancelobservation/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..35102b677cbb52d1d4a9723a42cceaef3fd5ea03 --- /dev/null +++ b/entity/Leadimport_entity/entityfields/observeactiongroup/children/cancelobservation/onActionProcess.js @@ -0,0 +1,3 @@ +import("Observation_lib"); + +Observation.cancelAction(); \ No newline at end of file diff --git a/entity/Leadimport_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js b/entity/Leadimport_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..9a0350f5edebe397b96a84766e7cdb8d99f77ee5 --- /dev/null +++ b/entity/Leadimport_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js @@ -0,0 +1,8 @@ +import("system.result"); +import("Observation_lib"); +import("system.neon"); + +if (Observation.countObservations()) + result.string(neon.COMPONENTSTATE_EDITABLE); +else + result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file diff --git a/entity/Leadimport_entity/entityfields/observeactiongroup/children/cancelobservation/titleProcess.js b/entity/Leadimport_entity/entityfields/observeactiongroup/children/cancelobservation/titleProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..87553a373a055879a524774695e4c18bcab617e9 --- /dev/null +++ b/entity/Leadimport_entity/entityfields/observeactiongroup/children/cancelobservation/titleProcess.js @@ -0,0 +1,5 @@ +import("system.result"); +import("system.vars"); +import("Observation_lib"); + +result.string(Observation.cancelActionTitle(vars.get("$sys.selection"))); \ No newline at end of file diff --git a/entity/Leadimport_entity/entityfields/observeactiongroup/children/observe/onActionProcess.js b/entity/Leadimport_entity/entityfields/observeactiongroup/children/observe/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..66cf7bc2991c142ee0753fec88e151d3dcf71141 --- /dev/null +++ b/entity/Leadimport_entity/entityfields/observeactiongroup/children/observe/onActionProcess.js @@ -0,0 +1,3 @@ +import("Observation_lib"); + +Observation.insertAction(); \ No newline at end of file diff --git a/entity/Leadimport_entity/entityfields/observeactiongroup/children/observe/stateProcess.js b/entity/Leadimport_entity/entityfields/observeactiongroup/children/observe/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..461276ea5e1e98e967047207ac6d654225a1b1c6 --- /dev/null +++ b/entity/Leadimport_entity/entityfields/observeactiongroup/children/observe/stateProcess.js @@ -0,0 +1,8 @@ +import("system.result"); +import("Observation_lib"); +import("system.neon"); + +if (!Observation.countObservations()) + result.string(neon.COMPONENTSTATE_EDITABLE); +else + result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file diff --git a/entity/Leadimport_entity/entityfields/observeactiongroup/children/observe/titleProcess.js b/entity/Leadimport_entity/entityfields/observeactiongroup/children/observe/titleProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..abdfbd3d7c4aff7beba9ff22cbb39abc8d195a30 --- /dev/null +++ b/entity/Leadimport_entity/entityfields/observeactiongroup/children/observe/titleProcess.js @@ -0,0 +1,5 @@ +import("system.result"); +import("Observation_lib"); +import("system.vars"); + +result.string(Observation.observeActionTitle(vars.get("$sys.selection"))); \ No newline at end of file diff --git a/entity/Leadimport_entity/recordcontainers/db/onDBDelete.js b/entity/Leadimport_entity/recordcontainers/db/onDBDelete.js index 76cb3729e7370c9c2435b1fa433f64dcbec4bd4a..17ff5bbfc50c4ab8b2f59bfa43e530c9f6fbd6dd 100644 --- a/entity/Leadimport_entity/recordcontainers/db/onDBDelete.js +++ b/entity/Leadimport_entity/recordcontainers/db/onDBDelete.js @@ -1,3 +1,4 @@ +import("Workflow_lib"); import("Context_lib"); import("Sql_lib"); import("system.vars"); @@ -37,4 +38,6 @@ binMetadata.forEach(function(pMeta) }); new AttributeRelationQuery(leadImportId, null, ContextUtils.getCurrentContextId()) - .deleteAllAttributes(); \ No newline at end of file + .deleteAllAttributes(); + +WorkflowSignalSender.deleted(); \ No newline at end of file diff --git a/entity/Leadimport_entity/recordcontainers/db/onDBInsert.js b/entity/Leadimport_entity/recordcontainers/db/onDBInsert.js index 9335140ab1c5174408bc2300ee3ec2e263bd06e1..ff3f343de00e5495c0ed996a1ccb473aedc8705d 100644 --- a/entity/Leadimport_entity/recordcontainers/db/onDBInsert.js +++ b/entity/Leadimport_entity/recordcontainers/db/onDBInsert.js @@ -1,3 +1,4 @@ +import("Workflow_lib"); import("ExportTemplate_lib"); import("Sql_lib"); import("KeywordRegistry_basic"); @@ -25,4 +26,5 @@ if(bindata != '' && filename != '') var documentId = SingleBinaryUtils.insertMainDocument("LEADIMPORT", "IMPORTFILE", assignmentRowId, bindata, filename, "", SqlUtils.getBinariesAlias()); LeadImportUtils.loadImportFile(documentId, fieldSep, fieldLimit, recordSep, assignmentRowId, false, true); } -} \ No newline at end of file +} +WorkflowSignalSender.inserted(); \ No newline at end of file diff --git a/entity/Leadimport_entity/recordcontainers/db/onDBUpdate.js b/entity/Leadimport_entity/recordcontainers/db/onDBUpdate.js index 9f19087232a89f6cab7046ac2ac4e36b53aadf3b..276fa07844206e963e7c366faa238498602abebd 100644 --- a/entity/Leadimport_entity/recordcontainers/db/onDBUpdate.js +++ b/entity/Leadimport_entity/recordcontainers/db/onDBUpdate.js @@ -1,3 +1,4 @@ +import("Workflow_lib"); import("ExportTemplate_lib"); import("system.neon"); import("Sql_lib"); @@ -42,3 +43,5 @@ if (vars.get("$field.bindata") != "FILE NOT CHANGED") neon.refreshAll(); } + +WorkflowSignalSender.updated(); diff --git a/entity/ObjectProxy_entity/ObjectProxy_entity.aod b/entity/ObjectProxy_entity/ObjectProxy_entity.aod index 8eb6e53ec1fac158f5a89f6eed26678277279810..601b41c2586fc583b911d68c34789270b6bdfe5b 100644 --- a/entity/ObjectProxy_entity/ObjectProxy_entity.aod +++ b/entity/ObjectProxy_entity/ObjectProxy_entity.aod @@ -32,6 +32,12 @@ <fieldName>LinkedObject</fieldName> <isConsumer v="false" /> </entityDependency> + <entityDependency> + <name>ccc805b6-14ea-457c-956d-8c025e178936</name> + <entityName>Observation_entity</entityName> + <fieldName>ObjectProxyConsumer</fieldName> + <isConsumer v="false" /> + </entityDependency> <entityDependency> <name>9d75842d-0f91-4ddf-bd94-d8f092f17224</name> <entityName>KnowledgeLink_entity</entityName> diff --git a/entity/ObjectTree_entity/ObjectTree_entity.aod b/entity/ObjectTree_entity/ObjectTree_entity.aod index 7edb15c3b6b7c93b3b7c06acdec09c16b828d48c..b7a81ef152f29d6875d10bec99c791a13e45344f 100644 --- a/entity/ObjectTree_entity/ObjectTree_entity.aod +++ b/entity/ObjectTree_entity/ObjectTree_entity.aod @@ -7,6 +7,7 @@ <grantUpdate v="true" /> <grantUpdateProcess>%aditoprj%/entity/ObjectTree_entity/grantUpdateProcess.js</grantUpdateProcess> <grantDeleteProcess>%aditoprj%/entity/ObjectTree_entity/grantDeleteProcess.js</grantDeleteProcess> + <contentTitleProcess>%aditoprj%/entity/ObjectTree_entity/contentTitleProcess.js</contentTitleProcess> <titlePlural>Relations</titlePlural> <recordContainer>jdito</recordContainer> <entityFields> diff --git a/entity/ObjectTree_entity/contentTitleProcess.js b/entity/ObjectTree_entity/contentTitleProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..94f61859cc64100bb6a6dcd445efc67835002c1a --- /dev/null +++ b/entity/ObjectTree_entity/contentTitleProcess.js @@ -0,0 +1,4 @@ +import("system.vars"); +import("system.result"); + +result.string(vars.get("$field.TITLE")); \ No newline at end of file diff --git a/entity/ObjectTree_entity/recordcontainers/jdito/contentProcess.js b/entity/ObjectTree_entity/recordcontainers/jdito/contentProcess.js index 7980a2bd4337487f4d163001299d364840e52f4e..b56971288c6698b3255dfafab871cd784de0680b 100644 --- a/entity/ObjectTree_entity/recordcontainers/jdito/contentProcess.js +++ b/entity/ObjectTree_entity/recordcontainers/jdito/contentProcess.js @@ -84,6 +84,14 @@ else _loadObjectRelationTree.call(tree, originalObjectIds[i], originalObjectTypes[i], selectedRelationType); } } + else if (!vars.exists("$param.ObjectIds_param") && uidParam) + { + newSelect("OBJECT" + (pObjectRelationId ? myNum : otherNum) + "_ROWID, AB_OBJECTRELATIONID, OBJECT_TYPE, RELATION_TITLE, INFO, AB_OBJECTRELATIONTYPEID") + .from("AB_OBJECTRELATION") + .join("AB_OBJECTRELATIONTYPE", onConditionForRelationTypeJoin) + .whereIfSet("AB_OBJECTRELATION.AB_OBJECTRELATIONID", pObjectRelationId || null) // set id to null, as only null works with .andIfSet + .table(); + } if (uidParam) //workaround! tree = tree.filter(function (row) {return JSON.parse(row[0])[UID.objectRelationId] == uidParam}); } diff --git a/entity/ObjectTree_entity/recordcontainers/jdito/onDelete.js b/entity/ObjectTree_entity/recordcontainers/jdito/onDelete.js index 6541f935b87fc18c6d06480e84f365f647b42c24..c0b52c0e41fb5d2587f877afcf93b0792050f63c 100644 --- a/entity/ObjectTree_entity/recordcontainers/jdito/onDelete.js +++ b/entity/ObjectTree_entity/recordcontainers/jdito/onDelete.js @@ -1,6 +1,9 @@ +import("Workflow_lib"); import("system.vars"); import("Sql_lib"); var objectRelationId = vars.get("$local.rowdata")["OBJECTRELATIONID.value"]; -newWhereIfSet("AB_OBJECTRELATION.AB_OBJECTRELATIONID", objectRelationId).deleteData(); \ No newline at end of file +newWhereIfSet("AB_OBJECTRELATION.AB_OBJECTRELATIONID", objectRelationId).deleteData(); + +WorkflowSignalSender.deleted(); \ No newline at end of file diff --git a/entity/ObjectTree_entity/recordcontainers/jdito/onInsert.js b/entity/ObjectTree_entity/recordcontainers/jdito/onInsert.js index 4ff38cdf98c122625cf196a8ad0d0fbf8647b782..799e7985e6eb1457f964bade7b8a1bc64ddca3ae 100644 --- a/entity/ObjectTree_entity/recordcontainers/jdito/onInsert.js +++ b/entity/ObjectTree_entity/recordcontainers/jdito/onInsert.js @@ -1,3 +1,4 @@ +import("Workflow_lib"); import("Contact_lib"); import("system.util"); import("ObjectRelation_lib"); @@ -39,4 +40,6 @@ if (selectedObjectRelationTypeId) info || "" ]); } -} \ No newline at end of file +} + +WorkflowSignalSender.inserted(); \ No newline at end of file diff --git a/entity/ObjectTree_entity/recordcontainers/jdito/onUpdate.js b/entity/ObjectTree_entity/recordcontainers/jdito/onUpdate.js index eeb63ca799b10d70e54f1e522cb2d941942dc8a0..b60a3b50c4b94a9ce260613afc93b48a253fa203 100644 --- a/entity/ObjectTree_entity/recordcontainers/jdito/onUpdate.js +++ b/entity/ObjectTree_entity/recordcontainers/jdito/onUpdate.js @@ -1,3 +1,4 @@ +import("Workflow_lib"); import("system.vars"); import("Sql_lib"); @@ -7,3 +8,5 @@ if (vars.get("$local.changed").indexOf("INFO.value") !== -1) newWhereIfSet("AB_OBJECTRELATION.AB_OBJECTRELATIONID", rowdata["OBJECTRELATIONID.value"]) .updateFields({"INFO" : rowdata["INFO.value"]}); } + +WorkflowSignalSender.updated(); \ No newline at end of file diff --git a/entity/Observation_entity/Observation_entity.aod b/entity/Observation_entity/Observation_entity.aod new file mode 100644 index 0000000000000000000000000000000000000000..c0763a22d54101750b0db56c94c116cd23d63335 --- /dev/null +++ b/entity/Observation_entity/Observation_entity.aod @@ -0,0 +1,325 @@ +<?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.17" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.17"> + <name>Observation_entity</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <documentation>%aditoprj%/entity/Observation_entity/documentation.adoc</documentation> + <title>Observation</title> + <titlePlural>Observations</titlePlural> + <recordContainer>db</recordContainer> + <entityFields> + <entityProvider> + <name>#PROVIDER</name> + </entityProvider> + <entityProvider> + <name>#PROVIDER_AGGREGATES</name> + <useAggregates v="true" /> + </entityProvider> + <entityField> + <name>OBSERVATIONID</name> + <title>ObservationID</title> + <mandatory v="true" /> + </entityField> + <entityField> + <name>DATE_NEW</name> + <title>Date new</title> + <contentType>DATE</contentType> + <resolution>SECOND</resolution> + <valueProcess>%aditoprj%/entity/Observation_entity/entityfields/date_new/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>DATE_EDIT</name> + <title>Date Edit</title> + <contentType>DATE</contentType> + <resolution>SECOND</resolution> + <valueProcess>%aditoprj%/entity/Observation_entity/entityfields/date_edit/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>USER_NEW</name> + <valueProcess>%aditoprj%/entity/Observation_entity/entityfields/user_new/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>OBSERVER</name> + <title>Observer</title> + <consumer>Ussers</consumer> + <groupable v="true" /> + <mandatory v="true" /> + <stateProcess>%aditoprj%/entity/Observation_entity/entityfields/observer/stateProcess.js</stateProcess> + <valueProcess>%aditoprj%/entity/Observation_entity/entityfields/observer/valueProcess.js</valueProcess> + <displayValueProcess>%aditoprj%/entity/Observation_entity/entityfields/observer/displayValueProcess.js</displayValueProcess> + </entityField> + <entityField> + <name>USER_EDIT</name> + <valueProcess>%aditoprj%/entity/Observation_entity/entityfields/user_edit/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>OBJECT_TYPE</name> + <title>Object Type</title> + <consumer>Contexts</consumer> + <groupable v="false" /> + <mandatory v="true" /> + <stateProcess>%aditoprj%/entity/Observation_entity/entityfields/object_type/stateProcess.js</stateProcess> + <displayValueProcess>%aditoprj%/entity/Observation_entity/entityfields/object_type/displayValueProcess.js</displayValueProcess> + <onValueChange>%aditoprj%/entity/Observation_entity/entityfields/object_type/onValueChange.js</onValueChange> + </entityField> + <entityField> + <name>OBJECT_ID</name> + <title>Object Id</title> + <consumer>ObjectProxyConsumer</consumer> + <linkedContextProcess>%aditoprj%/entity/Observation_entity/entityfields/object_id/linkedContextProcess.js</linkedContextProcess> + <stateProcess>%aditoprj%/entity/Observation_entity/entityfields/object_id/stateProcess.js</stateProcess> + <valueProcess>%aditoprj%/entity/Observation_entity/entityfields/object_id/valueProcess.js</valueProcess> + <displayValueProcess>%aditoprj%/entity/Observation_entity/entityfields/object_id/displayValueProcess.js</displayValueProcess> + <onValueChange>%aditoprj%/entity/Observation_entity/entityfields/object_id/onValueChange.js</onValueChange> + </entityField> + <entityConsumer> + <name>PrioKeywords</name> + <children> + <entityParameter> + <name>ContainerName_param</name> + <valueProcess>%aditoprj%/entity/Observation_entity/entityfields/priokeywords/children/containername_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + <dependency> + <name>dependency</name> + <entityName>KeywordEntry_entity</entityName> + <fieldName>#PROVIDER</fieldName> + </dependency> + </entityConsumer> + <entityConsumer> + <name>Ussers</name> + <dependency> + <name>dependency</name> + <entityName>Employee_entity</entityName> + <fieldName>EmployeesByUserId</fieldName> + </dependency> + </entityConsumer> + <entityConsumer> + <name>ObjectProxyConsumer</name> + <children> + <entityParameter> + <name>Entity_param</name> + <valueProcess>%aditoprj%/entity/Observation_entity/entityfields/objectproxyconsumer/children/entity_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + <dependency> + <name>dependency</name> + <entityName>ObjectProxy_entity</entityName> + <fieldName>FilteredObjects</fieldName> + </dependency> + </entityConsumer> + <entityField> + <name>TRIGGEREVENTUPDATE</name> + <title>Update</title> + <contentType>BOOLEAN</contentType> + <groupable v="false" /> + <dropDownProcess>%aditoprj%/entity/Observation_entity/entityfields/triggereventupdate/dropDownProcess.js</dropDownProcess> + <valueProcess>%aditoprj%/entity/Observation_entity/entityfields/triggereventupdate/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>TRIGGEREVENTINSERT</name> + <title>Insert</title> + <contentType>BOOLEAN</contentType> + <groupable v="false" /> + <dropDownProcess>%aditoprj%/entity/Observation_entity/entityfields/triggereventinsert/dropDownProcess.js</dropDownProcess> + <stateProcess>%aditoprj%/entity/Observation_entity/entityfields/triggereventinsert/stateProcess.js</stateProcess> + <valueProcess>%aditoprj%/entity/Observation_entity/entityfields/triggereventinsert/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>TRIGGEREVENTDELETE</name> + <title>Delete</title> + <contentType>BOOLEAN</contentType> + <groupable v="false" /> + <dropDownProcess>%aditoprj%/entity/Observation_entity/entityfields/triggereventdelete/dropDownProcess.js</dropDownProcess> + <valueProcess>%aditoprj%/entity/Observation_entity/entityfields/triggereventdelete/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>OBJECT_FILTER</name> + <title>Object Filter</title> + <contentType>FILTER_TREE</contentType> + <stateProcess>%aditoprj%/entity/Observation_entity/entityfields/object_filter/stateProcess.js</stateProcess> + <valueProcess>%aditoprj%/entity/Observation_entity/entityfields/object_filter/valueProcess.js</valueProcess> + <onValueChange>%aditoprj%/entity/Observation_entity/entityfields/object_filter/onValueChange.js</onValueChange> + </entityField> + <entityField> + <name>OBJECT_FIELD</name> + <title>Fields</title> + <contentType>TEXT</contentType> + <dropDownProcess>%aditoprj%/entity/Observation_entity/entityfields/object_field/dropDownProcess.js</dropDownProcess> + <selectionMode>MULTI</selectionMode> + <stateProcess>%aditoprj%/entity/Observation_entity/entityfields/object_field/stateProcess.js</stateProcess> + <valueProcess>%aditoprj%/entity/Observation_entity/entityfields/object_field/valueProcess.js</valueProcess> + </entityField> + <entityParameter> + <name>OnlyMyObservations_param</name> + <valueProcess>%aditoprj%/entity/Observation_entity/entityfields/onlymyobservations_param/valueProcess.js</valueProcess> + <expose v="true" /> + </entityParameter> + <entityParameter> + <name>Observer_param</name> + <valueProcess>%aditoprj%/entity/Observation_entity/entityfields/observer_param/valueProcess.js</valueProcess> + <expose v="true" /> + </entityParameter> + <entityProvider> + <name>MyObservation</name> + <children> + <entityParameter> + <name>Observer_param</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>OnlyMyObservations_param</name> + <expose v="false" /> + </entityParameter> + </children> + </entityProvider> + <entityField> + <name>observationType</name> + <title>Observation Type</title> + <groupable v="false" /> + <displayValueProcess>%aditoprj%/entity/Observation_entity/entityfields/observationtype/displayValueProcess.js</displayValueProcess> + </entityField> + <entityConsumer> + <name>Contexts</name> + <children> + <entityParameter> + <name>Blacklist_param</name> + <valueProcess>%aditoprj%/entity/Observation_entity/entityfields/contexts/children/blacklist_param/valueProcess.js</valueProcess> + </entityParameter> + <entityParameter> + <name>InvertBlacklist_param</name> + <valueProcess>%aditoprj%/entity/Observation_entity/entityfields/contexts/children/invertblacklist_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + <dependency> + <name>dependency</name> + <entityName>Context_entity</entityName> + <fieldName>Exclusive</fieldName> + </dependency> + </entityConsumer> + <entityField> + <name>OBSERVATION_ID</name> + <groupable v="false" /> + <valueProcess>%aditoprj%/entity/Observation_entity/entityfields/observation_id/valueProcess.js</valueProcess> + </entityField> + <entityActionGroup> + <name>FilterActions</name> + <children> + <entityActionField> + <name>addDependency</name> + <title>Add Dependency</title> + <onActionProcess>%aditoprj%/entity/Observation_entity/entityfields/filteractions/children/adddependency/onActionProcess.js</onActionProcess> + <isSelectionAction v="true" /> + <stateProcess>%aditoprj%/entity/Observation_entity/entityfields/filteractions/children/adddependency/stateProcess.js</stateProcess> + </entityActionField> + </children> + </entityActionGroup> + <entityParameter> + <name>Observation_id_param</name> + <expose v="true" /> + </entityParameter> + <entityField> + <name>NOTIFICATION_PRIO</name> + <title>Priority</title> + <consumer>PrioKeywords</consumer> + <valueProcess>%aditoprj%/entity/Observation_entity/entityfields/notification_prio/valueProcess.js</valueProcess> + <displayValueProcess>%aditoprj%/entity/Observation_entity/entityfields/notification_prio/displayValueProcess.js</displayValueProcess> + </entityField> + </entityFields> + <recordContainers> + <dbRecordContainer> + <name>db</name> + <alias>Data_alias</alias> + <isPageable v="false" /> + <hasDependentRecords v="true" /> + <conditionProcess>%aditoprj%/entity/Observation_entity/recordcontainers/db/conditionProcess.js</conditionProcess> + <orderClauseProcess>%aditoprj%/entity/Observation_entity/recordcontainers/db/orderClauseProcess.js</orderClauseProcess> + <onDBDelete>%aditoprj%/entity/Observation_entity/recordcontainers/db/onDBDelete.js</onDBDelete> + <cacheType>GLOBAL</cacheType> + <linkInformation> + <linkInformation> + <name>013ae123-fbb0-42c1-b57a-0d6fcbf21477</name> + <tableName>OBSERVATION</tableName> + <primaryKey>OBSERVATIONID</primaryKey> + <isUIDTable v="true" /> + <readonly v="false" /> + </linkInformation> + </linkInformation> + <recordFieldMappings> + <dbRecordFieldMapping> + <name>DATE_EDIT.value</name> + <recordfield>OBSERVATION.DATE_EDIT</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>DATE_NEW.value</name> + <recordfield>OBSERVATION.DATE_NEW</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>OBJECT_ID.value</name> + <recordfield>OBSERVATION.OBJECT_ID</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>OBJECT_TYPE.value</name> + <recordfield>OBSERVATION.OBJECT_TYPE</recordfield> + <isFilterable v="true" /> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>OBSERVATIONID.value</name> + <recordfield>OBSERVATION.OBSERVATIONID</recordfield> + <isFilterable v="true" /> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>USER_EDIT.value</name> + <recordfield>OBSERVATION.USER_EDIT</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>USER_NEW.value</name> + <recordfield>OBSERVATION.USER_NEW</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>OBSERVER.value</name> + <recordfield>OBSERVATION.OBSERVER</recordfield> + <isFilterable v="true" /> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>TRIGGEREVENTDELETE.value</name> + <recordfield>OBSERVATION.TRIGGEREVENTDELETE</recordfield> + <isFilterable v="true" /> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>TRIGGEREVENTINSERT.value</name> + <recordfield>OBSERVATION.TRIGGEREVENTINSERT</recordfield> + <isFilterable v="true" /> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>TRIGGEREVENTUPDATE.value</name> + <recordfield>OBSERVATION.TRIGGEREVENTUPDATE</recordfield> + <isFilterable v="true" /> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>OBJECT_FIELD.value</name> + <recordfield>OBSERVATION.OBJECT_FIELD</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>OBJECT_FILTER.value</name> + <recordfield>OBSERVATION.OBJECT_FILTER</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>observationType.value</name> + <expression>%aditoprj%/entity/Observation_entity/recordcontainers/db/recordfieldmappings/observationtype.value/expression.js</expression> + <isFilterable v="true" /> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>OBSERVATION_ID.value</name> + <recordfield>OBSERVATION.OBSERVATION_ID</recordfield> + <isFilterable v="true" /> + <isLookupFilter v="true" /> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>NOTIFICATION_PRIO.value</name> + <recordfield>OBSERVATION.NOTIFICATION_PRIO</recordfield> + <isFilterable v="true" /> + </dbRecordFieldMapping> + </recordFieldMappings> + </dbRecordContainer> + </recordContainers> +</entity> diff --git a/entity/Observation_entity/documentation.adoc b/entity/Observation_entity/documentation.adoc new file mode 100644 index 0000000000000000000000000000000000000000..7ecfc5a25ee243668153799dfbc20d77c4caade5 --- /dev/null +++ b/entity/Observation_entity/documentation.adoc @@ -0,0 +1,16 @@ += Observation + +This entity is responsible for the administration of the observations and their dependencies. + + +It is possible to set observations for different entities that are triggered based on changes in a data set +that is being observed directly or is contained in a filter. Fields that are not relevant for the observer +can be excluded. In addition, the user can decide whether he would like to know when a data record is +inserted, updated or deleted. + +=== Things for Observable Entities required + +* The entity had to trigger the Workflow in the onInsert, onUpdate and onDelete Processes +* The entity had to have a content Title +* The entity had to be customizing in the Blacklist_param of the Context Consumer if its not an dependency. Otherwise it had to be customizing in the Dependency_lib with the "isObservable" option +* The entityfields which should not be displayed must also be customized diff --git a/entity/Observation_entity/entityfields/contexts/children/blacklist_param/valueProcess.js b/entity/Observation_entity/entityfields/contexts/children/blacklist_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..6909cdb59b6171c7c164095554f9898a0a1bd9cb --- /dev/null +++ b/entity/Observation_entity/entityfields/contexts/children/blacklist_param/valueProcess.js @@ -0,0 +1,28 @@ +import("Observation_lib"); +import("system.vars"); +import("system.result"); +import("Sql_lib") + +if (vars.get("$field.OBSERVATION_ID")) +{ + result.object(Observation.getAllDependencyValue(newSelect("OBSERVATION.OBJECT_TYPE").from("OBSERVATION").where("OBSERVATION.OBSERVATIONID", vars.get("$field.OBSERVATION_ID")).cell())); +} +else +{ + result.object([ + "Activity", + "Campaign", + "Contract", + "Employee", + "Favorite", + "Leadimport", + "Offer", + "Order", + "Organisation", + "Person", + "Product", + "Salesproject", + "SupportTicket", + "Task" +]); +} diff --git a/entity/Observation_entity/entityfields/contexts/children/invertblacklist_param/valueProcess.js b/entity/Observation_entity/entityfields/contexts/children/invertblacklist_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..40effa0178464da0c7850912345f19c7fa95975a --- /dev/null +++ b/entity/Observation_entity/entityfields/contexts/children/invertblacklist_param/valueProcess.js @@ -0,0 +1,3 @@ +import("system.result"); + +result.string(true); \ No newline at end of file diff --git a/entity/Observation_entity/entityfields/date_edit/valueProcess.js b/entity/Observation_entity/entityfields/date_edit/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..8d41a64d6993f71d00e0879f5eb4aed0aa0b866d --- /dev/null +++ b/entity/Observation_entity/entityfields/date_edit/valueProcess.js @@ -0,0 +1,6 @@ +import("system.result"); +import("system.neon"); +import("system.vars"); + +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT) + result.string(vars.get("$sys.date")); \ No newline at end of file diff --git a/entity/Observation_entity/entityfields/date_new/valueProcess.js b/entity/Observation_entity/entityfields/date_new/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..8ee28e84edb9930de54975f81e8cb5a13c9aa02f --- /dev/null +++ b/entity/Observation_entity/entityfields/date_new/valueProcess.js @@ -0,0 +1,6 @@ +import("system.result"); +import("system.neon"); +import("system.vars"); + +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) + result.string(vars.get("$sys.date")); \ No newline at end of file diff --git a/entity/Observation_entity/entityfields/filteractions/children/adddependency/onActionProcess.js b/entity/Observation_entity/entityfields/filteractions/children/adddependency/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..3f1d0c11b35d36ecaf864732aac6a84ee3dc449c --- /dev/null +++ b/entity/Observation_entity/entityfields/filteractions/children/adddependency/onActionProcess.js @@ -0,0 +1,13 @@ +import("system.vars"); +import("system.entities"); +import("Observation_lib"); +import("system.neon"); + +let selectedUIDs = vars.get("$sys.selection"); + +if (selectedUIDs.length === 1){ + let params = { + "Observation_id_param" : selectedUIDs[0] + } + neon.openContext("Observation", "ObservationEdit_view", null, neon.OPERATINGSTATE_NEW, params); +} \ No newline at end of file diff --git a/entity/Observation_entity/entityfields/filteractions/children/adddependency/stateProcess.js b/entity/Observation_entity/entityfields/filteractions/children/adddependency/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..2a13adbf563e621b559ce419dc5290a1701ddb90 --- /dev/null +++ b/entity/Observation_entity/entityfields/filteractions/children/adddependency/stateProcess.js @@ -0,0 +1,11 @@ +import("Context_lib"); +import("system.result"); +import("system.vars"); +import("system.neon"); +let selectedUIDs = vars.get("$sys.selection"); +ContextUtils.getContextId("Observation_entity"); + +if (selectedUIDs.length !== 1 || vars.get("$field.OBSERVATION_ID")) + result.string(neon.COMPONENTSTATE_DISABLED); +else + result.string(neon.COMPONENTSTATE_EDITABLE); \ No newline at end of file diff --git a/entity/Observation_entity/entityfields/notification_prio/displayValueProcess.js b/entity/Observation_entity/entityfields/notification_prio/displayValueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..0f475486d679f56d4a977f7e00a5cdb544331bbf --- /dev/null +++ b/entity/Observation_entity/entityfields/notification_prio/displayValueProcess.js @@ -0,0 +1,6 @@ +import("system.result"); +import("system.vars"); +import("KeywordRegistry_basic"); +import("Keyword_lib"); + +result.string(KeywordUtils.getViewValue($KeywordRegistry.notificationPriority(), vars.get("$this.value"))); \ No newline at end of file diff --git a/entity/Observation_entity/entityfields/notification_prio/valueProcess.js b/entity/Observation_entity/entityfields/notification_prio/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..efe3d0935078133f3da505a8e13e8b5a36a732a1 --- /dev/null +++ b/entity/Observation_entity/entityfields/notification_prio/valueProcess.js @@ -0,0 +1,6 @@ +import("KeywordRegistry_basic"); +import("system.result"); +import("system.vars"); + +if (!vars.get("$this.value")) + result.string($KeywordRegistry.notificationPriority$normal()); \ No newline at end of file diff --git a/entity/Observation_entity/entityfields/object_field/dropDownProcess.js b/entity/Observation_entity/entityfields/object_field/dropDownProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..b0d5277bc58c7f968310c549db58fa67fa61e917 --- /dev/null +++ b/entity/Observation_entity/entityfields/object_field/dropDownProcess.js @@ -0,0 +1,6 @@ +import("system.result"); +import("Observation_lib"); +import("system.vars"); + + +result.object(Observation.getAllPosibleFields(vars.get("$field.OBJECT_TYPE"))); diff --git a/entity/Observation_entity/entityfields/object_field/stateProcess.js b/entity/Observation_entity/entityfields/object_field/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..95baf534c8ea447534f59933ddd965ae053e7d19 --- /dev/null +++ b/entity/Observation_entity/entityfields/object_field/stateProcess.js @@ -0,0 +1,8 @@ +import("system.neon"); +import("system.vars"); +import("system.result"); + +if (vars.get("$field.OBJECT_TYPE")) + result.string(neon.COMPONENTSTATE_EDITABLE); +else + result.string(neon.COMPONENTSTATE_INVISIBLE); diff --git a/entity/Observation_entity/entityfields/object_field/valueProcess.js b/entity/Observation_entity/entityfields/object_field/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..99147fd1e3f393ceaf6053ba8d320411a66ac717 --- /dev/null +++ b/entity/Observation_entity/entityfields/object_field/valueProcess.js @@ -0,0 +1,7 @@ +import("system.vars"); +import("Observation_lib"); +import("system.result"); +import("system.neon"); + +if (!vars.get("$this.value") && vars.get("$field.OBJECT_TYPE") && (vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_NEW || vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_EDIT)) + result.string(Observation.getAllFieldValue(vars.get("$field.OBJECT_TYPE"))); \ No newline at end of file diff --git a/entity/Observation_entity/entityfields/object_filter/onValueChange.js b/entity/Observation_entity/entityfields/object_filter/onValueChange.js new file mode 100644 index 0000000000000000000000000000000000000000..55c74d79ec6e955417f2dbe7176b0d1480bc8358 --- /dev/null +++ b/entity/Observation_entity/entityfields/object_filter/onValueChange.js @@ -0,0 +1,4 @@ +import("system.vars"); + +if (vars.get("$this.value") && JSON.parse(vars.get("$this.value")).filter.childs.length > 0) + vars.set("$field.OBJECT_ID", null); \ No newline at end of file diff --git a/entity/Observation_entity/entityfields/object_filter/stateProcess.js b/entity/Observation_entity/entityfields/object_filter/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..5e0b2ea0ea55e6962770bc343dc5471b105420a7 --- /dev/null +++ b/entity/Observation_entity/entityfields/object_filter/stateProcess.js @@ -0,0 +1,8 @@ +import("system.neon"); +import("system.vars"); +import("system.result"); + +if (vars.get("$field.OBJECT_TYPE") && !vars.get("$field.OBJECT_ID")) + result.string(neon.COMPONENTSTATE_EDITABLE); +else + result.string(neon.COMPONENTSTATE_INVISIBLE); diff --git a/entity/Observation_entity/entityfields/object_filter/valueProcess.js b/entity/Observation_entity/entityfields/object_filter/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..e1eab777e321453398af0f07b195fe48287fe6ff --- /dev/null +++ b/entity/Observation_entity/entityfields/object_filter/valueProcess.js @@ -0,0 +1,8 @@ +import("Observation_lib"); +import("Context_lib"); +import("system.vars"); +import("system.result"); + +if ((vars.get("$this.value") == null || vars.get("$this.value") == "") && vars.get("$field.OBJECT_TYPE") && !vars.get("$field.OBJECT_ID")) { + result.string(Observation.getContextFilter(vars.get("$field.OBJECT_TYPE"), null)); +} \ No newline at end of file diff --git a/entity/Observation_entity/entityfields/object_id/displayValueProcess.js b/entity/Observation_entity/entityfields/object_id/displayValueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..7980bda1dde583895008c0a6cdd922077878ae53 --- /dev/null +++ b/entity/Observation_entity/entityfields/object_id/displayValueProcess.js @@ -0,0 +1,14 @@ +import("system.vars"); +import("system.entities"); +import("system.result"); +import("Employee_lib") + +if (vars.get("$field.OBJECT_TYPE") && vars.get("$field.OBJECT_ID")) +{ + var loadConfig = entities.createConfigForLoadingRows() + .entity(vars.get("$field.OBJECT_TYPE") + "_entity") + .fields(["#CONTENTTITLE"]) + .uid(vars.get("$field.OBJECT_ID")) + + result.string(entities.getRow(loadConfig)["#CONTENTTITLE"]); +} diff --git a/entity/Observation_entity/entityfields/object_id/linkedContextProcess.js b/entity/Observation_entity/entityfields/object_id/linkedContextProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..6c0f139c434895f76ce4180c889efc953c74bfdb --- /dev/null +++ b/entity/Observation_entity/entityfields/object_id/linkedContextProcess.js @@ -0,0 +1,5 @@ +import("system.vars"); +import("system.result"); + +if (vars.get("$field.OBJECT_ID")) + result.string(vars.get("$field.OBJECT_TYPE")); \ No newline at end of file diff --git a/entity/Observation_entity/entityfields/object_id/onValueChange.js b/entity/Observation_entity/entityfields/object_id/onValueChange.js new file mode 100644 index 0000000000000000000000000000000000000000..058703b23436c4742aadbf71ec710e220f21e65d --- /dev/null +++ b/entity/Observation_entity/entityfields/object_id/onValueChange.js @@ -0,0 +1,11 @@ +import("Context_lib"); +import("Observation_lib"); +import("system.vars"); + +if (vars.get("$this.value")) +{ + vars.set("$field.OBJECT_FILTER", null); + vars.set("$field.TRIGGEREVENTINSERT", 0); +} +else + vars.set("$field.TRIGGEREVENTINSERT", 1); \ No newline at end of file diff --git a/entity/Observation_entity/entityfields/object_id/stateProcess.js b/entity/Observation_entity/entityfields/object_id/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..09e42012ed6ff88e18ac1c12ce9fa660eaeb3bfc --- /dev/null +++ b/entity/Observation_entity/entityfields/object_id/stateProcess.js @@ -0,0 +1,8 @@ +import("system.neon"); +import("system.vars"); +import("system.result"); + +if (vars.get("$field.OBJECT_TYPE") && !(vars.get("$field.OBJECT_FILTER") && JSON.parse(vars.get("$field.OBJECT_FILTER")).filter.childs.length > 0)) + result.string(neon.COMPONENTSTATE_EDITABLE); +else + result.string(neon.COMPONENTSTATE_INVISIBLE); diff --git a/entity/Observation_entity/entityfields/object_id/valueProcess.js b/entity/Observation_entity/entityfields/object_id/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..0d548d4da42d78867153de937258b1388ee775ec --- /dev/null +++ b/entity/Observation_entity/entityfields/object_id/valueProcess.js @@ -0,0 +1,8 @@ +import("Employee_lib"); +import("system.vars"); +import("system.result"); + +let value = vars.get("$this.value"); + +if (vars.get("$this.value")) + result.string(vars.get("$field.OBJECT_TYPE") == "Employee" && value.length == 36 ? EmployeeUtils.prefixUserId(value) : value); \ No newline at end of file diff --git a/entity/Observation_entity/entityfields/object_type/displayValueProcess.js b/entity/Observation_entity/entityfields/object_type/displayValueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..1805b1860acb81fa6e80120a160b3f6cb1351c14 --- /dev/null +++ b/entity/Observation_entity/entityfields/object_type/displayValueProcess.js @@ -0,0 +1,9 @@ +import("system.translate"); +import("system.result"); +import("system.vars"); +import("Context_lib"); + +let type = vars.get("$field.OBJECT_TYPE"); + +if (type) + result.string(translate.text(ContextUtils.getContextName(type))); \ No newline at end of file diff --git a/entity/Observation_entity/entityfields/object_type/onValueChange.js b/entity/Observation_entity/entityfields/object_type/onValueChange.js new file mode 100644 index 0000000000000000000000000000000000000000..9bcd9261bdd4b363f261de9b5e1edad733a7b9ea --- /dev/null +++ b/entity/Observation_entity/entityfields/object_type/onValueChange.js @@ -0,0 +1,6 @@ +import("system.neon"); +import("Observation_lib"); +import("system.vars"); + +if (vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_NEW) + vars.set("$field.OBJECT_FIELD",null); \ No newline at end of file diff --git a/entity/Observation_entity/entityfields/object_type/stateProcess.js b/entity/Observation_entity/entityfields/object_type/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..643741ad3220ee883606474ee01ebcbbbf5ad208 --- /dev/null +++ b/entity/Observation_entity/entityfields/object_type/stateProcess.js @@ -0,0 +1,8 @@ +import("system.neon"); +import("system.vars"); +import("system.result"); + +if (vars.get("$sys.recordstate") != neon.OPERATINGSTATE_EDIT) + result.string(neon.COMPONENTSTATE_EDITABLE); +else + result.string(neon.COMPONENTSTATE_READONLY); \ No newline at end of file diff --git a/entity/Observation_entity/entityfields/objectproxyconsumer/children/entity_param/valueProcess.js b/entity/Observation_entity/entityfields/objectproxyconsumer/children/entity_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..574d469f847e371987a6b404c575b8e6c2b4d415 --- /dev/null +++ b/entity/Observation_entity/entityfields/objectproxyconsumer/children/entity_param/valueProcess.js @@ -0,0 +1,5 @@ +import("system.result"); +import("system.vars"); +import("Context_lib") + +result.string(ContextUtils.getEntity(vars.get("$field.OBJECT_TYPE"))); \ No newline at end of file diff --git a/entity/Observation_entity/entityfields/observation_id/valueProcess.js b/entity/Observation_entity/entityfields/observation_id/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..a8558e58cad26d101cdb073a9b68d3b5ead61ef2 --- /dev/null +++ b/entity/Observation_entity/entityfields/observation_id/valueProcess.js @@ -0,0 +1,6 @@ +import("system.result"); +import("system.vars"); +if (vars.exists("$param.Observation_id_param") && vars.getString("$param.Observation_id_param")) +{ + result.string(vars.getString("$param.Observation_id_param")); +} diff --git a/entity/Observation_entity/entityfields/observationtype/displayValueProcess.js b/entity/Observation_entity/entityfields/observationtype/displayValueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..7c3584c65dbe3d112d03467516ed92a7b061c519 --- /dev/null +++ b/entity/Observation_entity/entityfields/observationtype/displayValueProcess.js @@ -0,0 +1,15 @@ +import("system.result"); +import("system.entities"); +import("system.vars"); + +if (vars.get("$this.value") && vars.get("$this.value") != "FILTER" ) +{ + var loadConfig = entities.createConfigForLoadingRows() + .entity(vars.get("$field.OBJECT_TYPE") + "_entity") + .fields(["#CONTENTTITLE"]) + .uid(vars.get("$this.value")) + + result.string(entities.getRow(loadConfig)["#CONTENTTITLE"]); +} else { + result.string("Filter"); +} diff --git a/entity/Observation_entity/entityfields/observer/displayValueProcess.js b/entity/Observation_entity/entityfields/observer/displayValueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..cb2f2d2c69db5f0e82ae95bfa6b8f8090c8de433 --- /dev/null +++ b/entity/Observation_entity/entityfields/observer/displayValueProcess.js @@ -0,0 +1,8 @@ +import("system.result"); +import("system.logging"); +import("system.vars"); +import("system.tools"); + +var user = tools.getUserByAttribute(tools.NAME, vars.get("$field.OBSERVER"), tools.PROFILE_DEFAULT); +if (user) + result.string((user.params.firstname + " " + user.params.lastname).trim()); \ No newline at end of file diff --git a/entity/Observation_entity/entityfields/observer/stateProcess.js b/entity/Observation_entity/entityfields/observer/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..e930c613bf00b043822b8deda3fb50fffc555121 --- /dev/null +++ b/entity/Observation_entity/entityfields/observer/stateProcess.js @@ -0,0 +1,8 @@ +import("system.neon"); +import("system.vars"); +import("system.result"); + +if (vars.get("$sys.recordstate") != neon.OPERATINGSTATE_EDIT && vars.get("$param.OnlyMyObservations_param") != "true") + result.string(neon.COMPONENTSTATE_EDITABLE); +else + result.string(neon.COMPONENTSTATE_READONLY); \ No newline at end of file diff --git a/entity/Observation_entity/entityfields/observer/valueProcess.js b/entity/Observation_entity/entityfields/observer/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..9643850fd4816576b543c3fefb624575d6957e1e --- /dev/null +++ b/entity/Observation_entity/entityfields/observer/valueProcess.js @@ -0,0 +1,7 @@ +import("system.result"); +import("system.vars") + +if (!vars.get("$this.value") && vars.get("$param.Observer_param")) + result.string(vars.get("$param.Observer_param")); + + diff --git a/entity/Observation_entity/entityfields/observer_param/valueProcess.js b/entity/Observation_entity/entityfields/observer_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..3bc7f5cd1797ce903128a6d074df6ee4cc34dd18 --- /dev/null +++ b/entity/Observation_entity/entityfields/observer_param/valueProcess.js @@ -0,0 +1,5 @@ +import("Employee_lib"); +import("system.result"); + + +result.string( EmployeeUtils.getCurrentUserId()); \ No newline at end of file diff --git a/entity/Observation_entity/entityfields/onlymyobservations_param/valueProcess.js b/entity/Observation_entity/entityfields/onlymyobservations_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..599bfc35195077f2fb171156ddaf1faddd9b3254 --- /dev/null +++ b/entity/Observation_entity/entityfields/onlymyobservations_param/valueProcess.js @@ -0,0 +1,3 @@ +import("system.result"); + +result.string(true) \ No newline at end of file diff --git a/entity/Observation_entity/entityfields/priokeywords/children/containername_param/valueProcess.js b/entity/Observation_entity/entityfields/priokeywords/children/containername_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..1a1a50c90c786f687c2ed3833d696dc022b3d4d0 --- /dev/null +++ b/entity/Observation_entity/entityfields/priokeywords/children/containername_param/valueProcess.js @@ -0,0 +1,4 @@ +import("system.result"); + + +result.string("NotificationPriority"); \ No newline at end of file diff --git a/entity/Observation_entity/entityfields/triggereventdelete/dropDownProcess.js b/entity/Observation_entity/entityfields/triggereventdelete/dropDownProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..3373b8a886df7267c9205c206442cb2e091128fb --- /dev/null +++ b/entity/Observation_entity/entityfields/triggereventdelete/dropDownProcess.js @@ -0,0 +1,7 @@ +import("system.translate"); +import("system.result"); + +result.object([ + ["1", translate.text("Yes")], + ["0", translate.text("No")] +]); \ No newline at end of file diff --git a/entity/Observation_entity/entityfields/triggereventdelete/valueProcess.js b/entity/Observation_entity/entityfields/triggereventdelete/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..72e22f0a52f1d6439b67df5abc59a66280df8fd4 --- /dev/null +++ b/entity/Observation_entity/entityfields/triggereventdelete/valueProcess.js @@ -0,0 +1,6 @@ +import("system.neon"); +import("system.vars"); +import("system.result"); + +if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.get("$this.value") == null) + result.string("1"); \ No newline at end of file diff --git a/entity/Observation_entity/entityfields/triggereventinsert/dropDownProcess.js b/entity/Observation_entity/entityfields/triggereventinsert/dropDownProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..3373b8a886df7267c9205c206442cb2e091128fb --- /dev/null +++ b/entity/Observation_entity/entityfields/triggereventinsert/dropDownProcess.js @@ -0,0 +1,7 @@ +import("system.translate"); +import("system.result"); + +result.object([ + ["1", translate.text("Yes")], + ["0", translate.text("No")] +]); \ No newline at end of file diff --git a/entity/Observation_entity/entityfields/triggereventinsert/stateProcess.js b/entity/Observation_entity/entityfields/triggereventinsert/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..af9cbe9f36d002960c26b820a9d5cf02f5f6ee36 --- /dev/null +++ b/entity/Observation_entity/entityfields/triggereventinsert/stateProcess.js @@ -0,0 +1,6 @@ +import("system.neon"); +import("system.vars"); +import("system.result"); + +if (vars.get("$field.OBJECT_ID") && (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW || vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT)) + result.string(neon.COMPONENTSTATE_INVISIBLE); diff --git a/entity/Observation_entity/entityfields/triggereventinsert/valueProcess.js b/entity/Observation_entity/entityfields/triggereventinsert/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..72e22f0a52f1d6439b67df5abc59a66280df8fd4 --- /dev/null +++ b/entity/Observation_entity/entityfields/triggereventinsert/valueProcess.js @@ -0,0 +1,6 @@ +import("system.neon"); +import("system.vars"); +import("system.result"); + +if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.get("$this.value") == null) + result.string("1"); \ No newline at end of file diff --git a/entity/Observation_entity/entityfields/triggereventupdate/dropDownProcess.js b/entity/Observation_entity/entityfields/triggereventupdate/dropDownProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..3373b8a886df7267c9205c206442cb2e091128fb --- /dev/null +++ b/entity/Observation_entity/entityfields/triggereventupdate/dropDownProcess.js @@ -0,0 +1,7 @@ +import("system.translate"); +import("system.result"); + +result.object([ + ["1", translate.text("Yes")], + ["0", translate.text("No")] +]); \ No newline at end of file diff --git a/entity/Observation_entity/entityfields/triggereventupdate/valueProcess.js b/entity/Observation_entity/entityfields/triggereventupdate/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..72e22f0a52f1d6439b67df5abc59a66280df8fd4 --- /dev/null +++ b/entity/Observation_entity/entityfields/triggereventupdate/valueProcess.js @@ -0,0 +1,6 @@ +import("system.neon"); +import("system.vars"); +import("system.result"); + +if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.get("$this.value") == null) + result.string("1"); \ No newline at end of file diff --git a/entity/Observation_entity/entityfields/user_edit/valueProcess.js b/entity/Observation_entity/entityfields/user_edit/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..90383c071316dc55fe51d43a93dd7db75551842e --- /dev/null +++ b/entity/Observation_entity/entityfields/user_edit/valueProcess.js @@ -0,0 +1,6 @@ +import("system.result"); +import("system.neon"); +import("system.vars"); + +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT) + result.string(vars.get("$sys.user")); \ No newline at end of file diff --git a/entity/Observation_entity/entityfields/user_new/valueProcess.js b/entity/Observation_entity/entityfields/user_new/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..dda83cfd00e13df5c6da64151f5d1e6d932a681e --- /dev/null +++ b/entity/Observation_entity/entityfields/user_new/valueProcess.js @@ -0,0 +1,6 @@ +import("system.result"); +import("system.neon"); +import("system.vars"); + +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) + result.string(vars.get("$sys.user")); \ No newline at end of file diff --git a/entity/Observation_entity/recordcontainers/db/conditionProcess.js b/entity/Observation_entity/recordcontainers/db/conditionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..759cf5066513e03d38f993d73c8d40bb31398393 --- /dev/null +++ b/entity/Observation_entity/recordcontainers/db/conditionProcess.js @@ -0,0 +1,9 @@ +import("Employee_lib"); +import("system.vars"); +import("Sql_lib"); +import("system.result"); + +var cond = newWhere(); +if (vars.get("$param.OnlyMyObservations_param") == "true") + cond.andIfSet("OBSERVATION.OBSERVER", vars.get("$param.Observer_param")); +result.string(cond.toString()); \ No newline at end of file diff --git a/entity/Observation_entity/recordcontainers/db/onDBDelete.js b/entity/Observation_entity/recordcontainers/db/onDBDelete.js new file mode 100644 index 0000000000000000000000000000000000000000..61647984def3293cbba0ec6e7f594bebe2f431ee --- /dev/null +++ b/entity/Observation_entity/recordcontainers/db/onDBDelete.js @@ -0,0 +1,5 @@ +import("Sql_lib"); +import("system.vars"); + +newWhere("OBSERVATION.OBSERVATION_ID" , vars.get("$local.uid")) +.deleteData(true, "OBSERVATION"); \ No newline at end of file diff --git a/entity/Observation_entity/recordcontainers/db/orderClauseProcess.js b/entity/Observation_entity/recordcontainers/db/orderClauseProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..058d334e7b904ddbba221fdb96df9ec9f5a6e0cc --- /dev/null +++ b/entity/Observation_entity/recordcontainers/db/orderClauseProcess.js @@ -0,0 +1,4 @@ +import("system.result"); +import("system.db"); + +result.object({"OBSERVATION.OBSERVATION_ID": db.DESCENDING}); \ No newline at end of file diff --git a/entity/Observation_entity/recordcontainers/db/recordfieldmappings/observationtype.value/expression.js b/entity/Observation_entity/recordcontainers/db/recordfieldmappings/observationtype.value/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..c70fa3937d7c97f9abfd5aa72e03abc85f77caa1 --- /dev/null +++ b/entity/Observation_entity/recordcontainers/db/recordfieldmappings/observationtype.value/expression.js @@ -0,0 +1,3 @@ +import("system.result"); + +result.string("CASE WHEN OBSERVATION.OBJECT_ID IS NOT NULL THEN OBSERVATION.OBJECT_ID ELSE 'FILTER' END"); diff --git a/entity/Offer_entity/Offer_entity.aod b/entity/Offer_entity/Offer_entity.aod index 16bc1d967bbb1e7d6dea78d43d65f8985b06327a..5e1334a5710001760fa7cd8bd03a32a4da084cc6 100644 --- a/entity/Offer_entity/Offer_entity.aod +++ b/entity/Offer_entity/Offer_entity.aod @@ -18,6 +18,27 @@ <titlePlural>Offers</titlePlural> <recordContainer>db</recordContainer> <entityFields> + <entityActionGroup> + <name>observeActionGroup</name> + <children> + <entityActionField> + <name>observe</name> + <title>Observe</title> + <onActionProcess>%aditoprj%/entity/Offer_entity/entityfields/observeactiongroup/children/observe/onActionProcess.js</onActionProcess> + <isObjectAction v="true" /> + <iconId>VAADIN:EYE</iconId> + <stateProcess>%aditoprj%/entity/Offer_entity/entityfields/observeactiongroup/children/observe/stateProcess.js</stateProcess> + <titleProcess>%aditoprj%/entity/Offer_entity/entityfields/observeactiongroup/children/observe/titleProcess.js</titleProcess> + </entityActionField> + <entityActionField> + <name>cancelObservation</name> + <onActionProcess>%aditoprj%/entity/Offer_entity/entityfields/observeactiongroup/children/cancelobservation/onActionProcess.js</onActionProcess> + <iconId>VAADIN:EYE_SLASH</iconId> + <stateProcess>%aditoprj%/entity/Offer_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js</stateProcess> + <titleProcess>%aditoprj%/entity/Offer_entity/entityfields/observeactiongroup/children/cancelobservation/titleProcess.js</titleProcess> + </entityActionField> + </children> + </entityActionGroup> <entityProvider> <name>#PROVIDER</name> <dependencies> diff --git a/entity/Offer_entity/entityfields/observeactiongroup/children/cancelobservation/onActionProcess.js b/entity/Offer_entity/entityfields/observeactiongroup/children/cancelobservation/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..35102b677cbb52d1d4a9723a42cceaef3fd5ea03 --- /dev/null +++ b/entity/Offer_entity/entityfields/observeactiongroup/children/cancelobservation/onActionProcess.js @@ -0,0 +1,3 @@ +import("Observation_lib"); + +Observation.cancelAction(); \ No newline at end of file diff --git a/entity/Offer_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js b/entity/Offer_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..9a0350f5edebe397b96a84766e7cdb8d99f77ee5 --- /dev/null +++ b/entity/Offer_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js @@ -0,0 +1,8 @@ +import("system.result"); +import("Observation_lib"); +import("system.neon"); + +if (Observation.countObservations()) + result.string(neon.COMPONENTSTATE_EDITABLE); +else + result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file diff --git a/entity/Offer_entity/entityfields/observeactiongroup/children/cancelobservation/titleProcess.js b/entity/Offer_entity/entityfields/observeactiongroup/children/cancelobservation/titleProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..87553a373a055879a524774695e4c18bcab617e9 --- /dev/null +++ b/entity/Offer_entity/entityfields/observeactiongroup/children/cancelobservation/titleProcess.js @@ -0,0 +1,5 @@ +import("system.result"); +import("system.vars"); +import("Observation_lib"); + +result.string(Observation.cancelActionTitle(vars.get("$sys.selection"))); \ No newline at end of file diff --git a/entity/Offer_entity/entityfields/observeactiongroup/children/observe/onActionProcess.js b/entity/Offer_entity/entityfields/observeactiongroup/children/observe/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..66cf7bc2991c142ee0753fec88e151d3dcf71141 --- /dev/null +++ b/entity/Offer_entity/entityfields/observeactiongroup/children/observe/onActionProcess.js @@ -0,0 +1,3 @@ +import("Observation_lib"); + +Observation.insertAction(); \ No newline at end of file diff --git a/entity/Offer_entity/entityfields/observeactiongroup/children/observe/stateProcess.js b/entity/Offer_entity/entityfields/observeactiongroup/children/observe/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..461276ea5e1e98e967047207ac6d654225a1b1c6 --- /dev/null +++ b/entity/Offer_entity/entityfields/observeactiongroup/children/observe/stateProcess.js @@ -0,0 +1,8 @@ +import("system.result"); +import("Observation_lib"); +import("system.neon"); + +if (!Observation.countObservations()) + result.string(neon.COMPONENTSTATE_EDITABLE); +else + result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file diff --git a/entity/Offer_entity/entityfields/observeactiongroup/children/observe/titleProcess.js b/entity/Offer_entity/entityfields/observeactiongroup/children/observe/titleProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..abdfbd3d7c4aff7beba9ff22cbb39abc8d195a30 --- /dev/null +++ b/entity/Offer_entity/entityfields/observeactiongroup/children/observe/titleProcess.js @@ -0,0 +1,5 @@ +import("system.result"); +import("Observation_lib"); +import("system.vars"); + +result.string(Observation.observeActionTitle(vars.get("$sys.selection"))); \ No newline at end of file diff --git a/entity/Order_entity/Order_entity.aod b/entity/Order_entity/Order_entity.aod index 0bda9d9f780367d4ddabd0e30a5e482e6d67418c..ede77ea61f132c696ec366f50edd2a85fcc76d9b 100644 --- a/entity/Order_entity/Order_entity.aod +++ b/entity/Order_entity/Order_entity.aod @@ -14,6 +14,27 @@ <titlePlural>Receipts</titlePlural> <recordContainer>db</recordContainer> <entityFields> + <entityActionGroup> + <name>observeActionGroup</name> + <children> + <entityActionField> + <name>observe</name> + <title>Observe</title> + <onActionProcess>%aditoprj%/entity/Order_entity/entityfields/observeactiongroup/children/observe/onActionProcess.js</onActionProcess> + <isObjectAction v="true" /> + <iconId>VAADIN:EYE</iconId> + <stateProcess>%aditoprj%/entity/Order_entity/entityfields/observeactiongroup/children/observe/stateProcess.js</stateProcess> + <titleProcess>%aditoprj%/entity/Order_entity/entityfields/observeactiongroup/children/observe/titleProcess.js</titleProcess> + </entityActionField> + <entityActionField> + <name>cancelObservation</name> + <onActionProcess>%aditoprj%/entity/Order_entity/entityfields/observeactiongroup/children/cancelobservation/onActionProcess.js</onActionProcess> + <iconId>VAADIN:EYE_SLASH</iconId> + <stateProcess>%aditoprj%/entity/Order_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js</stateProcess> + <titleProcess>%aditoprj%/entity/Order_entity/entityfields/observeactiongroup/children/cancelobservation/titleProcess.js</titleProcess> + </entityActionField> + </children> + </entityActionGroup> <entityProvider> <name>#PROVIDER</name> <dependencies> diff --git a/entity/Order_entity/entityfields/observeactiongroup/children/cancelobservation/onActionProcess.js b/entity/Order_entity/entityfields/observeactiongroup/children/cancelobservation/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..35102b677cbb52d1d4a9723a42cceaef3fd5ea03 --- /dev/null +++ b/entity/Order_entity/entityfields/observeactiongroup/children/cancelobservation/onActionProcess.js @@ -0,0 +1,3 @@ +import("Observation_lib"); + +Observation.cancelAction(); \ No newline at end of file diff --git a/entity/Order_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js b/entity/Order_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..9a0350f5edebe397b96a84766e7cdb8d99f77ee5 --- /dev/null +++ b/entity/Order_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js @@ -0,0 +1,8 @@ +import("system.result"); +import("Observation_lib"); +import("system.neon"); + +if (Observation.countObservations()) + result.string(neon.COMPONENTSTATE_EDITABLE); +else + result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file diff --git a/entity/Order_entity/entityfields/observeactiongroup/children/cancelobservation/titleProcess.js b/entity/Order_entity/entityfields/observeactiongroup/children/cancelobservation/titleProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..87553a373a055879a524774695e4c18bcab617e9 --- /dev/null +++ b/entity/Order_entity/entityfields/observeactiongroup/children/cancelobservation/titleProcess.js @@ -0,0 +1,5 @@ +import("system.result"); +import("system.vars"); +import("Observation_lib"); + +result.string(Observation.cancelActionTitle(vars.get("$sys.selection"))); \ No newline at end of file diff --git a/entity/Order_entity/entityfields/observeactiongroup/children/observe/onActionProcess.js b/entity/Order_entity/entityfields/observeactiongroup/children/observe/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..66cf7bc2991c142ee0753fec88e151d3dcf71141 --- /dev/null +++ b/entity/Order_entity/entityfields/observeactiongroup/children/observe/onActionProcess.js @@ -0,0 +1,3 @@ +import("Observation_lib"); + +Observation.insertAction(); \ No newline at end of file diff --git a/entity/Order_entity/entityfields/observeactiongroup/children/observe/stateProcess.js b/entity/Order_entity/entityfields/observeactiongroup/children/observe/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..461276ea5e1e98e967047207ac6d654225a1b1c6 --- /dev/null +++ b/entity/Order_entity/entityfields/observeactiongroup/children/observe/stateProcess.js @@ -0,0 +1,8 @@ +import("system.result"); +import("Observation_lib"); +import("system.neon"); + +if (!Observation.countObservations()) + result.string(neon.COMPONENTSTATE_EDITABLE); +else + result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file diff --git a/entity/Order_entity/entityfields/observeactiongroup/children/observe/titleProcess.js b/entity/Order_entity/entityfields/observeactiongroup/children/observe/titleProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..abdfbd3d7c4aff7beba9ff22cbb39abc8d195a30 --- /dev/null +++ b/entity/Order_entity/entityfields/observeactiongroup/children/observe/titleProcess.js @@ -0,0 +1,5 @@ +import("system.result"); +import("Observation_lib"); +import("system.vars"); + +result.string(Observation.observeActionTitle(vars.get("$sys.selection"))); \ No newline at end of file diff --git a/entity/Organisation_entity/Organisation_entity.aod b/entity/Organisation_entity/Organisation_entity.aod index 8d4046039690f465f2b4ab576b36afe705b8781a..b97cd74089ef1ad2c2fb5432609793ba4179ef48 100644 --- a/entity/Organisation_entity/Organisation_entity.aod +++ b/entity/Organisation_entity/Organisation_entity.aod @@ -935,6 +935,22 @@ <title>Serial Actions</title> <iconId>NEON:GROUP_APPOINTMENT</iconId> <children> + <entityActionField> + <name>cancelObservation</name> + <onActionProcess>%aditoprj%/entity/Organisation_entity/entityfields/filterviewactiongroup/children/cancelobservation/onActionProcess.js</onActionProcess> + <iconId>VAADIN:EYE_SLASH</iconId> + <stateProcess>%aditoprj%/entity/Organisation_entity/entityfields/filterviewactiongroup/children/cancelobservation/stateProcess.js</stateProcess> + <titleProcess>%aditoprj%/entity/Organisation_entity/entityfields/filterviewactiongroup/children/cancelobservation/titleProcess.js</titleProcess> + </entityActionField> + <entityActionField> + <name>observe</name> + <title>Observe</title> + <onActionProcess>%aditoprj%/entity/Organisation_entity/entityfields/filterviewactiongroup/children/observe/onActionProcess.js</onActionProcess> + <isObjectAction v="true" /> + <iconId>VAADIN:EYE</iconId> + <stateProcess>%aditoprj%/entity/Organisation_entity/entityfields/filterviewactiongroup/children/observe/stateProcess.js</stateProcess> + <titleProcess>%aditoprj%/entity/Organisation_entity/entityfields/filterviewactiongroup/children/observe/titleProcess.js</titleProcess> + </entityActionField> <entityActionField> <name>addToCampaignFromTable</name> <title>Add to Campaign</title> diff --git a/entity/Organisation_entity/entityfields/filterviewactiongroup/children/cancelobservation/onActionProcess.js b/entity/Organisation_entity/entityfields/filterviewactiongroup/children/cancelobservation/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..35102b677cbb52d1d4a9723a42cceaef3fd5ea03 --- /dev/null +++ b/entity/Organisation_entity/entityfields/filterviewactiongroup/children/cancelobservation/onActionProcess.js @@ -0,0 +1,3 @@ +import("Observation_lib"); + +Observation.cancelAction(); \ No newline at end of file diff --git a/entity/Organisation_entity/entityfields/filterviewactiongroup/children/cancelobservation/stateProcess.js b/entity/Organisation_entity/entityfields/filterviewactiongroup/children/cancelobservation/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..9a0350f5edebe397b96a84766e7cdb8d99f77ee5 --- /dev/null +++ b/entity/Organisation_entity/entityfields/filterviewactiongroup/children/cancelobservation/stateProcess.js @@ -0,0 +1,8 @@ +import("system.result"); +import("Observation_lib"); +import("system.neon"); + +if (Observation.countObservations()) + result.string(neon.COMPONENTSTATE_EDITABLE); +else + result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file diff --git a/entity/Organisation_entity/entityfields/filterviewactiongroup/children/cancelobservation/titleProcess.js b/entity/Organisation_entity/entityfields/filterviewactiongroup/children/cancelobservation/titleProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..87553a373a055879a524774695e4c18bcab617e9 --- /dev/null +++ b/entity/Organisation_entity/entityfields/filterviewactiongroup/children/cancelobservation/titleProcess.js @@ -0,0 +1,5 @@ +import("system.result"); +import("system.vars"); +import("Observation_lib"); + +result.string(Observation.cancelActionTitle(vars.get("$sys.selection"))); \ No newline at end of file diff --git a/entity/Organisation_entity/entityfields/filterviewactiongroup/children/observe/onActionProcess.js b/entity/Organisation_entity/entityfields/filterviewactiongroup/children/observe/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..66cf7bc2991c142ee0753fec88e151d3dcf71141 --- /dev/null +++ b/entity/Organisation_entity/entityfields/filterviewactiongroup/children/observe/onActionProcess.js @@ -0,0 +1,3 @@ +import("Observation_lib"); + +Observation.insertAction(); \ No newline at end of file diff --git a/entity/Organisation_entity/entityfields/filterviewactiongroup/children/observe/stateProcess.js b/entity/Organisation_entity/entityfields/filterviewactiongroup/children/observe/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..461276ea5e1e98e967047207ac6d654225a1b1c6 --- /dev/null +++ b/entity/Organisation_entity/entityfields/filterviewactiongroup/children/observe/stateProcess.js @@ -0,0 +1,8 @@ +import("system.result"); +import("Observation_lib"); +import("system.neon"); + +if (!Observation.countObservations()) + result.string(neon.COMPONENTSTATE_EDITABLE); +else + result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file diff --git a/entity/Organisation_entity/entityfields/filterviewactiongroup/children/observe/titleProcess.js b/entity/Organisation_entity/entityfields/filterviewactiongroup/children/observe/titleProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..abdfbd3d7c4aff7beba9ff22cbb39abc8d195a30 --- /dev/null +++ b/entity/Organisation_entity/entityfields/filterviewactiongroup/children/observe/titleProcess.js @@ -0,0 +1,5 @@ +import("system.result"); +import("Observation_lib"); +import("system.vars"); + +result.string(Observation.observeActionTitle(vars.get("$sys.selection"))); \ No newline at end of file diff --git a/entity/Organisation_entity/recordcontainers/db/onDBUpdate.js b/entity/Organisation_entity/recordcontainers/db/onDBUpdate.js index 1f1a45acc4ec6c3e34db3bdba54fdfab62ad32ca..9f0337793c84207f61013809345f829d1f874671 100644 --- a/entity/Organisation_entity/recordcontainers/db/onDBUpdate.js +++ b/entity/Organisation_entity/recordcontainers/db/onDBUpdate.js @@ -1,3 +1,4 @@ +import("Employee_lib"); import("Sql_lib"); import("system.vars"); import("Organisation_lib"); diff --git a/entity/Person_entity/Person_entity.aod b/entity/Person_entity/Person_entity.aod index ec5c4ba86dfbc45651ad2f2904b1ef484958f796..9342573ad7f1764fc6bb98ce2e4a3d6e85e82385 100644 --- a/entity/Person_entity/Person_entity.aod +++ b/entity/Person_entity/Person_entity.aod @@ -17,6 +17,7 @@ <useFavorites v="true" /> <iconId>VAADIN:USERS</iconId> <imageProcess>%aditoprj%/entity/Person_entity/imageProcess.js</imageProcess> + <metadata>%aditoprj%/entity/Person_entity/metadata.js</metadata> <usePermissions v="false" /> <titlePlural>Contacts</titlePlural> <recordContainer>db</recordContainer> @@ -1310,6 +1311,22 @@ <isObjectAction v="false" /> <iconId>VAADIN:ENVELOPES</iconId> </entityActionField> + <entityActionField> + <name>observe</name> + <title>Observe</title> + <onActionProcess>%aditoprj%/entity/Person_entity/entityfields/filterviewactiongroup/children/observe/onActionProcess.js</onActionProcess> + <isObjectAction v="true" /> + <iconId>VAADIN:EYE</iconId> + <stateProcess>%aditoprj%/entity/Person_entity/entityfields/filterviewactiongroup/children/observe/stateProcess.js</stateProcess> + <titleProcess>%aditoprj%/entity/Person_entity/entityfields/filterviewactiongroup/children/observe/titleProcess.js</titleProcess> + </entityActionField> + <entityActionField> + <name>cancelObservation</name> + <onActionProcess>%aditoprj%/entity/Person_entity/entityfields/filterviewactiongroup/children/cancelobservation/onActionProcess.js</onActionProcess> + <iconId>VAADIN:EYE_SLASH</iconId> + <stateProcess>%aditoprj%/entity/Person_entity/entityfields/filterviewactiongroup/children/cancelobservation/stateProcess.js</stateProcess> + <titleProcess>%aditoprj%/entity/Person_entity/entityfields/filterviewactiongroup/children/cancelobservation/titleProcess.js</titleProcess> + </entityActionField> </children> </entityActionGroup> <entityActionGroup> diff --git a/entity/Person_entity/entityfields/filterviewactiongroup/children/cancelobservation/onActionProcess.js b/entity/Person_entity/entityfields/filterviewactiongroup/children/cancelobservation/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..35102b677cbb52d1d4a9723a42cceaef3fd5ea03 --- /dev/null +++ b/entity/Person_entity/entityfields/filterviewactiongroup/children/cancelobservation/onActionProcess.js @@ -0,0 +1,3 @@ +import("Observation_lib"); + +Observation.cancelAction(); \ No newline at end of file diff --git a/entity/Person_entity/entityfields/filterviewactiongroup/children/cancelobservation/stateProcess.js b/entity/Person_entity/entityfields/filterviewactiongroup/children/cancelobservation/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..9a0350f5edebe397b96a84766e7cdb8d99f77ee5 --- /dev/null +++ b/entity/Person_entity/entityfields/filterviewactiongroup/children/cancelobservation/stateProcess.js @@ -0,0 +1,8 @@ +import("system.result"); +import("Observation_lib"); +import("system.neon"); + +if (Observation.countObservations()) + result.string(neon.COMPONENTSTATE_EDITABLE); +else + result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file diff --git a/entity/Person_entity/entityfields/filterviewactiongroup/children/cancelobservation/titleProcess.js b/entity/Person_entity/entityfields/filterviewactiongroup/children/cancelobservation/titleProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..87553a373a055879a524774695e4c18bcab617e9 --- /dev/null +++ b/entity/Person_entity/entityfields/filterviewactiongroup/children/cancelobservation/titleProcess.js @@ -0,0 +1,5 @@ +import("system.result"); +import("system.vars"); +import("Observation_lib"); + +result.string(Observation.cancelActionTitle(vars.get("$sys.selection"))); \ No newline at end of file diff --git a/entity/Person_entity/entityfields/filterviewactiongroup/children/observe/onActionProcess.js b/entity/Person_entity/entityfields/filterviewactiongroup/children/observe/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..66cf7bc2991c142ee0753fec88e151d3dcf71141 --- /dev/null +++ b/entity/Person_entity/entityfields/filterviewactiongroup/children/observe/onActionProcess.js @@ -0,0 +1,3 @@ +import("Observation_lib"); + +Observation.insertAction(); \ No newline at end of file diff --git a/entity/Person_entity/entityfields/filterviewactiongroup/children/observe/stateProcess.js b/entity/Person_entity/entityfields/filterviewactiongroup/children/observe/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..461276ea5e1e98e967047207ac6d654225a1b1c6 --- /dev/null +++ b/entity/Person_entity/entityfields/filterviewactiongroup/children/observe/stateProcess.js @@ -0,0 +1,8 @@ +import("system.result"); +import("Observation_lib"); +import("system.neon"); + +if (!Observation.countObservations()) + result.string(neon.COMPONENTSTATE_EDITABLE); +else + result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file diff --git a/entity/Person_entity/entityfields/filterviewactiongroup/children/observe/titleProcess.js b/entity/Person_entity/entityfields/filterviewactiongroup/children/observe/titleProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..abdfbd3d7c4aff7beba9ff22cbb39abc8d195a30 --- /dev/null +++ b/entity/Person_entity/entityfields/filterviewactiongroup/children/observe/titleProcess.js @@ -0,0 +1,5 @@ +import("system.result"); +import("Observation_lib"); +import("system.vars"); + +result.string(Observation.observeActionTitle(vars.get("$sys.selection"))); \ No newline at end of file diff --git a/entity/Person_entity/metadata.js b/entity/Person_entity/metadata.js new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/entity/Product_entity/Product_entity.aod b/entity/Product_entity/Product_entity.aod index f9026b60de2e8f36a316601aa9135b5db131e0ce..131e65f6ecbf32111c560a87191e13c52cdf956e 100644 --- a/entity/Product_entity/Product_entity.aod +++ b/entity/Product_entity/Product_entity.aod @@ -17,6 +17,27 @@ <titlePlural>Products</titlePlural> <recordContainer>db</recordContainer> <entityFields> + <entityActionGroup> + <name>observeActionGroup</name> + <children> + <entityActionField> + <name>observe</name> + <title>Observe</title> + <onActionProcess>%aditoprj%/entity/Product_entity/entityfields/observeactiongroup/children/observe/onActionProcess.js</onActionProcess> + <isObjectAction v="true" /> + <iconId>VAADIN:EYE</iconId> + <stateProcess>%aditoprj%/entity/Product_entity/entityfields/observeactiongroup/children/observe/stateProcess.js</stateProcess> + <titleProcess>%aditoprj%/entity/Product_entity/entityfields/observeactiongroup/children/observe/titleProcess.js</titleProcess> + </entityActionField> + <entityActionField> + <name>cancelObservation</name> + <onActionProcess>%aditoprj%/entity/Product_entity/entityfields/observeactiongroup/children/cancelobservation/onActionProcess.js</onActionProcess> + <iconId>VAADIN:EYE_SLASH</iconId> + <stateProcess>%aditoprj%/entity/Product_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js</stateProcess> + <titleProcess>%aditoprj%/entity/Product_entity/entityfields/observeactiongroup/children/cancelobservation/titleProcess.js</titleProcess> + </entityActionField> + </children> + </entityActionGroup> <entityField> <name>ADVERTISING</name> <title>Advertising material</title> diff --git a/entity/Product_entity/entityfields/observeactiongroup/children/cancelobservation/onActionProcess.js b/entity/Product_entity/entityfields/observeactiongroup/children/cancelobservation/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..35102b677cbb52d1d4a9723a42cceaef3fd5ea03 --- /dev/null +++ b/entity/Product_entity/entityfields/observeactiongroup/children/cancelobservation/onActionProcess.js @@ -0,0 +1,3 @@ +import("Observation_lib"); + +Observation.cancelAction(); \ No newline at end of file diff --git a/entity/Product_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js b/entity/Product_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..9a0350f5edebe397b96a84766e7cdb8d99f77ee5 --- /dev/null +++ b/entity/Product_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js @@ -0,0 +1,8 @@ +import("system.result"); +import("Observation_lib"); +import("system.neon"); + +if (Observation.countObservations()) + result.string(neon.COMPONENTSTATE_EDITABLE); +else + result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file diff --git a/entity/Product_entity/entityfields/observeactiongroup/children/cancelobservation/titleProcess.js b/entity/Product_entity/entityfields/observeactiongroup/children/cancelobservation/titleProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..87553a373a055879a524774695e4c18bcab617e9 --- /dev/null +++ b/entity/Product_entity/entityfields/observeactiongroup/children/cancelobservation/titleProcess.js @@ -0,0 +1,5 @@ +import("system.result"); +import("system.vars"); +import("Observation_lib"); + +result.string(Observation.cancelActionTitle(vars.get("$sys.selection"))); \ No newline at end of file diff --git a/entity/Product_entity/entityfields/observeactiongroup/children/observe/onActionProcess.js b/entity/Product_entity/entityfields/observeactiongroup/children/observe/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..66cf7bc2991c142ee0753fec88e151d3dcf71141 --- /dev/null +++ b/entity/Product_entity/entityfields/observeactiongroup/children/observe/onActionProcess.js @@ -0,0 +1,3 @@ +import("Observation_lib"); + +Observation.insertAction(); \ No newline at end of file diff --git a/entity/Product_entity/entityfields/observeactiongroup/children/observe/stateProcess.js b/entity/Product_entity/entityfields/observeactiongroup/children/observe/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..461276ea5e1e98e967047207ac6d654225a1b1c6 --- /dev/null +++ b/entity/Product_entity/entityfields/observeactiongroup/children/observe/stateProcess.js @@ -0,0 +1,8 @@ +import("system.result"); +import("Observation_lib"); +import("system.neon"); + +if (!Observation.countObservations()) + result.string(neon.COMPONENTSTATE_EDITABLE); +else + result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file diff --git a/entity/Product_entity/entityfields/observeactiongroup/children/observe/titleProcess.js b/entity/Product_entity/entityfields/observeactiongroup/children/observe/titleProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..abdfbd3d7c4aff7beba9ff22cbb39abc8d195a30 --- /dev/null +++ b/entity/Product_entity/entityfields/observeactiongroup/children/observe/titleProcess.js @@ -0,0 +1,5 @@ +import("system.result"); +import("Observation_lib"); +import("system.vars"); + +result.string(Observation.observeActionTitle(vars.get("$sys.selection"))); \ No newline at end of file diff --git a/entity/Salesproject_entity/Salesproject_entity.aod b/entity/Salesproject_entity/Salesproject_entity.aod index 59562dd82e0b190e77e3cefd9f1b87e6124bf55a..7a82412677e2bddedd6730f81a286f9abad90ba0 100644 --- a/entity/Salesproject_entity/Salesproject_entity.aod +++ b/entity/Salesproject_entity/Salesproject_entity.aod @@ -21,6 +21,27 @@ <titlePlural>Salesprojects</titlePlural> <recordContainer>db</recordContainer> <entityFields> + <entityActionGroup> + <name>observeActionGroup</name> + <children> + <entityActionField> + <name>observe</name> + <title>Observe</title> + <onActionProcess>%aditoprj%/entity/Salesproject_entity/entityfields/observeactiongroup/children/observe/onActionProcess.js</onActionProcess> + <isObjectAction v="true" /> + <iconId>VAADIN:EYE</iconId> + <stateProcess>%aditoprj%/entity/Salesproject_entity/entityfields/observeactiongroup/children/observe/stateProcess.js</stateProcess> + <titleProcess>%aditoprj%/entity/Salesproject_entity/entityfields/observeactiongroup/children/observe/titleProcess.js</titleProcess> + </entityActionField> + <entityActionField> + <name>cancelObservation</name> + <onActionProcess>%aditoprj%/entity/Salesproject_entity/entityfields/observeactiongroup/children/cancelobservation/onActionProcess.js</onActionProcess> + <iconId>VAADIN:EYE_SLASH</iconId> + <stateProcess>%aditoprj%/entity/Salesproject_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js</stateProcess> + <titleProcess>%aditoprj%/entity/Salesproject_entity/entityfields/observeactiongroup/children/cancelobservation/titleProcess.js</titleProcess> + </entityActionField> + </children> + </entityActionGroup> <entityProvider> <name>#PROVIDER</name> <dependencies> diff --git a/entity/Salesproject_entity/entityfields/observeactiongroup/children/cancelobservation/onActionProcess.js b/entity/Salesproject_entity/entityfields/observeactiongroup/children/cancelobservation/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..35102b677cbb52d1d4a9723a42cceaef3fd5ea03 --- /dev/null +++ b/entity/Salesproject_entity/entityfields/observeactiongroup/children/cancelobservation/onActionProcess.js @@ -0,0 +1,3 @@ +import("Observation_lib"); + +Observation.cancelAction(); \ No newline at end of file diff --git a/entity/Salesproject_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js b/entity/Salesproject_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..9a0350f5edebe397b96a84766e7cdb8d99f77ee5 --- /dev/null +++ b/entity/Salesproject_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js @@ -0,0 +1,8 @@ +import("system.result"); +import("Observation_lib"); +import("system.neon"); + +if (Observation.countObservations()) + result.string(neon.COMPONENTSTATE_EDITABLE); +else + result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file diff --git a/entity/Salesproject_entity/entityfields/observeactiongroup/children/cancelobservation/titleProcess.js b/entity/Salesproject_entity/entityfields/observeactiongroup/children/cancelobservation/titleProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..87553a373a055879a524774695e4c18bcab617e9 --- /dev/null +++ b/entity/Salesproject_entity/entityfields/observeactiongroup/children/cancelobservation/titleProcess.js @@ -0,0 +1,5 @@ +import("system.result"); +import("system.vars"); +import("Observation_lib"); + +result.string(Observation.cancelActionTitle(vars.get("$sys.selection"))); \ No newline at end of file diff --git a/entity/Salesproject_entity/entityfields/observeactiongroup/children/observe/onActionProcess.js b/entity/Salesproject_entity/entityfields/observeactiongroup/children/observe/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..66cf7bc2991c142ee0753fec88e151d3dcf71141 --- /dev/null +++ b/entity/Salesproject_entity/entityfields/observeactiongroup/children/observe/onActionProcess.js @@ -0,0 +1,3 @@ +import("Observation_lib"); + +Observation.insertAction(); \ No newline at end of file diff --git a/entity/Salesproject_entity/entityfields/observeactiongroup/children/observe/stateProcess.js b/entity/Salesproject_entity/entityfields/observeactiongroup/children/observe/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..461276ea5e1e98e967047207ac6d654225a1b1c6 --- /dev/null +++ b/entity/Salesproject_entity/entityfields/observeactiongroup/children/observe/stateProcess.js @@ -0,0 +1,8 @@ +import("system.result"); +import("Observation_lib"); +import("system.neon"); + +if (!Observation.countObservations()) + result.string(neon.COMPONENTSTATE_EDITABLE); +else + result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file diff --git a/entity/Salesproject_entity/entityfields/observeactiongroup/children/observe/titleProcess.js b/entity/Salesproject_entity/entityfields/observeactiongroup/children/observe/titleProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..abdfbd3d7c4aff7beba9ff22cbb39abc8d195a30 --- /dev/null +++ b/entity/Salesproject_entity/entityfields/observeactiongroup/children/observe/titleProcess.js @@ -0,0 +1,5 @@ +import("system.result"); +import("Observation_lib"); +import("system.vars"); + +result.string(Observation.observeActionTitle(vars.get("$sys.selection"))); \ No newline at end of file diff --git a/entity/SupportTicket_entity/SupportTicket_entity.aod b/entity/SupportTicket_entity/SupportTicket_entity.aod index 4b3790f99674dd10365dab4146a709f622f5e355..4f3947331f546f327e5f5f4d334164ddc5ac2ead 100644 --- a/entity/SupportTicket_entity/SupportTicket_entity.aod +++ b/entity/SupportTicket_entity/SupportTicket_entity.aod @@ -14,6 +14,27 @@ <titlePlural>Support Tickets</titlePlural> <recordContainer>db</recordContainer> <entityFields> + <entityActionGroup> + <name>observeActionGroup</name> + <children> + <entityActionField> + <name>observe</name> + <title>Observe</title> + <onActionProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/observeactiongroup/children/observe/onActionProcess.js</onActionProcess> + <isObjectAction v="true" /> + <iconId>VAADIN:EYE</iconId> + <stateProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/observeactiongroup/children/observe/stateProcess.js</stateProcess> + <titleProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/observeactiongroup/children/observe/titleProcess.js</titleProcess> + </entityActionField> + <entityActionField> + <name>cancelObservation</name> + <onActionProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/observeactiongroup/children/cancelobservation/onActionProcess.js</onActionProcess> + <iconId>VAADIN:EYE_SLASH</iconId> + <stateProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js</stateProcess> + <titleProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/observeactiongroup/children/cancelobservation/titleProcess.js</titleProcess> + </entityActionField> + </children> + </entityActionGroup> <entityProvider> <name>#PROVIDER</name> <dependencies> diff --git a/entity/SupportTicket_entity/entityfields/observeactiongroup/children/cancelobservation/onActionProcess.js b/entity/SupportTicket_entity/entityfields/observeactiongroup/children/cancelobservation/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..35102b677cbb52d1d4a9723a42cceaef3fd5ea03 --- /dev/null +++ b/entity/SupportTicket_entity/entityfields/observeactiongroup/children/cancelobservation/onActionProcess.js @@ -0,0 +1,3 @@ +import("Observation_lib"); + +Observation.cancelAction(); \ No newline at end of file diff --git a/entity/SupportTicket_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js b/entity/SupportTicket_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..9a0350f5edebe397b96a84766e7cdb8d99f77ee5 --- /dev/null +++ b/entity/SupportTicket_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js @@ -0,0 +1,8 @@ +import("system.result"); +import("Observation_lib"); +import("system.neon"); + +if (Observation.countObservations()) + result.string(neon.COMPONENTSTATE_EDITABLE); +else + result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file diff --git a/entity/SupportTicket_entity/entityfields/observeactiongroup/children/cancelobservation/titleProcess.js b/entity/SupportTicket_entity/entityfields/observeactiongroup/children/cancelobservation/titleProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..87553a373a055879a524774695e4c18bcab617e9 --- /dev/null +++ b/entity/SupportTicket_entity/entityfields/observeactiongroup/children/cancelobservation/titleProcess.js @@ -0,0 +1,5 @@ +import("system.result"); +import("system.vars"); +import("Observation_lib"); + +result.string(Observation.cancelActionTitle(vars.get("$sys.selection"))); \ No newline at end of file diff --git a/entity/SupportTicket_entity/entityfields/observeactiongroup/children/observe/onActionProcess.js b/entity/SupportTicket_entity/entityfields/observeactiongroup/children/observe/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..66cf7bc2991c142ee0753fec88e151d3dcf71141 --- /dev/null +++ b/entity/SupportTicket_entity/entityfields/observeactiongroup/children/observe/onActionProcess.js @@ -0,0 +1,3 @@ +import("Observation_lib"); + +Observation.insertAction(); \ No newline at end of file diff --git a/entity/SupportTicket_entity/entityfields/observeactiongroup/children/observe/stateProcess.js b/entity/SupportTicket_entity/entityfields/observeactiongroup/children/observe/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..461276ea5e1e98e967047207ac6d654225a1b1c6 --- /dev/null +++ b/entity/SupportTicket_entity/entityfields/observeactiongroup/children/observe/stateProcess.js @@ -0,0 +1,8 @@ +import("system.result"); +import("Observation_lib"); +import("system.neon"); + +if (!Observation.countObservations()) + result.string(neon.COMPONENTSTATE_EDITABLE); +else + result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file diff --git a/entity/SupportTicket_entity/entityfields/observeactiongroup/children/observe/titleProcess.js b/entity/SupportTicket_entity/entityfields/observeactiongroup/children/observe/titleProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..abdfbd3d7c4aff7beba9ff22cbb39abc8d195a30 --- /dev/null +++ b/entity/SupportTicket_entity/entityfields/observeactiongroup/children/observe/titleProcess.js @@ -0,0 +1,5 @@ +import("system.result"); +import("Observation_lib"); +import("system.vars"); + +result.string(Observation.observeActionTitle(vars.get("$sys.selection"))); \ No newline at end of file diff --git a/entity/Task_entity/Task_entity.aod b/entity/Task_entity/Task_entity.aod index 45f3ee0f0cf0c4079ae2e8cbc05a6560bf58e0a7..08d635a4670bef4953be7fac87e2674b23078a3b 100644 --- a/entity/Task_entity/Task_entity.aod +++ b/entity/Task_entity/Task_entity.aod @@ -15,6 +15,27 @@ <titlePlural>Tasks</titlePlural> <recordContainer>db</recordContainer> <entityFields> + <entityActionGroup> + <name>observeActionGroup</name> + <children> + <entityActionField> + <name>observe</name> + <title>Observe</title> + <onActionProcess>%aditoprj%/entity/Task_entity/entityfields/observeactiongroup/children/observe/onActionProcess.js</onActionProcess> + <isObjectAction v="true" /> + <iconId>VAADIN:EYE</iconId> + <stateProcess>%aditoprj%/entity/Task_entity/entityfields/observeactiongroup/children/observe/stateProcess.js</stateProcess> + <titleProcess>%aditoprj%/entity/Task_entity/entityfields/observeactiongroup/children/observe/titleProcess.js</titleProcess> + </entityActionField> + <entityActionField> + <name>cancelObservation</name> + <onActionProcess>%aditoprj%/entity/Task_entity/entityfields/observeactiongroup/children/cancelobservation/onActionProcess.js</onActionProcess> + <iconId>VAADIN:EYE_SLASH</iconId> + <stateProcess>%aditoprj%/entity/Task_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js</stateProcess> + <titleProcess>%aditoprj%/entity/Task_entity/entityfields/observeactiongroup/children/cancelobservation/titleProcess.js</titleProcess> + </entityActionField> + </children> + </entityActionGroup> <entityProvider> <name>#PROVIDER</name> <recordContainer>db</recordContainer> diff --git a/entity/Task_entity/entityfields/observeactiongroup/children/cancelobservation/onActionProcess.js b/entity/Task_entity/entityfields/observeactiongroup/children/cancelobservation/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..35102b677cbb52d1d4a9723a42cceaef3fd5ea03 --- /dev/null +++ b/entity/Task_entity/entityfields/observeactiongroup/children/cancelobservation/onActionProcess.js @@ -0,0 +1,3 @@ +import("Observation_lib"); + +Observation.cancelAction(); \ No newline at end of file diff --git a/entity/Task_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js b/entity/Task_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..9a0350f5edebe397b96a84766e7cdb8d99f77ee5 --- /dev/null +++ b/entity/Task_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js @@ -0,0 +1,8 @@ +import("system.result"); +import("Observation_lib"); +import("system.neon"); + +if (Observation.countObservations()) + result.string(neon.COMPONENTSTATE_EDITABLE); +else + result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file diff --git a/entity/Task_entity/entityfields/observeactiongroup/children/cancelobservation/titleProcess.js b/entity/Task_entity/entityfields/observeactiongroup/children/cancelobservation/titleProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..87553a373a055879a524774695e4c18bcab617e9 --- /dev/null +++ b/entity/Task_entity/entityfields/observeactiongroup/children/cancelobservation/titleProcess.js @@ -0,0 +1,5 @@ +import("system.result"); +import("system.vars"); +import("Observation_lib"); + +result.string(Observation.cancelActionTitle(vars.get("$sys.selection"))); \ No newline at end of file diff --git a/entity/Task_entity/entityfields/observeactiongroup/children/observe/onActionProcess.js b/entity/Task_entity/entityfields/observeactiongroup/children/observe/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..66cf7bc2991c142ee0753fec88e151d3dcf71141 --- /dev/null +++ b/entity/Task_entity/entityfields/observeactiongroup/children/observe/onActionProcess.js @@ -0,0 +1,3 @@ +import("Observation_lib"); + +Observation.insertAction(); \ No newline at end of file diff --git a/entity/Task_entity/entityfields/observeactiongroup/children/observe/stateProcess.js b/entity/Task_entity/entityfields/observeactiongroup/children/observe/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..461276ea5e1e98e967047207ac6d654225a1b1c6 --- /dev/null +++ b/entity/Task_entity/entityfields/observeactiongroup/children/observe/stateProcess.js @@ -0,0 +1,8 @@ +import("system.result"); +import("Observation_lib"); +import("system.neon"); + +if (!Observation.countObservations()) + result.string(neon.COMPONENTSTATE_EDITABLE); +else + result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file diff --git a/entity/Task_entity/entityfields/observeactiongroup/children/observe/titleProcess.js b/entity/Task_entity/entityfields/observeactiongroup/children/observe/titleProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..abdfbd3d7c4aff7beba9ff22cbb39abc8d195a30 --- /dev/null +++ b/entity/Task_entity/entityfields/observeactiongroup/children/observe/titleProcess.js @@ -0,0 +1,5 @@ +import("system.result"); +import("Observation_lib"); +import("system.vars"); + +result.string(Observation.observeActionTitle(vars.get("$sys.selection"))); \ No newline at end of file diff --git a/entity/WorkflowSignal_entity/entityfields/variables/dropDownProcess.js b/entity/WorkflowSignal_entity/entityfields/variables/dropDownProcess.js index 9df9881e4fae360b6fd3c520402d6c852d240a0e..388bf3d042ac37136d25201c1f6f6dc5968c5b09 100644 --- a/entity/WorkflowSignal_entity/entityfields/variables/dropDownProcess.js +++ b/entity/WorkflowSignal_entity/entityfields/variables/dropDownProcess.js @@ -2,9 +2,7 @@ import("Workflow_lib"); import("system.translate"); import("system.result"); -var targetIdVar = WorkflowVariables.TARGET_ID(); -var targetContextVar = WorkflowVariables.TARGET_CONTEXT(); -result.object([ - [targetIdVar, targetIdVar], - [targetContextVar, targetContextVar] -]); \ No newline at end of file +let variables = WorkflowVariables.getAllVariablesName().map(function (v) { + return [v, v] +}); +result.object(variables); \ No newline at end of file diff --git a/entity/WorkflowSignal_entity/entityfields/variables/valueProcess.js b/entity/WorkflowSignal_entity/entityfields/variables/valueProcess.js index 49817c094590da7680ccf4644a6aad0feda26844..5f7cdc6027bf012af5facf2d5c124858b1795ac4 100644 --- a/entity/WorkflowSignal_entity/entityfields/variables/valueProcess.js +++ b/entity/WorkflowSignal_entity/entityfields/variables/valueProcess.js @@ -5,4 +5,4 @@ import("system.vars"); import("system.result"); if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.get("$this.value") == null) - result.string(text.encodeMS([WorkflowVariables.TARGET_ID(), WorkflowVariables.TARGET_CONTEXT()])); \ No newline at end of file + result.string(text.encodeMS(WorkflowVariables.getAllVariablesName())); \ No newline at end of file diff --git a/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod b/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod index c1fa3d52f8c452a64eb937ce415637877e7077dc..8ca5b944596ccb0ac42ddfb8e053f11f5b80b5dc 100644 --- a/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod +++ b/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod @@ -7662,6 +7662,39 @@ <entry> <key>without Vat</key> </entry> + <entry> + <key>Object Filter</key> + </entry> + <entry> + <key>Insert</key> + </entry> + <entry> + <key>Observation Type</key> + </entry> + <entry> + <key>Shows all your Observations</key> + </entry> + <entry> + <key>Add Dependency</key> + </entry> + <entry> + <key>Fields</key> + </entry> + <entry> + <key>ObservationID</key> + </entry> + <entry> + <key>Observe</key> + </entry> + <entry> + <key>Observer</key> + </entry> + <entry> + <key>Observation</key> + </entry> + <entry> + <key>Observations</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 c775a6fdeb8eeec19508ab5edc47113e1d37d0c6..17ee8816c2bda764560f83cdd414d1de1925768a 100644 --- a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod +++ b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod @@ -5237,7 +5237,7 @@ </entry> <entry> <key>Delete</key> - <value>löschen</value> + <value>Löschen</value> </entry> <entry> <key>Street</key> @@ -10106,6 +10106,104 @@ Bitte Datumseingabe prüfen</value> <entry> <key>Salesproject Phases</key> </entry> + <entry> + <key>Object Filter</key> + <value>Objekt Filter</value> + </entry> + <entry> + <key>Insert</key> + </entry> + <entry> + <key>INSERT</key> + </entry> + <entry> + <key>Observation Type</key> + <value>Beobachtungstyp</value> + </entry> + <entry> + <key>Shows all your Observations</key> + <value>Zeige all deine Beobachtungen</value> + </entry> + <entry> + <key>Add Dependency</key> + <value>Abhängigkeit hinzufügen</value> + </entry> + <entry> + <key>Fields</key> + <value>Felder</value> + </entry> + <entry> + <key>ObservationID</key> + <value>BeobachtungsID</value> + </entry> + <entry> + <key>Observe</key> + <value>beobachten</value> + </entry> + <entry> + <key>Observer</key> + <value>Beobachter</value> + </entry> + <entry> + <key>Observation</key> + <value>Beobachtung</value> + </entry> + <entry> + <key>Observations</key> + <value>Beobachtungen</value> + </entry> + <entry> + <key>Observe ID</key> + <value>Beobachte Datensatz</value> + </entry> + <entry> + <key>Observe IDs</key> + <value>Beobachte Datensätze</value> + </entry> + <entry> + <key>Observe Filter</key> + <value>Beobachte Filter</value> + </entry> + <entry> + <key>Cancel ID Observation</key> + <value>Beobachtung Datensatz aufheben</value> + </entry> + <entry> + <key>Cancel IDs Observation</key> + <value>Beobachtung Datensätz aufheben</value> + </entry> + <entry> + <key>Cancel Filter Observation</key> + <value>Beobachtung Filter aufheben</value> + </entry> + <entry> + <key>was set to</key> + <value>wurde gesetzt auf</value> + </entry> + <entry> + <key>has</key> + <value>hat</value> + </entry> + <entry> + <key>inserted</key> + <value>eingefügt</value> + </entry> + <entry> + <key>changed</key> + <value>bearbeitet</value> + </entry> + <entry> + <key>deleted</key> + <value>gelöscht</value> + </entry> + <entry> + <key>and</key> + <value>und</value> + </entry> + <entry> + <key>DELETE</key> + <value>LÖSCHEN</value> + </entry> </keyValueMap> <font name="Dialog" style="0" size="11" /> </language> diff --git a/language/_____LANGUAGE_en/_____LANGUAGE_en.aod b/language/_____LANGUAGE_en/_____LANGUAGE_en.aod index f42c439be862ad8b8ffafe068fbb02e3c3b4061f..5566de3decb9c5551976c43cee90b8a79939a38a 100644 --- a/language/_____LANGUAGE_en/_____LANGUAGE_en.aod +++ b/language/_____LANGUAGE_en/_____LANGUAGE_en.aod @@ -7743,6 +7743,39 @@ <entry> <key>without Vat</key> </entry> + <entry> + <key>Object Filter</key> + </entry> + <entry> + <key>Insert</key> + </entry> + <entry> + <key>Observation Type</key> + </entry> + <entry> + <key>Shows all your Observations</key> + </entry> + <entry> + <key>Add Dependency</key> + </entry> + <entry> + <key>Fields</key> + </entry> + <entry> + <key>ObservationID</key> + </entry> + <entry> + <key>Observe</key> + </entry> + <entry> + <key>Observer</key> + </entry> + <entry> + <key>Observation</key> + </entry> + <entry> + <key>Observations</key> + </entry> </keyValueMap> <font name="Dialog" style="0" size="11" /> </language> diff --git a/neonContext/Observation/Observation.aod b/neonContext/Observation/Observation.aod new file mode 100644 index 0000000000000000000000000000000000000000..aeab7d749b7e799c4c22e6d58f55bbc73c5be06c --- /dev/null +++ b/neonContext/Observation/Observation.aod @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonContext xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonContext/1.1.1"> + <name>Observation</name> + <title>Observation</title> + <majorModelMode>DISTRIBUTED</majorModelMode> + <icon>VAADIN:EYE</icon> + <filterView>ObservationFilter_view</filterView> + <editView>ObservationEdit_view</editView> + <previewView>ObservationPreview_view</previewView> + <entity>Observation_entity</entity> + <references> + <neonViewReference> + <name>081e645d-ede7-4987-891c-725e2300c7a0</name> + <view>ObservationFilter_view</view> + </neonViewReference> + <neonViewReference> + <name>381da87e-006b-4fd6-b2b2-18e53d675928</name> + <view>ObservationEdit_view</view> + </neonViewReference> + <neonViewReference> + <name>8e1417a2-f172-451f-9e76-81b852abcaa1</name> + <view>ObservationPreview_view</view> + </neonViewReference> + </references> +</neonContext> diff --git a/neonNotificationType/ObservationNotification/ObservationNotification.aod b/neonNotificationType/ObservationNotification/ObservationNotification.aod new file mode 100644 index 0000000000000000000000000000000000000000..da8982e18acd2def55807ba471e214b6150f0c67 --- /dev/null +++ b/neonNotificationType/ObservationNotification/ObservationNotification.aod @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonNotificationType xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonNotificationType/1.1.0"> + <name>ObservationNotification</name> + <title>Observation</title> + <majorModelMode>DISTRIBUTED</majorModelMode> + <icon>VAADIN:EYE</icon> +</neonNotificationType> diff --git a/neonView/ActivityFilter_view/ActivityFilter_view.aod b/neonView/ActivityFilter_view/ActivityFilter_view.aod index 35d2314683c8416e27e7e3ff1b4ef45d442f662c..3ee18a196f4b7685637650c0dbe320abffbc3da3 100644 --- a/neonView/ActivityFilter_view/ActivityFilter_view.aod +++ b/neonView/ActivityFilter_view/ActivityFilter_view.aod @@ -50,6 +50,7 @@ <children> <timelineViewTemplate> <name>ActivitiesTimeline</name> + <favoriteActionGroup1>filterActions</favoriteActionGroup1> <favoriteActionGroup2>MSTeamsActions</favoriteActionGroup2> <dateField>entryDateDateFormat</dateField> <titleField>SUBJECT_DETAILS</titleField> @@ -60,6 +61,7 @@ </timelineViewTemplate> <tableViewTemplate> <name>ActivitiesTable</name> + <favoriteActionGroup1>filterActions</favoriteActionGroup1> <favoriteActionGroup2>MSTeamsActions</favoriteActionGroup2> <iconField>#IMAGE</iconField> <titleField>SUBJECT</titleField> @@ -95,6 +97,7 @@ <treeTableViewTemplate> <name>ActivitiesTreeTable</name> <favoriteActionGroup2>MSTeamsActions</favoriteActionGroup2> + <favoriteActionGroup1>filterActions</favoriteActionGroup1> <entityField>#ENTITY</entityField> <columns> <neonTreeTableColumn> diff --git a/neonView/CampaignFilter_view/CampaignFilter_view.aod b/neonView/CampaignFilter_view/CampaignFilter_view.aod index 251fae2fce511b41454347cd8e36810d33a77f71..fd7b06d7a9915e375f1070a4a7839f5e25b7ac90 100644 --- a/neonView/CampaignFilter_view/CampaignFilter_view.aod +++ b/neonView/CampaignFilter_view/CampaignFilter_view.aod @@ -56,6 +56,7 @@ <tableViewTemplate> <name>Campaigns</name> <entityField>#ENTITY</entityField> + <favoriteActionGroup1>observeActionGroup</favoriteActionGroup1> <linkedColumns> <element>NAME</element> </linkedColumns> @@ -94,6 +95,7 @@ <treeTableViewTemplate> <name>Treetable</name> <entityField>#ENTITY</entityField> + <favoriteActionGroup1>observeActionGroup</favoriteActionGroup1> <linkedColumns> <element>NAME</element> </linkedColumns> diff --git a/neonView/CampaignPlanning_view/CampaignPlanning_view.aod b/neonView/CampaignPlanning_view/CampaignPlanning_view.aod index 3a6df29eef7cad1a1e0de0e479314247d4a6495f..e4e3defadc4398edd38b56e0b6f0e9e4fc23f255 100644 --- a/neonView/CampaignPlanning_view/CampaignPlanning_view.aod +++ b/neonView/CampaignPlanning_view/CampaignPlanning_view.aod @@ -19,8 +19,8 @@ <beginDateField>DATE_START</beginDateField> <endDateField>DATE_END</endDateField> <predecessorIdField>PREDECESSOR_STEP_ID</predecessorIdField> - <favoriteActionGroup2>NewGanttEntries</favoriteActionGroup2> <entityField>#ENTITY</entityField> + <favoriteActionGroup2>NewGanttEntries</favoriteActionGroup2> <isDeletable v="true" /> <isEditable v="true" /> <columns> diff --git a/neonView/ContractFilter_view/ContractFilter_view.aod b/neonView/ContractFilter_view/ContractFilter_view.aod index 08b326cef29975aa6983fe5b92098df727bd4dfb..752fd9061a66de2c7d4ed7fc4b1e8e5e0a9c161f 100644 --- a/neonView/ContractFilter_view/ContractFilter_view.aod +++ b/neonView/ContractFilter_view/ContractFilter_view.aod @@ -37,6 +37,7 @@ <subtitleField>CONTRACTSTATUS</subtitleField> <descriptionField>CONTACT_ID</descriptionField> <entityField>#ENTITY</entityField> + <favoriteActionGroup1>observeActionGroup</favoriteActionGroup1> <linkedColumns> <element>CONTRACTCODE</element> </linkedColumns> @@ -78,6 +79,7 @@ <treeTableViewTemplate> <name>Treetable</name> <entityField>#ENTITY</entityField> + <favoriteActionGroup1>observeActionGroup</favoriteActionGroup1> <linkedColumns> <element>CONTRACTCODE</element> </linkedColumns> diff --git a/neonView/EmployeeFilter_view/EmployeeFilter_view.aod b/neonView/EmployeeFilter_view/EmployeeFilter_view.aod index e26d5d132deb990922398f0ffa3a499a089eceee..f799e9441300819efc84e00a27fe7a4af3f9f7e4 100644 --- a/neonView/EmployeeFilter_view/EmployeeFilter_view.aod +++ b/neonView/EmployeeFilter_view/EmployeeFilter_view.aod @@ -16,6 +16,7 @@ <subtitleField>TITLE</subtitleField> <descriptionField>EMAIL_ADDRESS</descriptionField> <entityField>#ENTITY</entityField> + <favoriteActionGroup1>observeActionGroup</favoriteActionGroup1> <linkedColumns> <element>TITLE</element> </linkedColumns> diff --git a/neonView/LeadimportFilter_view/LeadimportFilter_view.aod b/neonView/LeadimportFilter_view/LeadimportFilter_view.aod index 3593bf9b43010284d5638031b2f739dfad5b394d..1216a98577756f57ad841066479e9adb0e012913 100644 --- a/neonView/LeadimportFilter_view/LeadimportFilter_view.aod +++ b/neonView/LeadimportFilter_view/LeadimportFilter_view.aod @@ -12,6 +12,7 @@ <tableViewTemplate> <name>leadimports</name> <entityField>#ENTITY</entityField> + <favoriteActionGroup1>observeActionGroup</favoriteActionGroup1> <columns> <neonTableColumn> <name>535f6d45-a69f-48ce-b58c-4aeb8955d8be</name> @@ -38,6 +39,7 @@ <treeTableViewTemplate> <name>Treetable</name> <entityField>#ENTITY</entityField> + <favoriteActionGroup1>observeActionGroup</favoriteActionGroup1> <columns> <neonTreeTableColumn> <name>5b550d07-b92f-4429-a9f7-e18013aa3280</name> diff --git a/neonView/ObservationEdit_view/ObservationEdit_view.aod b/neonView/ObservationEdit_view/ObservationEdit_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..89420a8dc237695f7b6050d6feae873a031bc6d2 --- /dev/null +++ b/neonView/ObservationEdit_view/ObservationEdit_view.aod @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.7" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.7"> + <name>ObservationEdit_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <size>SMALL</size> + <layout> + <boxLayout> + <name>layout</name> + </boxLayout> + </layout> + <children> + <genericViewTemplate> + <name>ObserverationEditGeneric</name> + <editMode v="true" /> + <fields> + <entityFieldLink> + <name>f519c0bd-8c1c-4a8e-aba2-9bd94d70ccb0</name> + <entityField>OBSERVER</entityField> + </entityFieldLink> + <entityFieldLink> + <name>ac1990a8-fe10-4feb-93b2-7def0792c00f</name> + <entityField>OBJECT_TYPE</entityField> + </entityFieldLink> + <entityFieldLink> + <name>dd066062-3aca-4caf-873e-64328178fe7f</name> + <entityField>OBJECT_ID</entityField> + </entityFieldLink> + <entityFieldLink> + <name>2567d447-a473-4b30-a7a3-9d724f55521e</name> + <entityField>OBJECT_FILTER</entityField> + </entityFieldLink> + <entityFieldLink> + <name>86222081-5406-4a85-8c43-189166566ed1</name> + <entityField>OBJECT_FIELD</entityField> + </entityFieldLink> + <entityFieldLink> + <name>d5f4cb5d-c70d-46fd-ab78-bef71a205f37</name> + <entityField>TRIGGEREVENTINSERT</entityField> + </entityFieldLink> + <entityFieldLink> + <name>ba0cde17-7efb-481f-ae6c-6a75c2d41451</name> + <entityField>TRIGGEREVENTUPDATE</entityField> + </entityFieldLink> + <entityFieldLink> + <name>c545362b-42d8-4cd5-83c8-9e4f2426c4ca</name> + <entityField>TRIGGEREVENTDELETE</entityField> + </entityFieldLink> + <entityFieldLink> + <name>c6fa82e2-5830-46c5-9127-e273ddf5a194</name> + <entityField>NOTIFICATION_PRIO</entityField> + </entityFieldLink> + </fields> + </genericViewTemplate> + </children> +</neonView> diff --git a/neonView/ObservationFilter_view/ObservationFilter_view.aod b/neonView/ObservationFilter_view/ObservationFilter_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..8d59e419df559793701bf02d8b7720a08ba998cf --- /dev/null +++ b/neonView/ObservationFilter_view/ObservationFilter_view.aod @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.7" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.7"> + <name>ObservationFilter_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <filterable v="true" /> + <dashletConfigurations> + <neonDashletConfiguration> + <name>neonDashletConfiguration</name> + <title>Observations</title> + <description>Shows all your Observations</description> + <fragment>Observation/filter</fragment> + <storeRoles /> + <icon>VAADIN:EYE</icon> + <categories> + <neonDashletCategory> + <name>Notifications</name> + <title>Notifications</title> + </neonDashletCategory> + <neonDashletCategory> + <name>Observations</name> + <title>Observations</title> + </neonDashletCategory> + </categories> + <parameters> + <neonDashletParameter> + <name>OnlyMyObservations_param</name> + <value>true</value> + </neonDashletParameter> + </parameters> + </neonDashletConfiguration> + </dashletConfigurations> + <layout> + <groupLayout> + <name>layout</name> + </groupLayout> + </layout> + <children> + <treeTableViewTemplate> + <name>ObservationFilterTreeTable</name> + <parentField>OBSERVATION_ID</parentField> + <favoriteActionGroup1>FilterActions</favoriteActionGroup1> + <columns> + <neonTreeTableColumn> + <name>41441cfe-e8cb-4529-ac79-3f2beeb46232</name> + <entityField>OBJECT_TYPE</entityField> + </neonTreeTableColumn> + <neonTreeTableColumn> + <name>b92aecdb-2cb8-4dfb-bae4-0fde375a58a7</name> + <entityField>NOTIFICATION_PRIO</entityField> + </neonTreeTableColumn> + <neonTreeTableColumn> + <name>6f6f11b5-0755-413c-953c-4ee4a55d9e66</name> + <entityField>observationType</entityField> + </neonTreeTableColumn> + </columns> + </treeTableViewTemplate> + </children> +</neonView> diff --git a/neonView/ObservationPreview_view/ObservationPreview_view.aod b/neonView/ObservationPreview_view/ObservationPreview_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..70c4cd63a12abf627a5cc970626ea168b600c2d8 --- /dev/null +++ b/neonView/ObservationPreview_view/ObservationPreview_view.aod @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.7" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.7"> + <name>ObservationPreview_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <layout> + <headerFooterLayout> + <name>layout</name> + <header>ObservationPreviewCard</header> + <footer>ObservationPreviewScoreCard</footer> + </headerFooterLayout> + </layout> + <children> + <scoreCardViewTemplate> + <name>ObservationPreviewScoreCard</name> + <fields> + <entityFieldLink> + <name>2bd25a93-05e7-4e1d-802c-6021ee0abbb7</name> + <entityField>TRIGGEREVENTINSERT</entityField> + </entityFieldLink> + <entityFieldLink> + <name>218807ea-2dca-478c-bf2c-9e1b9f1fe028</name> + <entityField>TRIGGEREVENTUPDATE</entityField> + </entityFieldLink> + <entityFieldLink> + <name>b4df872e-2991-4eba-b872-7d2a359e1481</name> + <entityField>TRIGGEREVENTDELETE</entityField> + </entityFieldLink> + </fields> + </scoreCardViewTemplate> + <cardViewTemplate> + <name>ObservationPreviewCard</name> + <titleField>OBJECT_TYPE</titleField> + <subtitleField>NOTIFICATION_PRIO</subtitleField> + </cardViewTemplate> + <genericViewTemplate> + <name>ObservationPreviewGeneric</name> + <showDrawer v="true" /> + <hideEmptyFields v="true" /> + <fields> + <entityFieldLink> + <name>60d02f92-f82a-4496-835f-a84ac0aaba61</name> + <entityField>OBJECT_ID</entityField> + </entityFieldLink> + <entityFieldLink> + <name>c8063a70-4772-4dda-81da-c587ab810c3b</name> + <entityField>OBJECT_FILTER</entityField> + </entityFieldLink> + <entityFieldLink> + <name>9b767452-e034-4e2a-be2d-e038137666b3</name> + <entityField>OBJECT_FIELD</entityField> + </entityFieldLink> + </fields> + </genericViewTemplate> + </children> +</neonView> diff --git a/neonView/OfferFilter_view/OfferFilter_view.aod b/neonView/OfferFilter_view/OfferFilter_view.aod index d53c98d2e7d6a5b995bf8f1f99126b6da7dc7ac6..d36ccd03c940f303c2bfaa2205545f7fd2a03541 100644 --- a/neonView/OfferFilter_view/OfferFilter_view.aod +++ b/neonView/OfferFilter_view/OfferFilter_view.aod @@ -56,6 +56,7 @@ <subtitleField>STATUS</subtitleField> <descriptionField>NET</descriptionField> <entityField>#ENTITY</entityField> + <favoriteActionGroup1>observeActionGroup</favoriteActionGroup1> <linkedColumns> <element>FullOfferCode</element> </linkedColumns> @@ -97,6 +98,7 @@ <treeTableViewTemplate> <name>TreeTable</name> <entityField>#ENTITY</entityField> + <favoriteActionGroup1>observeActionGroup</favoriteActionGroup1> <linkedColumns> <element>FullOfferCode</element> </linkedColumns> diff --git a/neonView/OrderFilter_view/OrderFilter_view.aod b/neonView/OrderFilter_view/OrderFilter_view.aod index dade5ff2b8a906b361a842106235eb3d54985677..ce00141a2b814739511aac906c69eaa4a1c7edcb 100644 --- a/neonView/OrderFilter_view/OrderFilter_view.aod +++ b/neonView/OrderFilter_view/OrderFilter_view.aod @@ -57,6 +57,7 @@ <subtitleField>ORDERSTATUS</subtitleField> <descriptionField>NET</descriptionField> <entityField>#ENTITY</entityField> + <favoriteActionGroup1>observeActionGroup</favoriteActionGroup1> <linkedColumns> <element>SALESORDERCODE</element> </linkedColumns> @@ -103,6 +104,7 @@ <treeTableViewTemplate> <name>tree</name> <entityField>#ENTITY</entityField> + <favoriteActionGroup1>observeActionGroup</favoriteActionGroup1> <linkedColumns> <element>SALESORDERCODE</element> </linkedColumns> diff --git a/neonView/ProductFilter_view/ProductFilter_view.aod b/neonView/ProductFilter_view/ProductFilter_view.aod index 326ff54ed32004e8b87f9624e9d530a63f6d2daf..25146e6e8e695c672663aabcb88a0d17d645f5a2 100644 --- a/neonView/ProductFilter_view/ProductFilter_view.aod +++ b/neonView/ProductFilter_view/ProductFilter_view.aod @@ -39,6 +39,7 @@ <descriptionField>STATUS</descriptionField> <tilePresentation>PORTRAIT</tilePresentation> <entityField>#ENTITY</entityField> + <favoriteActionGroup1>observeActionGroup</favoriteActionGroup1> <isCreatable v="true" /> </tilesViewTemplate> <tableViewTemplate> @@ -46,6 +47,7 @@ <titleField>PRODUCTNAME</titleField> <subtitleField>PRODUCTCODE</subtitleField> <entityField>#ENTITY</entityField> + <favoriteActionGroup1>observeActionGroup</favoriteActionGroup1> <linkedColumns> <element>PRODUCTNAME</element> </linkedColumns> @@ -83,6 +85,7 @@ <treeTableViewTemplate> <name>Treetable</name> <entityField>#ENTITY</entityField> + <favoriteActionGroup1>observeActionGroup</favoriteActionGroup1> <linkedColumns> <element>PRODUCTNAME</element> </linkedColumns> diff --git a/neonView/SalesprojectFilter_view/SalesprojectFilter_view.aod b/neonView/SalesprojectFilter_view/SalesprojectFilter_view.aod index 6a613d6f1d48c3c725635e204ddbdf21dbcdce35..157b66ce9ec13ae79c0615f9dc2245b932a76709 100644 --- a/neonView/SalesprojectFilter_view/SalesprojectFilter_view.aod +++ b/neonView/SalesprojectFilter_view/SalesprojectFilter_view.aod @@ -56,6 +56,7 @@ <subtitleField>PHASE</subtitleField> <descriptionField>CONTACT_ID</descriptionField> <entityField>#ENTITY</entityField> + <favoriteActionGroup1>observeActionGroup</favoriteActionGroup1> <linkedColumns> <element>PROJECTCODE</element> <element>PROJECTTITLE</element> @@ -108,6 +109,7 @@ <treeTableViewTemplate> <name>Treetable</name> <entityField>#ENTITY</entityField> + <favoriteActionGroup1>observeActionGroup</favoriteActionGroup1> <linkedColumns> <element>PROJECTCODE</element> <element>PROJECTTITLE</element> diff --git a/neonView/SupportTicketFilter_view/SupportTicketFilter_view.aod b/neonView/SupportTicketFilter_view/SupportTicketFilter_view.aod index 97892017ec83aa58850ddf21f0eee546f860d714..17d4cf31dc907829bbb544593f92ee285e2355cd 100644 --- a/neonView/SupportTicketFilter_view/SupportTicketFilter_view.aod +++ b/neonView/SupportTicketFilter_view/SupportTicketFilter_view.aod @@ -42,6 +42,7 @@ <descriptionField>TASK_DESCRIPTION</descriptionField> <iconIdField>TASK_PRIORITY_ICON</iconIdField> <entityField>#ENTITY</entityField> + <favoriteActionGroup1>observeActionGroup</favoriteActionGroup1> </timelineViewTemplate> <tableViewTemplate> <name>TicketsTable</name> @@ -50,6 +51,7 @@ <subtitleField>TASK_STATUS</subtitleField> <descriptionField>TASK_REQUESTOR_CONTACT_ID</descriptionField> <entityField>#ENTITY</entityField> + <favoriteActionGroup1>observeActionGroup</favoriteActionGroup1> <linkedColumns> <element>TASK_SUBJECT</element> </linkedColumns> @@ -97,6 +99,7 @@ <treeTableViewTemplate> <name>Treetable</name> <entityField>#ENTITY</entityField> + <favoriteActionGroup1>observeActionGroup</favoriteActionGroup1> <linkedColumns> <element>TASK_SUBJECT</element> </linkedColumns> diff --git a/neonView/TaskFilter_view/TaskFilter_view.aod b/neonView/TaskFilter_view/TaskFilter_view.aod index 51c579c8f6067b0201dd1a6a38aa1dbae5def381..35cc0170cae90e6b3203b7651fdcfc13f9c73ac4 100644 --- a/neonView/TaskFilter_view/TaskFilter_view.aod +++ b/neonView/TaskFilter_view/TaskFilter_view.aod @@ -40,6 +40,7 @@ <descriptionField>DESCRIPTION</descriptionField> <iconIdField>PRIORITY_ICON</iconIdField> <entityField>#ENTITY</entityField> + <favoriteActionGroup1>observeActionGroup</favoriteActionGroup1> </timelineViewTemplate> <tableViewTemplate> <name>TasksTable</name> @@ -47,6 +48,7 @@ <titleField>SUBJECT</titleField> <subtitleField>STATUS</subtitleField> <entityField>#ENTITY</entityField> + <favoriteActionGroup1>observeActionGroup</favoriteActionGroup1> <linkedColumns> <element>SUBJECT</element> </linkedColumns> @@ -93,6 +95,7 @@ <treeTableViewTemplate> <name>Treetable</name> <entityField>#ENTITY</entityField> + <favoriteActionGroup1>observeActionGroup</favoriteActionGroup1> <linkedColumns> <element>SUBJECT</element> </linkedColumns> diff --git a/preferences/_____PREFERENCES_PROJECT/_____PREFERENCES_PROJECT.aod b/preferences/_____PREFERENCES_PROJECT/_____PREFERENCES_PROJECT.aod index 602795eafd86b0cb8892febafb6c1a9d7de3624d..4ddb43c09cad21c593df3f6876bb6f9c6ac1d562 100644 --- a/preferences/_____PREFERENCES_PROJECT/_____PREFERENCES_PROJECT.aod +++ b/preferences/_____PREFERENCES_PROJECT/_____PREFERENCES_PROJECT.aod @@ -98,7 +98,7 @@ <customStringProperty> <name>workflow.modelerUrl</name> <description></description> - <property>http://localhost:8080/flowable-modeler/</property> + <property>http://localhost:8082/flowable-modeler/</property> </customStringProperty> <customBooleanProperty> <name>ai.salesprojectProbability</name> diff --git a/process/Context_lib/process.js b/process/Context_lib/process.js index aaecfe01d9b8faa1aaaff16fc18c71e58864c180..79854f907c1208b8eb03d83e6565a3fe8868e492 100644 --- a/process/Context_lib/process.js +++ b/process/Context_lib/process.js @@ -98,14 +98,13 @@ ContextUtils.getContextId = function (pEntity) if (!pEntity) return null; - let contexte = ContextUtils.getContexts(false, [], false); + let contexts = project.getDataModels(project.DATAMODEL_KIND_CONTEXT); - for (let i = 0; i < contexte.length; i++) { - if (ContextUtils.getEntity(contexte[i][0]) == pEntity) - return contexte[i][0]; + for (let i = 0; i < contexts.length; i++) { + if (ContextUtils.getEntity(contexts[i][0]) == pEntity) + return contexts[i][0]; } return null; - } /** diff --git a/process/CreateNotification_workflowService/process.js b/process/CreateNotification_workflowService/process.js index 3aa7508f4b63e62ec47537b94837d14d29ef296a..52b6f6fa9fe3f5929f17014aad2663d2e355bfb4 100644 --- a/process/CreateNotification_workflowService/process.js +++ b/process/CreateNotification_workflowService/process.js @@ -1,15 +1,51 @@ +import("KeywordRegistry_basic"); +import("system.text"); import("system.vars"); import("system.notification"); var variables = JSON.parse(vars.get("$local.value")); var config = notification.createConfig() - .notificationType("WorkflowNotification") - .addUsersWithIds([variables.notificationUser || variables.USER_ID]) + .notificationType(variables.notificationType || "WorkflowNotification") .caption(variables.notificationCaption || "") .description(variables.notificationDescription || ""); - + +try { + config.addUsersWithIds(JSON.parse(variables.notificationUser)); +} catch (e) { // Throw an exeption when the variable can't parse to an JSON-Object. + config.addUsersWithIds([variables.notificationUser || variables.USER_ID]) +} + +var prio; +switch (variables.notificationPriority){ + case $KeywordRegistry.notificationPriority$none: + prio = notification.PRIO_NONE + break; + case $KeywordRegistry.notificationPriority$low(): + prio = notification.PRIO_LOW + break; + case $KeywordRegistry.notificationPriority$hight(): + prio = notification.PRIO_HIGH + break; + case $KeywordRegistry.notificationPriority$max(): + prio = notification.PRIO_MAX + break; + case $KeywordRegistry.notificationPriority$normal(): + default: + prio = notification.PRIO_NORMAL + break; +} +config.forcedPriority(prio); + if (variables.notificationIcon) config.imageInfo(variables.notificationIcon); +if (variables.notificationSubcategory) + config.notificationSubCategory(variables.notificationSubcategory); + +if (variables.notificationAffectedContext && variables.notificationAffectedUID) + config.linkInfo(text.encodeMS([variables.notificationAffectedContext, variables.notificationAffectedUID])); +if (variables.notificationContentId) + config.contentId(variables.notificationContentId).remindAgainOnNewContent(true); + notification.addNotificationWith(config); \ No newline at end of file diff --git a/process/Dependency_lib/process.js b/process/Dependency_lib/process.js index cc1d4fdf31e3dbf165725adaf039a798676dee35..cd11ecdecab1d9f9b2163a0349810d27188a8e21 100644 --- a/process/Dependency_lib/process.js +++ b/process/Dependency_lib/process.js @@ -3,45 +3,708 @@ import("Sql_lib"); function Dependency(){} /** - * This function is the template for the getUIDsfn-Function in the Dependency.mapping + * Get the Default Funktion for Fields of an table. The funktion is used to get the UIDs of the dependent Context. + * + * @param {String} [pTableField] the table field is transferred in the following form: <br> + * - DB-RecordContainer: TableName.FieldName + * - JDITO-RecordContainer: FieldName.value + * @return {function} function (pNewData, pOldData) {...} + */ +Dependency.defaultFunctionForField = function (pTableField) +{ + return function (pNewData, pOldData) + { + let res = []; + if (pNewData[pTableField]) + res.push(pNewData[pTableField]) + if (pOldData[pTableField] && pOldData[pTableField] != pNewData[pTableField]) + res.push(pOldData[pTableField]) + return res; + }; +} + +/** + * Get the Default Funktion for Fields of an table. The funktion is used to get the UIDs of the dependent Context. + * + * @param {Array} [pTableFields] A table field is transferred in the following form: <br> + * - DB-RecordContainer: TableName.FieldName + * - JDITO-RecordContainer: FieldName.value + * @return {function} function (pNewData, pOldData) {...} */ -Dependency.templateFunction = function (pTableField) { - return function (pRowData, pChangedData) { +Dependency.defaultFunctionForFields = function (pTableFields) +{ + return function (pNewData, pOldData) + { let res = []; - if (pRowData[pTableField]) - res.push(pRowData[pTableField]) - if (pChangedData[pTableField] && pChangedData[pTableField] != pRowData[pTableField]) - res.push(pChangedData[pTableField]) + for (let i = 0; i < pTableFields.length; i++) + { + res = res.concat(Dependency.defaultFunctionForField(pTableFields[i])(pNewData, pOldData)); + } return res; } } /** - * Returns the Mapping of the Dependencies. + * Get the default Funktion for relation tables of an entity. The Funktion is used to get the UIDs of the dependent Context over the relation table. + * + * @param {String} [pRelationTable] The Tablename of the relation table. + * @param {String} [pRelationField] The Field of the relation table which one contains the UID of the Entity (in the Example: "Person_entity"). + * @param {String} [pDataField] The UID Field of the Entity. + * @param {String} [pContext] The Context of the Entity. + * @param {String} [pDataTable] The Tablename of the UID Field of the Entity. Is only need for the DB-Recordcontainer. + * @param {String} [pSourceField] The Field which one contains the UID of the dependent entity in the relation rable. + * + * @example "Person_entity": { "Activity_entity" : { "options" : { "isObservable" : true }, "getUIDsfn" : Dependency.defaultFunctionForRelation("ACTIVITYLINK", "OBJECT_ROWID", "CONTACTID", "Person", "CONTACT", "ACTIVITY_ID")}} + * + * @return {function} function (pNewData, pOldData) {...} + */ +Dependency.defaultFunctionForRelation = function (pRelationTable, pRelationField, pDataField, pContext, pDataTable, pSourceField) +{ + return function (pNewData, pOldData) + { + var relationFieldValue; + if (!pDataTable) + { + relationFieldValue = pNewData["UID.value"] || pNewData[pDataField +".value"]; + } + else + { + relationFieldValue = pNewData[pDataTable + "." + pDataField]; + } + + + return newSelect(pRelationTable + "." + pSourceField || "OBJECT_ROWID") + .from(pRelationTable) + .groupBy(pRelationTable + ".OBJECT_ROWID") + .whereIfSet(pRelationTable + "." + pRelationField, relationFieldValue) + .and(pRelationTable + ".OBJECT_TYPE", pContext) + .arrayColumn(); + } +} + +/** + * Get the Default Funktion for Fields of an table. The funktion is used to get the UIDs of the dependent Context. * + * @param {String} [pTableField] the table field is transferred in the following form: <br> + * - DB-RecordContainer: TableName.FieldName + * - JDITO-RecordContainer: FieldName.value + * @param {String} [pContext] The Context of the Entity. + * + * @return {function} function (pNewData, pOldData) {...} + */ +Dependency.defaultFunctionForFavorites = function (pTableField, pContext) +{ + return function (pNewData, pOldData) + { + let rowIds = Dependency.defaultFunctionForField(pTableField)(pNewData, pOldData); + let ids = []; + + let config = favorite.createGetFavoritesConfig().setObjectType(pContext); + let favos = favorite.getFavorites(config); + + for(let i = 0; i < favos.length; i++) + { + if (rowIds.indexOf(favos[i]["rowid"]) > -1 ) + { + ids.push(favos[i]["id"]); + } + + } + + return ids; + } +} + +/** + * Returns the Mapping of the Dependencies. <br> + * <br> + * Every Dependency needs a Funktion with returns the UIDs of the Dependent Entity.<br> + * This Funtkion is placed in the Object on the getUIDsfn Node.<br> + * <br> * The mapping is structured as follows: <br> * - * @example { "Entity_entity" : { "Dependency_entity": { "getUIDsfn" : function (pRowData, pChangedData) {return //the IDs of the EntityField } } } } + * @example { "Entity_entity" : { "Dependency_entity": { "options" : { "option" : true}, "getUIDsfn" : function (pNewData, pOldData) {return //the IDs of the EntityField } } } } * * @return {Object} */ Dependency.mapping = function () { return { + "Person_entity": { + "Activity_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForRelation("ACTIVITYLINK", "OBJECT_ROWID", "CONTACTID", "Person", "CONTACT", "ACTIVITY_ID") + }, + "Task_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForRelation("TASKLINK", "OBJECT_ROWID", "CONTACTID", "Person", "CONTACT", "ACTIVITY_ID") + }, + "Favorite_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForFavorites("CONTACT.CONTACTID", "Person") + } + }, + "PrivatePerson_entity": { + "Activity_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForRelation("ACTIVITYLINK", "OBJECT_ROWID", "PERSONID", "PrivatePerson", "PERSON", "ACTIVITY_ID") + }, + "Task_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForRelation("TASKLINK", "OBJECT_ROWID", "PERSONID", "PrivatePerson", "PERSON", "ACTIVITY_ID") + } + }, + "Organisation_entity": { + "Activity_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForRelation("ACTIVITYLINK", "OBJECT_ROWID", "CONTACTID", "Organisation", "CONTACT", "ACTIVITY_ID") + }, + "Task_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForRelation("TASKLINK", "OBJECT_ROWID", "CONTACTID", "Organisation", "CONTACT", "ACTIVITY_ID") + }, + "Favorite_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForFavorites("CONTACT.CONTACTID", "Organisation") + } + }, + "Salesproject_entity": { + "Activity_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForRelation("ACTIVITYLINK", "OBJECT_ROWID", "SALESPROJECTID", "Salesproject", "SALESPROJECT", "ACTIVITY_ID") + }, + "Task_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForRelation("TASKLINK", "OBJECT_ROWID", "SALESPROJECTID", "Salesproject", "SALESPROJECT", "ACTIVITY_ID") + }, + "Favorite_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForFavorites("SALESPROJECT.SALESPROJECTID", "Salesproject") + } + }, + "KnowledgeManagement_entity": { + "Favorite_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForFavorites("KNOWLEDGEMANAGEMENT.KNOWLEDGEMANAGEMENTID", "KnowledgeManagement") + } + }, + "ExportTemplate_entity": { + "Favorite_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForFavorites("EXPORTTEMPLATE.EXPORTTEMPLATEID", "ExportTemplate") + } + }, + + "Order_entity": { + "Activity_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForRelation("ACTIVITYLINK", "OBJECT_ROWID", "SALESORDERID", "Order", "SALESORDER", "ACTIVITY_ID") + }, + "Task_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForRelation("TASKLINK", "OBJECT_ROWID", "SALESORDERID", "Order", "SALESORDER", "ACTIVITY_ID") + }, + "Favorite_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForFavorites("SALESORDER.SALESORDERID", "Order") + } + }, + "Contract_entity": { + "Activity_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForRelation("ACTIVITYLINK", "OBJECT_ROWID", "CONTRACTID", "Contract", "CONTRACT", "ACTIVITY_ID") + }, + "Task_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForRelation("TASKLINK", "OBJECT_ROWID", "CONTRACTID", "Contract", "CONTRACT", "ACTIVITY_ID") + }, + "Favorite_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForFavorites("CONTRACT.CONTRACTID", "Contract") + } + }, + "Product_entity": { + "Activity_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForRelation("ACTIVITYLINK", "OBJECT_ROWID", "PRODUCTID", "Product", "PRODUCT", "ACTIVITY_ID") + }, + "Task_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForRelation("TASKLINK", "OBJECT_ROWID", "PRODUCTID", "Product", "PRODUCT", "ACTIVITY_ID") + }, + "Favorite_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForFavorites("PRODUCT.PRODUCTID", "Product") + } + }, + "Campaign_entity": { + "Activity_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForRelation("ACTIVITYLINK", "OBJECT_ROWID", "CAMPAIGNID", "Campaign", "CAMPAIGN", "ACTIVITY_ID") + }, + "Task_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForRelation("TASKLINK", "OBJECT_ROWID", "CAMPAIGNID", "Campaign", "CAMPAIGN", "ACTIVITY_ID") + }, + "Favorite_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForFavorites("CAMPAIGN.CAMPAIGNID", "Campaign") + } + }, + "SupportTicket_entity" : { + "Activity_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForRelation("ACTIVITYLINK", "OBJECT_ROWID", "TICKETID", "SupportTicket", "TICKET", "ACTIVITY_ID") + }, + "Task_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForRelation("TASKLINK", "OBJECT_ROWID", "TICKETID", "SupportTicket", "TICKET", "ACTIVITY_ID") + }, + "Favorite_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForFavorites("TASK.TASKID", "SupportTicket") + } + }, + "Activity_entity" : { + "Person_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForRelation("ACTIVITYLINK", "ACTIVITY_ID", "ACTIVITYID", "Person", "ACTIVITY") + }, + "Organisation_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForRelation("ACTIVITYLINK", "ACTIVITY_ID", "ACTIVITYID", "Organisation", "ACTIVITY") + }, + "Salesproject_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForRelation("ACTIVITYLINK", "ACTIVITY_ID", "ACTIVITYID", "Salesproject", "ACTIVITY") + }, + "Offer_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForRelation("ACTIVITYLINK", "ACTIVITY_ID", "ACTIVITYID", "Offer", "ACTIVITY") + }, + "Order_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForRelation("ACTIVITYLINK", "ACTIVITY_ID", "ACTIVITYID", "Order", "ACTIVITY") + }, + "Contract_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForRelation("ACTIVITYLINK", "ACTIVITY_ID", "ACTIVITYID", "Contract", "ACTIVITY") + }, + "Product_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForRelation("ACTIVITYLINK", "ACTIVITY_ID", "ACTIVITYID", "Product", "ACTIVITY") + }, + "Campaign_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForRelation("ACTIVITYLINK", "ACTIVITY_ID", "ACTIVITYID", "Campaign", "ACTIVITY") + } + }, "Address_entity": { "Organisation_entity" : { "options" : { "isObservable" : true }, - "getUIDsfn" : function (pRowData, pChangedData) { - var tableField = "ADDRESS.CONTACT_ID"; - var res = []; - if (pRowData[tableField]) - res.push(pRowData[tableField]) - if (pChangedData[tableField] && pChangedData[tableField] != pRowData[tableField]) - res.push(pChangedData[tableField]) - return res; - } + "getUIDsfn" : Dependency.defaultFunctionForField("ADDRESS.CONTACT_ID") + }, + "Person_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForField("ADDRESS.CONTACT_ID") + } + }, + "AttributeRelation_entity" : { + "Person_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForRelation("AB_ATTRIBUTERELATION", "AB_ATTRIBUTERELATIONID", "AB_ATTRIBUTERELATIONID", "Person") + }, + "Organisation_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForRelation("AB_ATTRIBUTERELATION", "AB_ATTRIBUTERELATIONID", "AB_ATTRIBUTERELATIONID", "Organisation") + }, + "Activity_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForRelation("AB_ATTRIBUTERELATION", "AB_ATTRIBUTERELATIONID", "AB_ATTRIBUTERELATIONID", "Activity") + }, + "Salesproject_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForRelation("AB_ATTRIBUTERELATION", "AB_ATTRIBUTERELATIONID", "AB_ATTRIBUTERELATIONID", "Salesproject") + }, + "Product_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForRelation("AB_ATTRIBUTERELATION", "AB_ATTRIBUTERELATIONID", "AB_ATTRIBUTERELATIONID", "Product") + }, + "Employee_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForRelation("AB_ATTRIBUTERELATION", "AB_ATTRIBUTERELATIONID", "AB_ATTRIBUTERELATIONID", "Employee") + }, + "SupportTicket_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForRelation("AB_ATTRIBUTERELATION", "AB_ATTRIBUTERELATIONID", "AB_ATTRIBUTERELATIONID", "SupportTicket") + } + }, + "Communication_entity": { + "Person_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForField("COMMUNICATION.CONTACT_ID") + }, + "Organisation_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForField("COMMUNICATION.CONTACT_ID") + } + }, + "CommRestriction_Entity" : { + "Person_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForField("COMMRESTRICTION.CONTACT_ID") + }, + "Organisation_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForField("COMMRESTRICTION.CONTACT_ID") + } + }, + "Contact_entity" : { + "Person_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForField("CONTACT.CONTACTID") + } + }, + "Document_entity" : { + "Person_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForField("assignmentRowID.value") + }, + "Organisation_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForField("assignmentRowID.value") + }, + "Activity_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForField("assignmentRowID.value") + }, + "Task_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForField("assignmentRowID.value") + }, + "Salesproject_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForField("assignmentRowID.value") + }, + "Offer_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForField("assignmentRowID.value") + }, + "Order_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForField("assignmentRowID.value") + }, + "Contract_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForField("assignmentRowID.value") + }, + "Product_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForField("assignmentRowID.value") + }, + "Employee_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForField("assignmentRowID.value") + }, + "SupportTicket_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForField("assignmentRowID.value") + }, + "Campaign_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForField("assignmentRowID.value") + } + }, + "ObjectTree_entity": { + "Person_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForFields(["PARENT_ID.value", "TARGET_ID.value"]) + }, + "Organisation_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForFields(["PARENT_ID.value", "TARGET_ID.value"]) + } + }, + "Member_entity" : { + "Campaign_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForField("OBJECTMEMBER.OBJECT_ROWID") // Evtl einschränken auf Type + }, + "Salesproject_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForField("OBJECTMEMBER.OBJECT_ROWID") // Evtl einschränken auf Type + } + }, + "SalesprojectSource_entity" : { + "Salesproject_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForField("SALESPROJECT_TOUCHPOINT.SALESPROJECT_ID") + } + }, + "Forecast_entity" : { + "Salesproject_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForField("FORECAST.OBJECT_ROWID") // Evtl einschränken auf Type + } + }, + "Offer_entity" : { + "Salesproject_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForField("OFFER.OBJECT_ROWID") // Evtl einschränken auf Type + }, + "Activity_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForRelation("ACTIVITYLINK", "OBJECT_ROWID", "OFFERID", "Offer", "OFFER", "ACTIVITY_ID") + }, + "Task_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForRelation("TASKLINK", "OBJECT_ROWID", "OFFERID", "Offer", "OFFER", "ACTIVITY_ID") + }, + "Favorite_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForFavorites("OFFER.OFFERID", "Offer") + } + }, + "DocumentTemplate_entity": { + "Favorite_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForFavorites("DOCUMENTTEMPLATE.DOCUMENTTEMPLATEID", "DocumentTemplate") + } + }, + "WorkflowDefinition_entity": { + "Favorite_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForFavorites("UID.value", "WorkflowDefinition") + } + }, + "Competition_entity" : { + "Salesproject_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForField("COMPETITION.OBJECT_ROWID") // Evtl einschränken auf Type + } + }, + "Offeritem_entity" : { + "Offer_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForField("OFFERITEM.OFFER_ID") + } + }, + "Orderitem_entity" : { + "Order_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForField("SALESORDERITEM.SALESORDER_ID") + } + }, + "Productprice_entity" : { + "Product_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForField("PRODUCTPRICE.PRODUCT_ID") + }, + "Favorite_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForFavorites("PRODUCTPRICE.PRODUCTPRICEID", "Productprice") + } + }, + "Prod2prod_entity" : { + "Product_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForField("SOURCE_ID.value") + } + }, + "CampaignCost_entity" : { + "Campaign_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForField("CAMPAIGNCOST.CAMPAIGN_ID") + } + }, + "CampaignStep_entity" : { + "Campaign_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForField("CAMPAIGNSTEP.CAMPAIGN_ID") + }, + "Activity_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForRelation("ACTIVITYLINK", "OBJECT_ROWID", "CAMPAIGNSTEPID", "CampaignStep", "CAMPAIGNSTEP") + }, + "Task_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForRelation("TASKLINK", "OBJECT_ROWID", "CAMPAIGNSTEPID", "CampaignStep", "CAMPAIGNSTEP") + } + }, + "Lead_entity" : { + "Leadimport_entity" : { + "options" : { + "isObservable" : true + }, + "getUIDsfn" : Dependency.defaultFunctionForField("LEAD.LEADIMPORT_ID") } } ,"Order_entity": { @@ -82,6 +745,53 @@ Dependency.mapping = function () } }; }; +/** + * Returns the exculed Fields of the observable entities. These fields cannot be observed. + * + * @return {Object} {"Entity_entity" : ["exculdedFieldName",...], ...} + */ +Dependency.excludedFields = function () +{ + return { + "Activity_entity":["PARENT_ID", "PARENT_CONTEXT"], + "Address_entity":["CONTACT_ID"], + "AttributeRelation_entity":["UID", "AB_ATTRIBUTERELATIONID", "PARENT_ID", "PROTECTED", "ATTRIBUTE_TYPE", "DROPDOWNDEFINITION", "DROPDOWNFILTER"], + "CampaignCost_entity":["NET_aggregate"], + "CampaignStep_entity":null, + "Campaign_entity": null, + "CommRestriction_Entity":["CONTACT_ID"], + "Communication_entity":["CONTACT_ID"], + "Competition_entity":["OBJECT_ROWID", "OBJECT_TYPE"], + "Contact_entity":["ADDRESS_ID", "PERSON_ID"], + "Contract_entity": null, + "DocumentTemplate_entity":null, + "Document_entity":null, + "Employee_entity":["UID", "SHORT_UID", "CONFIRM_PASSWORD", "PASSWORD"], + "ExportTemplate_entity":null, + "Favorite_entity":["UID", "GROUP_ID", "USER_ID", "GROUP_TYPE", "PICTURE"], + "Forecast_entity":null, + "KnowledgeManagement_entity":null, + "Lead_entity":["LEAD_PERSON", "LEAD_ORGANISATIONID"], + "Leadimport_entity":null, + "Member_entity":["OBJECT_ROWID", "OBJECT_TYPE"], + "ObjectTree_entity":["UID","PARENT_ID", "ICON", "EXPANDED", "TARGET_CONTEXT", "OBJECTRELATIONID"], + "Offer_entity":["OFFER_ID"], + "Offeritem_entity":["ASSIGNEDTO", "ITEMSORT", "OFFER_ID"], + "Order_entity":null, + "Orderitem_entity":["ASSIGNEDTO", "ITEMSORT", "SALESORDER_ID"], + "Organisation_entity":["ORGANISATION_ID"], + "Person_entity":["TITLESUFFIX", "PERSON_ID", "ADDRESS_ID"], + "PrivatePerson_entity":null, + "Prod2prod_entity":["UID", "PRODUCTID", "PROD2PRODID", "DEST_ID"], + "Product_entity": ["PICTURE"], + "Productprice_entity":null, + "SalesprojectSource_entity":["SALESPROJECT_ID"], + "Salesproject_entity":null, + "SupportTicket_entity":["TASK_ID", "TASK_PARRENT_ID", "TASK_PARENT_CONTEXT"], + "Task_entity":["PARENT_ID", "PARENT_CONTEXT","PROTECTIONLEVEL", "TYPE"], + "WorkflowDefinition_entity":["UID"] + }; +} /** * Returns the dependencies on the entity @@ -91,9 +801,8 @@ Dependency.mapping = function () * * @example * Dependency.getDependency("Organisation_entity", {"isObservable" : true }); - * @example * Dependency.getDependency("Organisation_entity", {}); - * @example + * Dependency.getDependency("Organisation_entity")); * * @return {String[]} the found Dependencies. If none have been found, you get an empty Array @@ -105,7 +814,7 @@ Dependency.getDependency = function (pEntity, pOptionFilter) { return (!pOptionFilter || Object.keys(pOptionFilter).every(function (pOption) { let option = Dependency.mapping()[pEntity][key]["options"][pOption] return option && pOptionFilter[pOption] == option; - })); + })); }); } @@ -121,9 +830,7 @@ Dependency.getDependency = function (pEntity, pOptionFilter) { * * @example * Dependency.getReverseDependency("Organisation_entity", {"isObservable" : true }); - * @example * Dependency.getReverseDependency("Organisation_entity", {})); - * @example * Dependency.getReverseDependency("Organisation_entity")); * * @return {String[]} the founded Dependencies. If no one is found, you get an empty Array diff --git a/process/KeywordRegistry_basic/process.js b/process/KeywordRegistry_basic/process.js index 350f1dfa09fffef32d06d180c1391b65a4c31275..f76621e56ac920ebd2006f1eb2ac513cb1339af0 100644 --- a/process/KeywordRegistry_basic/process.js +++ b/process/KeywordRegistry_basic/process.js @@ -309,6 +309,15 @@ $KeywordRegistry.knowledgePublishLevel = function(){return "KnowledgePublishLeve $KeywordRegistry.knowledgePublishLevel$internal = function(){return "INTERNAL";} $KeywordRegistry.knowledgePublishLevel$partner = function(){return "PARTNER";} $KeywordRegistry.knowledgePublishLevel$public = function(){return "PUBLIC";} + $KeywordRegistry.visitPlanEntryStatusAppointment = function(){return "VisitPlanEntryStatusAppointment";}; $KeywordRegistry.visitPlanEntryStatusAppointment$requested = function(){return "VISITSTATUSAPPOINTMENTREQUESTED";}; -$KeywordRegistry.visitPlanEntryStatusAppointment$confirmed = function(){return "VISITSTATUSAPPOINTMENTCONFIRMED";}; \ No newline at end of file +$KeywordRegistry.visitPlanEntryStatusAppointment$confirmed = function(){return "VISITSTATUSAPPOINTMENTCONFIRMED";};$KeywordRegistry.knowledgePublishLevel$public = function(){return "PUBLIC";} + +$KeywordRegistry.notificationPriority = function(){ return "NotificationPriority";}; +$KeywordRegistry.notificationPriority$none = function(){ return "NONE";}; +$KeywordRegistry.notificationPriority$low = function(){ return "LOW";}; +$KeywordRegistry.notificationPriority$normal = function(){ return "NORMAL";}; +$KeywordRegistry.notificationPriority$hight = function(){ return "HIGH";}; +$KeywordRegistry.notificationPriority$max = function(){ return "MAX";}; + diff --git a/process/Loghistory_lib/process.js b/process/Loghistory_lib/process.js index c3cc279cd0ce02be2e2a65f83d13c5f9a7445c05..23b84d6651ee79d7a04a4b8670b5caddd1733bc4 100644 --- a/process/Loghistory_lib/process.js +++ b/process/Loghistory_lib/process.js @@ -17,6 +17,7 @@ import("Contact_lib"); import("AddressEntity_lib"); import("Util_lib"); import("KeywordRegistry_basic"); +import("system.entities"); /** * object for writing the LogHistory based on audit-changes @@ -68,7 +69,51 @@ LogHistoryExecutor.TRANSLATION_LANGUAGE = function() */ LogHistoryExecutor.prototype.execute = function () { - var references = {}; + + if (this.affectedTable == "AB_LOGHISTORY")//this would cause an endless logging-loop otherwise + throw new Error(translate.withArguments("the \"%0\" table is configured to get logged but this is the logging-stoarge itself and cannot be monitored", ["AB_LOGHISTORY"])); + + var idvalue = this.idValue; + var description; + var references; + var extra = []; + extra["COMMUNICATION"] = { + IDs: ["CONTACT_ID", "MEDIUM_ID"], + RefTable: "CONTACT", + Description: translate.text("Communication", this.translationLanguage) + }; + extra["AB_ATTRIBUTERELATION"] = { + IDs: ["OBJECT_ROWID", "AB_ATTRIBUTE_ID"], + Description: translate.text("Attribute", this.translationLanguage) + }; + + [description, idvalue, references] = this.generateLogHistory(idvalue, extra,references ); + + if (description == null) { + return null; + } + else if (description.length > 0) + { + for (let index in references) + { + if (references[index].id != "") + { + this._addEntryForInsert(references[index].table.trim(), references[index].id, this.affectedTable.trim(), idvalue, description); + idvalue = ""; + } + } + if (idvalue != "") + { + this._addEntryForInsert(this.affectedTable.trim(), idvalue, "", "", description); + } + } + this._insertLoghistEntry(); + return null; +}; + +LogHistoryExecutor.prototype.generateLogHistory = function (pIdvalue, pExtra) +{ + var references = {}; var columnStructure = {}; var primaryKey = ""; var somethingTolog = false; @@ -94,28 +139,13 @@ LogHistoryExecutor.prototype.execute = function () if (!somethingTolog) return null; - if (this.affectedTable == "AB_LOGHISTORY")//this would cause an endless logging-loop otherwise - throw new Error(translate.withArguments("the \"%0\" table is configured to get logged but this is the logging-stoarge itself and cannot be monitored", ["AB_LOGHISTORY"])); - - var idvalue = this.idValue; var description = []; - var extra = []; - extra["COMMUNICATION"] = { - IDs: ["CONTACT_ID", "MEDIUM_ID"], - RefTable: "CONTACT", - Description: translate.text("Communication", this.translationLanguage) - }; - extra["AB_ATTRIBUTERELATION"] = { - IDs: ["OBJECT_ROWID", "AB_ATTRIBUTE_ID"], - Description: translate.text("Attribute", this.translationLanguage) - }; - var oldvalues = {}; var newvalues = {}; - if (extra[this.affectedTable]) + if (pExtra[this.affectedTable]) { - var conf = extra[this.affectedTable]; + var conf = pExtra[this.affectedTable]; for(let i = 0; i < this.columns.length; i++ ) { @@ -125,7 +155,7 @@ LogHistoryExecutor.prototype.execute = function () if (this.sqlAction == 'D') newvalues = oldvalues; if ((this.sqlAction == 'D' || this.sqlAction == 'I') && newvalues[conf.IDs[1]]) { - idvalue = newvalues[conf.IDs[0]]; + pIdvalue = newvalues[conf.IDs[0]]; var data = this._getDataForExtras(newvalues[conf.IDs[1]], newvalues); if (data[1]) description.push(translate.withArguments("%0 \"%1\"", [conf.Description + " " + data[0] + ":", data[1]], this.translationLanguage)); @@ -134,8 +164,8 @@ LogHistoryExecutor.prototype.execute = function () } if (this.sqlAction == 'U') { - var ids = newSelect(conf.IDs).from(this.affectedTable).where([this.affectedTable, this.affectedTable + "ID"], idvalue).arrayRow(); - idvalue = ids[0]; + var ids = newSelect(conf.IDs).from(this.affectedTable).where([this.affectedTable, this.affectedTable + "ID"], pIdvalue).arrayRow(); + pIdvalue = ids[0]; var oldid = ids[1]; if (oldvalues[conf.IDs[1]]) oldid = oldvalues[conf.IDs[1]]; var olddata = this._getDataForExtras(oldid, oldvalues); @@ -162,7 +192,7 @@ LogHistoryExecutor.prototype.execute = function () { var entrytypePosition = this.columns.indexOf("ENTRYTYPE"); if (entrytypePosition > -1 && this.newValues[entrytypePosition] == calendars.VEVENT) - return null; + return [null, null, null]; } for (let i = 0; i < this.columns.length; i++) @@ -214,22 +244,9 @@ LogHistoryExecutor.prototype.execute = function () if (this.sqlAction == 'I') description = translate.withArguments("%0 added.", [description.join(",\n")], this.translationLanguage); else if (this.sqlAction == 'U') description = translate.withArguments("%0 modified.", [description.join(",\n")], this.translationLanguage); else if (this.sqlAction == 'D') description = translate.withArguments("%0 deleted.", [description.join(",\n")], this.translationLanguage); - for (let index in references) - { - if (references[index].id != "") - { - this._addEntryForInsert(references[index].table.trim(), references[index].id, this.affectedTable.trim(), idvalue, description); - idvalue = ""; - } - } - if (idvalue != "") - { - this._addEntryForInsert(this.affectedTable.trim(), idvalue, "", "", description); - } } - this._insertLoghistEntry(); - return null; -}; + return [description, pIdvalue, references]; +} /* * adds an entry that shall be inserted into the AB_LOGHIST-table diff --git a/process/Observation_lib/Observation_lib.aod b/process/Observation_lib/Observation_lib.aod new file mode 100644 index 0000000000000000000000000000000000000000..d7972e1705c899721f8c52dde5c238d3b90ba72c --- /dev/null +++ b/process/Observation_lib/Observation_lib.aod @@ -0,0 +1,10 @@ +<?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>Observation_lib</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <process>%aditoprj%/process/Observation_lib/process.js</process> + <alias>Data_alias</alias> + <variants> + <element>LIBRARY</element> + </variants> +</process> diff --git a/process/Observation_lib/process.js b/process/Observation_lib/process.js new file mode 100644 index 0000000000000000000000000000000000000000..86d8c3a33a7bbc35cd6ca08ffb4e816b73921cde --- /dev/null +++ b/process/Observation_lib/process.js @@ -0,0 +1,704 @@ +import("KeywordRegistry_basic"); +import("system.logging"); +import("system.text"); +import("system.project"); +import("system.vars"); +import("Employee_lib"); +import("system.workflow"); +import("system.translate"); +import("system.tools"); +import("Context_lib"); +import("system.entities"); +import("Sql_lib"); +import("Workflow_lib"); +import("system.notification"); +import("Dependency_lib"); +import("system.tools"); +import("system.datetime"); +import("system.db"); +import("system.favorite"); + +function Observation(){} + +Observation.OBJECT_TYPE = function () { + return "OBJECT_TYPE_Dependency"; +} +Observation.OBJECT_IDs = function () { + return "OBJECT_IDs_Dependency"; +} +Observation.PRIO = function () { + return "PRIORITY"; +} + +/** + * If the variables have not yet been parsed to an Object, they will now. + * + * @param {Object} [pVariables] the Variables which were set in the Workflow_lib + * @param {String} [pVariable] the name of the variable to be formatted + * @return {Void} + */ +Observation.parseVariableIfNeed = function(pVariables,pVariable) +{ + if (pVariables[pVariable] && typeof pVariables[pVariable] !== 'object' && pVariables[pVariable] !== null) + pVariables[pVariable] = JSON.parse(pVariables[pVariable]); +} + +/** + * Checks the observations for the specific changed data set and then forwards them to the Observation._notifiyUsers() function. + * + * @param {Object} [pVariables] the Variables which were set in the Workflow_lib + * @param {String} [pObservationId] the id of the parent observation. This variable is required for the recursion. + * + * @return {Void} + */ +Observation.checkObservation = function(pVariables, pObservationId) +{ + if (pVariables[WorkflowVariables.TRIGGER()]) + { + Observation.parseVariableIfNeed(pVariables, WorkflowVariables.CHANGED_ROWS()); + Observation.parseVariableIfNeed(pVariables, WorkflowVariables.CHANGED_ROWS_TYPES()); + Observation.parseVariableIfNeed(pVariables, WorkflowVariables.ROWDATA()); + Observation.parseVariableIfNeed(pVariables, WorkflowVariables.INITIAL_ROWDATA()); + + var observers = {}; + var observations = newSelect(["OBSERVATION.OBJECT_ID", "OBSERVATION.OBJECT_FILTER" ,"OBSERVATION.OBSERVER", "OBSERVATION.OBJECT_FIELD", "O.OBJECT_TYPE", "OBSERVATION.OBSERVATION_ID", "OBSERVATION.NOTIFICATION_PRIO"]) + .from("OBSERVATION") + .leftJoin("OBSERVATION", "OBSERVATION.OBSERVATION_ID = O.OBSERVATIONID", "O") + .where( + newWhere("OBSERVATION.OBJECT_ID", pVariables[WorkflowVariables.TARGET_ID()]) + .or("OBSERVATION.OBJECT_ID IS NULL")) + .and("OBSERVATION.OBJECT_TYPE", pVariables[WorkflowVariables.TARGET_CONTEXT()]); + + if (pObservationId) + observations.andIfSet("OBSERVATION.OBSERVATIONID", pObservationId) + else + observations.and("OBSERVATION." + pVariables[WorkflowVariables.TRIGGER()], "1"); + + observations = observations.table(); + + for (let i = 0; i < observations.length; i++) + { + var observation = observations[i]; + var filterResult = 0; + + if (!observation[0] && observation[1] || pObservationId) + { + var config = entities.createConfigForLoadingRows() + .uids([pVariables[WorkflowVariables.TARGET_ID()]]) + .entity(ContextUtils.getEntity(pVariables[WorkflowVariables.TARGET_CONTEXT()])) + .ignorePermissions(true); + + if (observation[1]) + config.filter(JSON.stringify(JSON.parse(observation[1]).filter)); + + try + { + filterResult = entities.getRows(config.fields(["#CONTENTTITLE"]))[0]["#CONTENTTITLE"]; + } + catch (e) + { + logging.log(e); + filterResult = null; + } + } + + if (pObservationId && ((observation[0] && !observation[1]) || filterResult)) + { + return filterResult; + } + + if ((observation[0] && !observation[1]) || filterResult) + { + // exclude the user who made the change. + if (pVariables[WorkflowVariables.EVENT_USER()] !== observation[2]) + { + var observeFileds = {}; + text.decodeMS(observation[3]).forEach(function (observeFiled) { + let field = text.decodeMS(observeFiled); + let fieldNames = text.decodeMS(field[0]); + let displayValueField = "#COLUMNEXP_____" + fieldNames[1] + ".displayValue"; + + let observedField = pVariables[WorkflowVariables.ROWDATA()][displayValueField] ? displayValueField : null; + observeFileds[fieldNames[0]] = [field[1], observedField]; + }); + + pVariables[WorkflowVariables.CHANGED_ROWS()].forEach(function (recordField) { + if (observeFileds[recordField]) + { + if (!observers[observation[2]]) + observers[observation[2]] = {}; + + if (observeFileds[recordField][1]) + observers[observation[2]][observeFileds[recordField][1]] = observeFileds[recordField][0]; + else + observers[observation[2]][recordField] = observeFileds[recordField][0]; + } + + }); + } + } + else if (pVariables[WorkflowVariables.TRIGGER()] == WorkflowSignalSender.EVENT_DELETE()) + { + observers[observation[2]] = {}; + } + if (observers[observation[2]]) + { + observers[observation[2]][Observation.PRIO()] = observation[6]; + + if (observation[4] && !pObservationId) + { + observers[observation[2]][Observation.OBJECT_TYPE()] = observation[4]; + observers[observation[2]][Observation.OBJECT_IDs()] = {}; + + var dependentIds = + Dependency.mapping()[ContextUtils.getEntity(pVariables[WorkflowVariables.TARGET_CONTEXT()])][ContextUtils.getEntity(observation[4])] + .getUIDsfn(pVariables[WorkflowVariables.ROWDATA()], pVariables[WorkflowVariables.INITIAL_ROWDATA()]); + + var dependentCheckVars = {} + dependentCheckVars[WorkflowVariables.TRIGGER()] = pVariables[WorkflowVariables.TRIGGER()]; + dependentCheckVars[WorkflowVariables.CHANGED_ROWS()] = {}; + dependentCheckVars[WorkflowVariables.ROWDATA()] = {}; + dependentCheckVars[WorkflowVariables.TARGET_CONTEXT()] = observation[4]; + dependentCheckVars[WorkflowVariables.EVENT_USER()] = observation[2]; + for (let index = 0; index < dependentIds.length; index++) + { + dependentCheckVars[WorkflowVariables.TARGET_ID()] = dependentIds[index]; + var contentTitle = Observation.checkObservation(dependentCheckVars, observation[5]); + if (contentTitle){ // Check Dependent + observers[observation[2]][Observation.OBJECT_IDs()][dependentIds[index]] = contentTitle; + } + } + } + } + + } + + if (pObservationId) + { + return null; + } + + Observation._notifiyUsers(pVariables, observers); + } + return null; +} + +/** + * Handle the Notifications for the given Observers and + * assembles the individual notification for each user + * + * @param {Object} [pVariables] the Variables which were set in the Workflow_lib + * @param {Object} [pObservers] the Observers with the observed fields + */ +Observation._notifiyUsers = function (pVariables, pObservers) +{ + var observers = Object.keys(pObservers) + if (pObservers && observers.length != 0 && pVariables) + { + var user = tools.getUserByAttribute(tools.NAME, pVariables[WorkflowVariables.EVENT_USER()], tools.PROFILE_DEFAULT); + var notificationCaption; + var filteredVariables = { + notificationCaption : translate.text(notificationCaption), + notificationDescription : (user.params.firstname + " " + user.params.lastname).trim() + " " + translate.text("has") + " ", + notificationUser : JSON.stringify(observers), + notificationType : "ObservationNotification" + } + + observers.forEach(function (pObserver) { + // If there is a OBJECT_TYPE, this is a dependency observation + if (pObservers[pObserver][Observation.OBJECT_TYPE()]) + { + filteredVariables.notificationSubcategory = pObservers[pObserver][Observation.OBJECT_TYPE()] + filteredVariables.notificationCaption = pVariables[WorkflowVariables.TRIGGER()]; + var context = pObservers[pObserver][Observation.OBJECT_TYPE()]; + for (var targetId in pObservers[pObserver][Observation.OBJECT_IDs()]) + { + Observation._notification( + pVariables, + filteredVariables, + pObservers, + pObserver, + context, + pObservers[pObserver][Observation.OBJECT_IDs()][targetId], + targetId); + } + } + else + { + filteredVariables.notificationCaption = pVariables[WorkflowVariables.TRIGGER()]; + Observation._notification( + pVariables, + filteredVariables, + pObservers, + pObserver, + pVariables[WorkflowVariables.TARGET_CONTEXT()], + pVariables[WorkflowVariables.CONTENTTITLE()], + pVariables[WorkflowVariables.TARGET_ID()]); + + } + + }); + } +} + +/** + * Handle the Notifications for the given Observers and + * assembles the individual notification for each user. + * + * @param {Object} [pVariables] the Variables which were set in the Workflow_lib. + * @param {Object} [pFilteredVariables] Only for the notification used variables. + * @param {Object} [pObservers] the Observers with the observed fields. + * @param {Object} [pObserver] the current observer in the loop. + * @param {Object} [pContext] the context from which the change is based. + * @param {Object} [pContenttitle] the Contenttitle of the changed context or dependency. + * @param {Object} [pTargetId] the id of the record from which the change is based. + */ +Observation._notification = function (pVariables, pFilteredVariables, pObservers, pObserver, pContext, pContenttitle, pTargetId) +{ + pFilteredVariables.notificationPriority = pObservers[pObserver][Observation.PRIO()]; + pFilteredVariables.notificationCaption = translate.text(pVariables[WorkflowVariables.TRIGGER()].slice(12)); + pFilteredVariables.notificationDescription += translate.text(pContext) + " \"" + pContenttitle + "\" "; + pFilteredVariables.notificationAffectedUID = pTargetId; + pFilteredVariables.notificationAffectedContext = pContext; + var isfirstField = true; + switch (pVariables[WorkflowVariables.TRIGGER()]) + { + case WorkflowSignalSender.EVENT_INSERT(): + pFilteredVariables.notificationDescription += translate.text("inserted") + ":"; + break; + case WorkflowSignalSender.EVENT_UPDATE(): + pFilteredVariables.notificationDescription += translate.text("changed") + ":"; + + let subcategories = [] + if (pFilteredVariables.notificationSubcategory) + subcategories.push(pFilteredVariables.notificationSubcategory); + + notification.getUserNotifications(pObserver, [notification.STATE_SEEN, notification.STATE_UNSEEN], subcategories).forEach(function (pNotification) { + if (pNotification.caption == pFilteredVariables.notificationCaption && + pNotification.linkinfo == text.encodeMS([pContext, pTargetId]) && + pNotification.type == pFilteredVariables.notificationType) + { + isfirstField = false; + pFilteredVariables.notificationContentId = pNotification.contentid; + pFilteredVariables.notificationDescription = pNotification.description; + } + }); + break; + case WorkflowSignalSender.EVENT_DELETE(): + pFilteredVariables.notificationDescription += translate.text("deleted") + "."; + pFilteredVariables.notificationDescription = pFilteredVariables.notificationDescription.toString(); + Observation._createNotification(pFilteredVariables); + return; + } + + pFilteredVariables.notificationUser = pObserver; + var isNewDescription = false; + if (pFilteredVariables != {}){ + var rowData = pVariables[WorkflowVariables.ROWDATA()]; + Object.keys(pObservers[pObserver]).forEach(function (field) { + if (pVariables[WorkflowVariables.CHANGED_ROWS()].indexOf(field) > -1) + { + var formatedFieldValue = Observation.formatFieldValue(rowData,pVariables[WorkflowVariables.CHANGED_ROWS_TYPES()], field); + pFilteredVariables.notificationDescription += " " +(isfirstField ? "" : translate.text("and"))+ " " + + pObservers[pObserver][field] + " " + translate.text("was set to") + " \"" + formatedFieldValue + "\""; + isfirstField = false; + isNewDescription = true; + } + }); + } + + if (isNewDescription) + { + pFilteredVariables.notificationDescription = pFilteredVariables.notificationDescription.toString(); + Observation._createNotification(pFilteredVariables); + } + +} + +/** + * Create The Notifiction for the users. + * + * @param {Object} [variables] the variables that are needed to notify users. + * @return {Void} + */ +Observation._createNotification = function (variables) +{ + if (false) // WorkflowUtils.engineIsEnabled() + { + checkObservation.signalEventReceived("Observation", variables); + } + else + { + var config = notification.createConfig() + .notificationType(variables.notificationType || "WorkflowNotification") + .caption(variables.notificationCaption || "") + .description(variables.notificationDescription || ""); + + try { + config.addUsersWithIds(JSON.parse(variables.notificationUser)); + } catch (e) { // Throw an exeption when the variable can't parse to an JSON-Object. + config.addUsersWithIds([variables.notificationUser || variables.USER_ID]) + } + + var prio; + switch (variables.notificationPriority){ + case $KeywordRegistry.notificationPriority$none: + prio = notification.PRIO_NONE + break; + case $KeywordRegistry.notificationPriority$low(): + prio = notification.PRIO_LOW + break; + case $KeywordRegistry.notificationPriority$hight(): + prio = notification.PRIO_HIGH + break; + case $KeywordRegistry.notificationPriority$max(): + prio = notification.PRIO_MAX + break; + case $KeywordRegistry.notificationPriority$normal(): + default: + prio = notification.PRIO_NORMAL + break; + } + config.forcedPriority(prio); + + if (variables.notificationIcon) + config.imageInfo(variables.notificationIcon); + if (variables.notificationSubcategory) + config.notificationSubCategory(variables.notificationSubcategory); + + if (variables.notificationAffectedContext && variables.notificationAffectedUID) + config.linkInfo(text.encodeMS([variables.notificationAffectedContext, variables.notificationAffectedUID])); + + if (variables.notificationContentId) + config.contentId(variables.notificationContentId).remindAgainOnNewContent(true); + + notification.addNotificationWith(config); + } + +} + +/** + * Formatting of the vale of the field from the pRowData using the associated type. + * + * @param {Object} [pRowData] the RowData which were changed. + * @param {Object} [pTypes] the types of the columns of the changed rows. + * @param {String} [pField] the field whose value is to be formatted. + * @return {String} the formatted value + */ +Observation.formatFieldValue = function (pRowData, pTypes, pField) +{ + switch (pTypes[pField]) + { + case "DATE": + return datetime.toDate(pRowData[pField], translate.text("dd.MM.yyyy"), "Europe/Berlin"); + default : + return pRowData[pField] + } +} + +/** + * This function is called in every observation action and + * saves the data required for the observation, if this is not already available. + * + * @return {Void} + */ +Observation.insertAction = function () +{ + let contextID = ContextUtils.getCurrentContextId(); + let observer = EmployeeUtils.getCurrentUserId(); + let rowCount = newSelect("COUNT(*)") + .from("OBSERVATION") + .where("OBSERVATION.OBJECT_TYPE", contextID) + .and("OBSERVATION.OBSERVER", observer); + + var fields = { + "OBJECT_TYPE" : contextID, + "OBSERVER" : observer, + "OBJECT_FIELD" : Observation.getAllFieldValue(contextID).toString() + } + + let createRowConfig = entities.createConfigForAddingRows() + .entity("Observation_entity"); + + let selectedUIDs = vars.get("$sys.selection"); + + if (selectedUIDs.length){ + selectedUIDs.forEach(function (uid) + { + let tempRowCount = rowCount.copy() + .and("OBSERVATION.OBJECT_ID", uid); + + if (tempRowCount.cell() == 0) + { + fields.OBJECT_ID = uid; + entities.createRow(createRowConfig.fieldValues(fields)); + } + + }); + } else { + let filter = Observation.getContextFilter(contextID,vars.get("$sys.filter").filter); + + rowCount.and("OBSERVATION.OBJECT_FILTER", filter, SqlBuilder.LIKE()); + if (rowCount.cell() == 0) + { + fields.OBJECT_FILTER = filter; + entities.createRow(createRowConfig.fieldValues(fields)); + } + } +} + +/** + * This function is called in every cancel observation action and + * deletes the data required for the observation, if this is not already available. + * + * @return {Void} + */ +Observation.cancelAction = function () +{ + let contextID = ContextUtils.getCurrentContextId(); + let observer = EmployeeUtils.getCurrentUserId(); + let selectedUIDs = vars.get("$sys.selection"); + let cond = newWhere("OBSERVATION.OBJECT_TYPE", contextID) + .and("OBSERVATION.OBSERVER", observer); + + if (selectedUIDs.length){ + cond.and("OBSERVATION.OBJECT_ID", selectedUIDs, SqlBuilder.IN()) + .deleteData(true, "OBSERVATION"); + } else { + let filter = Observation.getContextFilter(contextID,vars.get("$sys.filter").filter); + + cond.and("OBSERVATION.OBJECT_FILTER", filter, SqlBuilder.LIKE()) + .deleteData(true, "OBSERVATION"); + } +} + + +/** + * Returns the title of the cancel observation action depending on the count of UIDs + * + * @param {Array} [pUIDs] selectedUids + * @return {String} Title + */ +Observation.cancelActionTitle = function (pUIDs) +{ + let UIDcount = pUIDs.length; + + if (UIDcount == 1) + { + return translate.text("Cancel ID Observation"); + } + else if (UIDcount > 1) + { + return translate.text("Cancel IDs Observations") ; + } + else + { + return translate.text("Cancel Filter Observation"); + } +} + +/** + * Returns the title of the observation action depending on the count of UIDs + * + * @param {Array} [pUIDs] selectedUids + * @return {String} Title + */ +Observation.observeActionTitle = function (pUIDs) +{ + let UIDcount = pUIDs.length; + + if (UIDcount == 1) + { + return translate.text("Observe ID"); + } + else if (UIDcount > 1) + { + return translate.text("Observe IDs"); + } + else + { + return translate.text("Observe Filter"); + } + +} + +/** + * Calculates the number of observation records of the current context and logged-in users. + * + * @return {Int} Count of records + */ +Observation.countObservations = function () +{ + let contextID = ContextUtils.getCurrentContextId(); + let observer = EmployeeUtils.getCurrentUserId(); + let selectedUIDs = vars.get("$sys.selection").filter(function (el) { + return el; + }); + let rowCount = newSelect("COUNT(*)") + .from("OBSERVATION") + .where("OBSERVATION.OBJECT_TYPE", contextID) + .and("OBSERVATION.OBSERVER", observer); + + if (selectedUIDs && selectedUIDs.length){ + rowCount.and("OBSERVATION.OBJECT_ID", selectedUIDs, SqlBuilder.IN()); + } else { + rowCount.and("OBSERVATION.OBJECT_FILTER", Observation.getContextFilter(contextID,vars.get("$sys.filter").filter), SqlBuilder.LIKE()); + } + return parseInt(rowCount.cell()); +} + +/** + * Returns an object with the entity and filter. + * If filter or entity are not set, they are set to an empty filter and the current entity. + * + * @param {String} [pEntity] + * @param {Object} [pFilter] + * @return {Object} Object in Format: {"filter": {"type":"group","operator":"AND","childs":[...]}, "entity": "Entity_entity"} + */ +Observation.getEntityFilter = function (pEntity, pFilter) +{ + if (!pEntity) + pEntity = ContextUtils.getEntity(ContextUtils.getCurrentContextId()); + if (!pFilter) + pFilter = { + "type":"group", + "operator":"AND", + "childs":[] + } + + return JSON.stringify({ + "filter":pFilter, + "entity":pEntity + }); +} + +/** + * Returns an object with the entity and filter. + * If filter or context are not set, they are set to an empty filter and the context of the current entity. + * + * @param {String} [pContext] + * @param {Object} [pFilter] + * @return {Object} Object in Format: {"filter": {"type":"group","operator":"AND","childs":[...]}, "entity": "Entity_entity"} + */ +Observation.getContextFilter = function (pContext, pFilter) +{ + return Observation.getEntityFilter(ContextUtils.getEntity(pContext), pFilter); +} + +/** + * Gives all possible fields which can be observed. + * + * @param {String} [pType] the Type or the context name + * @return {Array} this contains all the possible fields. + */ +Observation.getAllPosibleFields = function (pType) +{ + if (pType) + { + let entity = ContextUtils.getEntity(pType); + var resultFields = []; + var fields = project.getEntityStructure(entity).fields; + var rcm = project.getRecordContainerModel(entity); + var recordFieldMappings = {}; + var tables = {}; + var excludeFields = ["DATE_NEW", "DATE_EDIT", "USER_NEW", "USER_EDIT"]; + + if (Dependency.excludedFields()[entity]) + excludeFields = excludeFields.concat(Dependency.excludedFields()[entity]); + + if (rcm.type == project.RECORDCONTAINERTYPE_DB){ + for (var index in rcm.linkInformation) + { + var table = rcm.linkInformation[index]; + if (!table.readonly) + { + tables[table.tableName] = true; + excludeFields.push(table.primaryKey); + } + } + } + + for (var index1 in rcm.recordFieldMappings) + { + var mapping = rcm.recordFieldMappings[index1]; + let isInFormat = true; + let mappingID = ""; + if (typeof mapping == "object") + { + if (mapping.recordfield) + { + mappingID = mapping.recordfield; + if (!tables[mapping.recordfield.split(".")[0]] || excludeFields.indexOf(mapping.recordfield.split(".")[1]) >-1) + isInFormat = false; + } + else if (rcm.type == project.RECORDCONTAINERTYPE_DB) + isInFormat = false; + + if (mapping.name) + { + mappingID = !mappingID ? mapping.name : mappingID + if (!mapping.name.split(".")[1] == "value" || excludeFields.indexOf(mapping.name.split(".")[0]) >-1) + isInFormat = false; + + if (isInFormat) + recordFieldMappings[mapping.name.split(".")[0]] = text.encodeMS([mappingID, mapping.name.split(".")[0]]); + } + } + } + + for (var field in fields) + { + if (fields[field].fieldType == project.ENTITYFIELDTYPE_FIELD && recordFieldMappings[fields[field].name]) + { + if (!fields[field].usePermissions || (fields[field].usePermissions && tools.hasPermission(tools.PERMISSION_VIEW, entity, field))) + let title = fields[field].title ? fields[field].title : fields[field].name; + resultFields.push([text.encodeMS([recordFieldMappings[fields[field].name], title]), title ]); + } + + } + return resultFields; + } + return []; +} + +/** + * Gives all possible fields to monitor for the context as values ​​for the database. + * This is the default value of the fields when a new observation is created. + * + * @param {String} [pType] the Type or the context name + * @return {Stirng} The string is a multi-string from the array of the fields. Retuns null if the context cannot be observed. + */ +Observation.getAllFieldValue = function (pType) +{ + var values = Observation.getAllPosibleFields(pType); + if (values && values != []) + { + return text.encodeMS(values.map(function (value) { + return value[0]; + })); + } + return null; +} + +/** + * Get all dependencies of a certain type + * + * @param {String} [pType] the Type or the context name + * @return {Array} the possible dependencies + */ +Observation.getAllDependencyValue = function (pType) +{ + let contexts = [] + let dependencies = Dependency.getReverseDependency(ContextUtils.getEntity(pType), { + "isObservable" : true + }); + for (let i = 0; i < dependencies.length; i++) + { + let context = ContextUtils.getContextId(dependencies[i]); + if (context) + { + contexts.push(context); + } + } + return contexts; +} diff --git a/process/Workflow_lib/process.js b/process/Workflow_lib/process.js index b7ec7c17972e53f10f2ce3bf439f0b4dd3790766..baa1aa8dd3a01987ff1b06d66d7f6d33000fefcc 100644 --- a/process/Workflow_lib/process.js +++ b/process/Workflow_lib/process.js @@ -15,6 +15,7 @@ import("system.net"); import("system.auth"); import("system.util"); import("MimeType_lib"); +import("Observation_lib"); /** * Provides general functions for working with workflows and the workflow engine. @@ -231,7 +232,7 @@ WorkflowSignalSender.eventHappened = function (pEvent, pTargetId, pTargetContext */ WorkflowSignalSender.getSignalConfig = function (pContext, pEvent) { - var signals = newSelect("SIGNAL_NAME, TRIGGER_EVENT, OBJECT_CONDITION, OBJECT_TYPE, VARIABLES") + var signals = newSelect("SIGNAL_NAME, TRIGGER_EVENT, OBJECT_CONDITION, OBJECT_TYPE, VARIABLES", "Data_alias") .from("WORKFLOWSIGNAL") .whereIfSet("WORKFLOWSIGNAL.OBJECT_TYPE", pContext) .andIfSet("WORKFLOWSIGNAL.TRIGGER_EVENT", pEvent) @@ -272,7 +273,7 @@ WorkflowVariables.TARGET_ID = function () */ WorkflowVariables.TARGET_ID.getDefaultValue = function () { - return vars.get("$sys.uid"); + return vars.get("$local.uid"); } /** @@ -307,6 +308,22 @@ WorkflowVariables.ROWDATA.getDefaultValue = function () return JSON.stringify(vars.get("$local.rowdata")); } +/** + * Returns the variable name for the rowdata + */ +WorkflowVariables.INITIAL_ROWDATA = function () +{ + return "initialRowdata"; +} + +/** + * Returns the default value for the rowdata + */ +WorkflowVariables.INITIAL_ROWDATA.getDefaultValue = function () +{ + return JSON.stringify(vars.get("$local.initialRowdata")); +} + /** * Returns the variable name for the changed rows */ @@ -323,6 +340,35 @@ WorkflowVariables.CHANGED_ROWS.getDefaultValue = function () return JSON.stringify(vars.get("$local.changed")); } +/** + * Returns the variable name for the changed rows types + */ +WorkflowVariables.CHANGED_ROWS_TYPES = function () +{ + return "changedRowsTypes"; +} + +/** + * Returns the default value for the changed rows + */ +WorkflowVariables.CHANGED_ROWS_TYPES.getDefaultValue = function () +{ + let isDBrc = project.getRecordContainerModel(ContextUtils.getEntity(ContextUtils.getCurrentContextId())).type == project.RECORDCONTAINERTYPE_DB; + let types = {} + vars.get("$local.changed").forEach(function(pField) { + let splitedField = pField.split("."); + let fieldName; + if (isDBrc) { + fieldName = splitedField[1] + } else { + fieldName = splitedField[0] + } + if (splitedField[1] != "displayValue" && vars.exists("$property." + fieldName + ".contentType") ) + types[pField] = vars.get("$property." + fieldName + ".contentType"); + }); + return JSON.stringify(types); +} + /** * Returns the variable name for the event user */ @@ -409,8 +455,10 @@ WorkflowVariables.getAllVariables = function () { return [ "CHANGED_ROWS", + "CHANGED_ROWS_TYPES", "EVENT_TIME", "EVENT_USER", + "INITIAL_ROWDATA", "ROWDATA", "TARGET_CONTEXT", "TARGET_ID", diff --git a/process/workflowExtension_serverProcess/process.js b/process/workflowExtension_serverProcess/process.js index ce13d62e6701972701b2e0620dbb9ebc4e3c232d..e41601e19704431dcbd03f6022eb9eead22368a1 100644 --- a/process/workflowExtension_serverProcess/process.js +++ b/process/workflowExtension_serverProcess/process.js @@ -2,6 +2,7 @@ import("Context_lib"); import("Classification_lib"); import("Workflow_lib"); import("system.vars"); +import("Observation_lib") var localVariables = JSON.parse(vars.get("$local.variablesWorkflow")); var targetId = localVariables["targetId"]; @@ -9,4 +10,6 @@ var entityName = ContextUtils.getEntity(localVariables["targetContext"]); var rowData = JSON.parse(localVariables[WorkflowVariables.ROWDATA()]); var changedRows = JSON.parse(localVariables[WorkflowVariables.CHANGED_ROWS()]); +Observation.checkObservation(JSON.parse(vars.get("$local.variablesWorkflow"))); + ClassificationUtils.setClassificationStorageDatasetsOutdated([targetId], entityName, rowData, changedRows);