From 602cc2550a25b042fdb965c47f6327d96561420a Mon Sep 17 00:00:00 2001 From: PHAM HOANG HUNG Date: Thu, 1 Aug 2024 08:37:17 +0700 Subject: [PATCH 1/2] MARP-626 Fix for Dev Fail on Market-Monitor --- .github/workflows/ci.yml | 2 +- .github/workflows/dev-10.yml | 11 ---------- .github/workflows/dev.yml | 2 +- .github/workflows/release.yml | 2 +- mattermost-connector-demo/pom.xml | 14 +++++++++++- mattermost-connector-notification/pom.xml | 14 +++++++++++- mattermost-connector-test/pom.xml | 26 +++++++++++++++++++++-- mattermost-connector/pom.xml | 14 +++++++++++- 8 files changed, 66 insertions(+), 19 deletions(-) delete mode 100644 .github/workflows/dev-10.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1bc3496..87d78f0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,4 +9,4 @@ on: jobs: build: - uses: axonivy-market/github-workflows/.github/workflows/ci.yml@v2 + uses: axonivy-market/github-workflows/.github/workflows/ci.yml@v4 diff --git a/.github/workflows/dev-10.yml b/.github/workflows/dev-10.yml deleted file mode 100644 index 6603e21..0000000 --- a/.github/workflows/dev-10.yml +++ /dev/null @@ -1,11 +0,0 @@ -name: Dev-10-Build - -on: - push: - schedule: - - cron: '21 21 * * *' - workflow_dispatch: - -jobs: - build: - uses: axonivy-market/github-workflows/.github/workflows/dev-10.yml@feature/MARP-626-Fix-for-Dev-Fail-on-Market-Monitor diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 03dc95f..c2fee37 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -8,4 +8,4 @@ on: jobs: build: - uses: axonivy-market/github-workflows/.github/workflows/dev.yml@feature/MARP-626-Fix-for-Dev-Fail-on-Market-Monitor + uses: axonivy-market/github-workflows/.github/workflows/dev.yml@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 128a183..ab5b0d7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,4 +4,4 @@ on: workflow_dispatch jobs: build: - uses: axonivy-market/github-workflows/.github/workflows/release.yml@v2 + uses: axonivy-market/github-workflows/.github/workflows/release.yml@v4 diff --git a/mattermost-connector-demo/pom.xml b/mattermost-connector-demo/pom.xml index f9279c2..2345935 100644 --- a/mattermost-connector-demo/pom.xml +++ b/mattermost-connector-demo/pom.xml @@ -5,6 +5,18 @@ mattermost-connector-demo 10.0.20-SNAPSHOT iar + + 10.0.16 + + + + sonatype + https://oss.sonatype.org/content/repositories/snapshots + + always + + + com.axonivy.connector.mattermost @@ -33,7 +45,7 @@ com.axonivy.ivy.ci project-build-plugin - 10.0.14 + ${project.build.plugin.version} true diff --git a/mattermost-connector-notification/pom.xml b/mattermost-connector-notification/pom.xml index e367f29..11820ef 100644 --- a/mattermost-connector-notification/pom.xml +++ b/mattermost-connector-notification/pom.xml @@ -5,6 +5,18 @@ mattermost-connector-notification 10.0.20-SNAPSHOT iar + + 10.0.16 + + + + sonatype + https://oss.sonatype.org/content/repositories/snapshots + + always + + + com.axonivy.connector.mattermost @@ -18,7 +30,7 @@ com.axonivy.ivy.ci project-build-plugin - 10.0.14 + ${project.build.plugin.version} true diff --git a/mattermost-connector-test/pom.xml b/mattermost-connector-test/pom.xml index c443acb..8aa5201 100644 --- a/mattermost-connector-test/pom.xml +++ b/mattermost-connector-test/pom.xml @@ -5,6 +5,28 @@ mattermost-connector-test 10.0.20-SNAPSHOT iar + + 10.0.16 + 10.0.16 + + + + sonatype + https://oss.sonatype.org/content/repositories/snapshots + + always + + + + + + sonatype + https://oss.sonatype.org/content/repositories/snapshots + + always + + + com.axonivy.connector.mattermost @@ -15,7 +37,7 @@ com.axonivy.ivy.test unit-tester - 10.0.14 + ${tester.version} test @@ -36,7 +58,7 @@ com.axonivy.ivy.ci project-build-plugin - 10.0.14 + ${project.build.plugin.version} true diff --git a/mattermost-connector/pom.xml b/mattermost-connector/pom.xml index adcec9e..fd268fc 100644 --- a/mattermost-connector/pom.xml +++ b/mattermost-connector/pom.xml @@ -5,6 +5,18 @@ mattermost-connector 10.0.20-SNAPSHOT iar + + 10.0.16 + + + + sonatype + https://oss.sonatype.org/content/repositories/snapshots + + always + + + @@ -19,7 +31,7 @@ com.axonivy.ivy.ci project-build-plugin - 10.0.14 + ${project.build.plugin.version} true From dfdb76d477d713d479dc8a045b3bbf96fdf3dd6d Mon Sep 17 00:00:00 2001 From: PHAM HOANG HUNG Date: Thu, 1 Aug 2024 08:54:13 +0700 Subject: [PATCH 2/2] convert projects to 11 --- mattermost-connector-demo/pom.xml | 4 +- .../MattermostConnectorWebhookDemo.p.json | 37 ++++++---- .../TeamAbsences/TeamAbsencesProcess.p.json | 14 ++-- mattermost-connector-notification/pom.xml | 4 +- .../processes/installer.p.json | 5 +- mattermost-connector-product/pom.xml | 2 +- mattermost-connector-test/pom.xml | 6 +- mattermost-connector/.classpath | 7 +- mattermost-connector/.project | 8 +- mattermost-connector/.settings/.jsdtscope | 12 --- .../.settings/ch.ivyteam.ivy.designer.prefs | 4 +- .../.settings/org.eclipse.jdt.core.prefs | 6 +- .../org.eclipse.wst.common.component | 3 +- ....eclipse.wst.common.project.facet.core.xml | 6 +- ...rg.eclipse.wst.jsdt.ui.superType.container | 1 - .../org.eclipse.wst.jsdt.ui.superType.name | 1 - mattermost-connector/config/variables.yaml | 3 +- mattermost-connector/pom.xml | 4 +- .../processes/connector/Channel.p.json | 50 ++++++++----- .../connector/IncomingWebhook.p.json | 73 +++++++++++-------- .../processes/connector/Team.p.json | 50 ++++++++----- pom.xml | 2 +- 22 files changed, 170 insertions(+), 132 deletions(-) delete mode 100644 mattermost-connector/.settings/.jsdtscope delete mode 100644 mattermost-connector/.settings/org.eclipse.wst.jsdt.ui.superType.container delete mode 100644 mattermost-connector/.settings/org.eclipse.wst.jsdt.ui.superType.name diff --git a/mattermost-connector-demo/pom.xml b/mattermost-connector-demo/pom.xml index 2345935..904fa0d 100644 --- a/mattermost-connector-demo/pom.xml +++ b/mattermost-connector-demo/pom.xml @@ -3,10 +3,10 @@ 4.0.0 com.axonivy.connector.mattermost mattermost-connector-demo - 10.0.20-SNAPSHOT + 11.0.0-SNAPSHOT iar - 10.0.16 + 11.3.0 diff --git a/mattermost-connector-demo/processes/MattermostConnectorWebhookDemo.p.json b/mattermost-connector-demo/processes/MattermostConnectorWebhookDemo.p.json index 984444c..24fcc84 100644 --- a/mattermost-connector-demo/processes/MattermostConnectorWebhookDemo.p.json +++ b/mattermost-connector-demo/processes/MattermostConnectorWebhookDemo.p.json @@ -1,5 +1,5 @@ { - "format" : "10.0.0", + "$schema" : "https://json-schema.axonivy.com/process/11.3.0/process.json", "id" : "18F952928A1574A7", "config" : { "data" : "com.axonivy.connector.mattermost.connector.demo.MattermostConnectorWebhookDemoData" @@ -10,6 +10,7 @@ "name" : "Check Team Absences", "config" : { "signalCode" : "CheckTeamAbsences", + "attachToBusinessCase" : false, "output" : { "map" : { "out.channelId" : "signal.getSignalData() as String" @@ -18,15 +19,18 @@ "import com.axonivy.connector.mattermost.enums.CustomField;", "ivy.case.customFields().stringField(CustomField.CHANNEL_ID.getFieldName()).set(out.channelId);" ] - }, - "attachToBusinessCase" : "false", - "tags" : "demo" + } }, + "tags" : [ + "demo" + ], "visual" : { "at" : { "x" : 104, "y" : 112 }, "labelOffset" : { "x" : 17, "y" : -23 } }, - "connect" : { "id" : "f3", "to" : "f2" } + "connect" : [ + { "id" : "f3", "to" : "f2" } + ] }, { "id" : "f1", "type" : "TaskEnd", @@ -41,7 +45,7 @@ "task" : { "name" : "Check Team Absences", "responsible" : { - "role" : "Leader" + "activator" : "Leader" } } }, @@ -49,14 +53,15 @@ "at" : { "x" : 232, "y" : 112 }, "labelOffset" : { "x" : 14, "y" : 34 } }, - "connect" : { "id" : "f6", "to" : "f5" } + "connect" : [ + { "id" : "f6", "to" : "f5" } + ] }, { "id" : "f5", "type" : "DialogCall", "name" : "TeamAbsences", "config" : { - "dialogId" : "com.axonivy.connector.mattermost.connector.demo.TeamAbsences", - "startMethod" : "start()", + "dialog" : "com.axonivy.connector.mattermost.connector.demo.TeamAbsences:start()", "output" : { "map" : { "out" : "in", @@ -67,7 +72,9 @@ "visual" : { "at" : { "x" : 360, "y" : 112 } }, - "connect" : { "id" : "f17", "to" : "f16" } + "connect" : [ + { "id" : "f17", "to" : "f16" } + ] }, { "id" : "f7", "type" : "Script", @@ -85,7 +92,9 @@ "visual" : { "at" : { "x" : 648, "y" : 112 } }, - "connect" : { "id" : "f4", "to" : "f1" } + "connect" : [ + { "id" : "f4", "to" : "f1" } + ] }, { "id" : "f16", "type" : "TaskSwitchEvent", @@ -94,7 +103,7 @@ "task" : { "name" : "Send message to channel", "responsible" : { - "role" : "SYSTEM" + "activator" : "SYSTEM" } } }, @@ -102,6 +111,8 @@ "at" : { "x" : 504, "y" : 112 }, "labelOffset" : { "x" : 14, "y" : 34 } }, - "connect" : { "id" : "f8", "to" : "f7" } + "connect" : [ + { "id" : "f8", "to" : "f7" } + ] } ] } \ No newline at end of file diff --git a/mattermost-connector-demo/src_hd/com/axonivy/connector/mattermost/connector/demo/TeamAbsences/TeamAbsencesProcess.p.json b/mattermost-connector-demo/src_hd/com/axonivy/connector/mattermost/connector/demo/TeamAbsences/TeamAbsencesProcess.p.json index 54da30f..49870ca 100644 --- a/mattermost-connector-demo/src_hd/com/axonivy/connector/mattermost/connector/demo/TeamAbsences/TeamAbsencesProcess.p.json +++ b/mattermost-connector-demo/src_hd/com/axonivy/connector/mattermost/connector/demo/TeamAbsences/TeamAbsencesProcess.p.json @@ -1,5 +1,5 @@ { - "format" : "10.0.0", + "$schema" : "https://json-schema.axonivy.com/process/11.3.0/process.json", "id" : "18F953D50A711458", "kind" : "HTML_DIALOG", "config" : { @@ -10,10 +10,10 @@ "type" : "HtmlDialogStart", "name" : "start()", "config" : { - "callSignature" : "start", + "signature" : "start", "result" : { "params" : [ - { "name" : "message", "type" : "String" } + { "name" : "message", "type" : "String", "desc" : "" } ], "map" : { "result.message" : "in.message" @@ -24,7 +24,9 @@ "visual" : { "at" : { "x" : 96, "y" : 64 } }, - "connect" : { "id" : "f2", "to" : "f1" } + "connect" : [ + { "id" : "f2", "to" : "f1" } + ] }, { "id" : "f1", "type" : "HtmlDialogEnd", @@ -41,7 +43,9 @@ "visual" : { "at" : { "x" : 96, "y" : 160 } }, - "connect" : { "id" : "f5", "to" : "f4" } + "connect" : [ + { "id" : "f5", "to" : "f4" } + ] }, { "id" : "f4", "type" : "HtmlDialogExit", diff --git a/mattermost-connector-notification/pom.xml b/mattermost-connector-notification/pom.xml index 11820ef..ac76c5d 100644 --- a/mattermost-connector-notification/pom.xml +++ b/mattermost-connector-notification/pom.xml @@ -3,10 +3,10 @@ 4.0.0 com.axonivy.connector.mattermost mattermost-connector-notification - 10.0.20-SNAPSHOT + 11.0.0-SNAPSHOT iar - 10.0.16 + 11.3.0 diff --git a/mattermost-connector-notification/processes/installer.p.json b/mattermost-connector-notification/processes/installer.p.json index 4f6e575..a7636db 100644 --- a/mattermost-connector-notification/processes/installer.p.json +++ b/mattermost-connector-notification/processes/installer.p.json @@ -1,5 +1,5 @@ { - "format" : "10.0.0", + "$schema" : "https://json-schema.axonivy.com/process/11.3.0/process.json", "id" : "18F94E04AF515A4D", "config" : { "data" : "com.axonivy.connector.mattermost.connector.notification.installerData" @@ -9,7 +9,8 @@ "type" : "ProgramStart", "name" : "Task listener", "config" : { - "outerBean" : "com.axonivy.connector.mattermost.notification.MattermostNotificationStart" + "javaClass" : "com.axonivy.connector.mattermost.notification.MattermostNotificationStart", + "link" : "eventLink.ivp" }, "visual" : { "at" : { "x" : 96, "y" : 168 }, diff --git a/mattermost-connector-product/pom.xml b/mattermost-connector-product/pom.xml index 6cb2746..a0379a8 100644 --- a/mattermost-connector-product/pom.xml +++ b/mattermost-connector-product/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.axonivy.connector.mattermost mattermost-connector-product - 10.0.20-SNAPSHOT + 11.0.0-SNAPSHOT pom diff --git a/mattermost-connector-test/pom.xml b/mattermost-connector-test/pom.xml index 8aa5201..a960424 100644 --- a/mattermost-connector-test/pom.xml +++ b/mattermost-connector-test/pom.xml @@ -3,11 +3,11 @@ 4.0.0 com.axonivy.connector.mattermost mattermost-connector-test - 10.0.20-SNAPSHOT + 11.0.0-SNAPSHOT iar - 10.0.16 - 10.0.16 + 11.3.0 + 11.3.0 diff --git a/mattermost-connector/.classpath b/mattermost-connector/.classpath index 083aa95..722fc3a 100644 --- a/mattermost-connector/.classpath +++ b/mattermost-connector/.classpath @@ -5,12 +5,7 @@ - - - - - - + diff --git a/mattermost-connector/.project b/mattermost-connector/.project index 6ba0cbc..b735b2b 100644 --- a/mattermost-connector/.project +++ b/mattermost-connector/.project @@ -25,6 +25,11 @@ + + ch.ivyteam.ivy.dialog.form.build.ivyDialogFormBuilder + + + ch.ivyteam.ivy.designer.ide.ivyModelValidationBuilder @@ -44,6 +49,5 @@ org.eclipse.m2e.core.maven2Nature org.eclipse.jem.beaninfo.BeanInfoNature org.eclipse.wst.common.project.facet.core.nature - org.eclipse.wst.jsdt.core.jsNature - + \ No newline at end of file diff --git a/mattermost-connector/.settings/.jsdtscope b/mattermost-connector/.settings/.jsdtscope deleted file mode 100644 index 869c01d..0000000 --- a/mattermost-connector/.settings/.jsdtscope +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/mattermost-connector/.settings/ch.ivyteam.ivy.designer.prefs b/mattermost-connector/.settings/ch.ivyteam.ivy.designer.prefs index d0fae6d..c14676e 100644 --- a/mattermost-connector/.settings/ch.ivyteam.ivy.designer.prefs +++ b/mattermost-connector/.settings/ch.ivyteam.ivy.designer.prefs @@ -1,5 +1,5 @@ ch.ivyteam.ivy.designer.preferences.DataClassPreferencePage\:DEFAULT_DATA_CLASS=com.axonivy.connector.mattermost.connector.Data ch.ivyteam.ivy.designer.preferences.DataClassPreferencePage\:DEFAULT_NAMESPACE=com.axonivy.connector.mattermost.connector -ch.ivyteam.ivy.project.preferences\:PRIMEFACES_VERSION=11 -ch.ivyteam.ivy.project.preferences\:PROJECT_VERSION=100000 +ch.ivyteam.ivy.project.preferences\:PRIMEFACES_VERSION=13 +ch.ivyteam.ivy.project.preferences\:PROJECT_VERSION=114004 eclipse.preferences.version=1 diff --git a/mattermost-connector/.settings/org.eclipse.jdt.core.prefs b/mattermost-connector/.settings/org.eclipse.jdt.core.prefs index d4540a5..3a79233 100644 --- a/mattermost-connector/.settings/org.eclipse.jdt.core.prefs +++ b/mattermost-connector/.settings/org.eclipse.jdt.core.prefs @@ -1,10 +1,10 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 -org.eclipse.jdt.core.compiler.compliance=17 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=17 +org.eclipse.jdt.core.compiler.source=21 diff --git a/mattermost-connector/.settings/org.eclipse.wst.common.component b/mattermost-connector/.settings/org.eclipse.wst.common.component index c147261..d8118bc 100644 --- a/mattermost-connector/.settings/org.eclipse.wst.common.component +++ b/mattermost-connector/.settings/org.eclipse.wst.common.component @@ -2,10 +2,9 @@ - - + \ No newline at end of file diff --git a/mattermost-connector/.settings/org.eclipse.wst.common.project.facet.core.xml b/mattermost-connector/.settings/org.eclipse.wst.common.project.facet.core.xml index 156ecdb..621b1f8 100644 --- a/mattermost-connector/.settings/org.eclipse.wst.common.project.facet.core.xml +++ b/mattermost-connector/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -1,8 +1,6 @@ - - + - - + \ No newline at end of file diff --git a/mattermost-connector/.settings/org.eclipse.wst.jsdt.ui.superType.container b/mattermost-connector/.settings/org.eclipse.wst.jsdt.ui.superType.container deleted file mode 100644 index 3bd5d0a..0000000 --- a/mattermost-connector/.settings/org.eclipse.wst.jsdt.ui.superType.container +++ /dev/null @@ -1 +0,0 @@ -org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/mattermost-connector/.settings/org.eclipse.wst.jsdt.ui.superType.name b/mattermost-connector/.settings/org.eclipse.wst.jsdt.ui.superType.name deleted file mode 100644 index 05bd71b..0000000 --- a/mattermost-connector/.settings/org.eclipse.wst.jsdt.ui.superType.name +++ /dev/null @@ -1 +0,0 @@ -Window \ No newline at end of file diff --git a/mattermost-connector/config/variables.yaml b/mattermost-connector/config/variables.yaml index 17d52db..7122cfd 100644 --- a/mattermost-connector/config/variables.yaml +++ b/mattermost-connector/config/variables.yaml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://json-schema.axonivy.com/app/11.4.1/variables.json # == Variables == # # You can define here your project Variables. @@ -6,7 +7,7 @@ # '/Config/_/variables.yaml # Variables: -# myVariable: value + # myVariable: value mattermost: # The base URL of matter most baseUrl: "" diff --git a/mattermost-connector/pom.xml b/mattermost-connector/pom.xml index fd268fc..031bdf4 100644 --- a/mattermost-connector/pom.xml +++ b/mattermost-connector/pom.xml @@ -3,10 +3,10 @@ 4.0.0 com.axonivy.connector.mattermost mattermost-connector - 10.0.20-SNAPSHOT + 11.0.0-SNAPSHOT iar - 10.0.16 + 11.3.0 diff --git a/mattermost-connector/processes/connector/Channel.p.json b/mattermost-connector/processes/connector/Channel.p.json index fb31f95..bcf7827 100644 --- a/mattermost-connector/processes/connector/Channel.p.json +++ b/mattermost-connector/processes/connector/Channel.p.json @@ -1,5 +1,5 @@ { - "format" : "10.0.0", + "$schema" : "https://json-schema.axonivy.com/process/11.3.0/process.json", "id" : "18F9A02E199B10A5", "kind" : "CALLABLE_SUB", "config" : { @@ -10,10 +10,10 @@ "type" : "CallSubStart", "name" : "getChannelById(String)", "config" : { - "callSignature" : "getChannelById", + "signature" : "getChannelById", "input" : { "params" : [ - { "name" : "channelId", "type" : "String" } + { "name" : "channelId", "type" : "String", "desc" : "" } ], "map" : { "out.channelId" : "param.channelId" @@ -21,18 +21,22 @@ }, "result" : { "params" : [ - { "name" : "channel", "type" : "com.your.mattermost.url.client.Channel" } + { "name" : "channel", "type" : "com.your.mattermost.url.client.Channel", "desc" : "" } ], "map" : { "result.channel" : "in.channel" } - }, - "tags" : "connector" + } }, + "tags" : [ + "connector" + ], "visual" : { "at" : { "x" : 96, "y" : 64 } }, - "connect" : { "id" : "f4", "to" : "f3" } + "connect" : [ + { "id" : "f4", "to" : "f3" } + ] }, { "id" : "f1", "type" : "CallSubEnd", @@ -44,17 +48,21 @@ "type" : "RestClientCall", "name" : "Get channel by Id", "config" : { - "path" : "/api/v4/channels/{channel_id}", - "clientId" : "402ef8e2-8431-4198-b4c7-be6000e557c9", - "clientErrorCode" : "ivy:error:rest:client", - "statusErrorCode" : "ivy:error:rest:client", - "responseMapping" : { - "out.channel" : "result" - }, - "templateParams" : { - "channel_id" : "in.channelId" + "target" : { + "clientId" : "402ef8e2-8431-4198-b4c7-be6000e557c9", + "path" : "/api/v4/channels/{channel_id}", + "templateParams" : { + "channel_id" : "in.channelId" + } }, - "resultType" : "com.your.mattermost.url.client.Channel" + "response" : { + "entity" : { + "type" : "com.your.mattermost.url.client.Channel", + "map" : { + "out.channel" : "result" + } + } + } }, "visual" : { "at" : { "x" : 232, "y" : 64 } @@ -73,8 +81,12 @@ "visual" : { "at" : { "x" : 288, "y" : 98 } }, - "connect" : { "id" : "f6", "to" : "f1", "via" : [ { "x" : 368, "y" : 98 } ] } + "connect" : [ + { "id" : "f6", "to" : "f1", "via" : [ { "x" : 368, "y" : 98 } ] } + ] } ], - "connect" : { "id" : "f2", "to" : "f1" } + "connect" : [ + { "id" : "f2", "to" : "f1" } + ] } ] } \ No newline at end of file diff --git a/mattermost-connector/processes/connector/IncomingWebhook.p.json b/mattermost-connector/processes/connector/IncomingWebhook.p.json index 430dc6d..ec51e40 100644 --- a/mattermost-connector/processes/connector/IncomingWebhook.p.json +++ b/mattermost-connector/processes/connector/IncomingWebhook.p.json @@ -1,5 +1,5 @@ { - "format" : "10.0.0", + "$schema" : "https://json-schema.axonivy.com/process/11.3.0/process.json", "id" : "18F9924575E237AD", "kind" : "CALLABLE_SUB", "config" : { @@ -10,11 +10,11 @@ "type" : "CallSubStart", "name" : "getIncomingWebhookByTeamIdAndChannelId(String,String)", "config" : { - "callSignature" : "getIncomingWebhookByTeamIdAndChannelId", + "signature" : "getIncomingWebhookByTeamIdAndChannelId", "input" : { "params" : [ - { "name" : "teamId", "type" : "String" }, - { "name" : "channelId", "type" : "String" } + { "name" : "teamId", "type" : "String", "desc" : "" }, + { "name" : "channelId", "type" : "String", "desc" : "" } ], "map" : { "out.channelId" : "param.channelId", @@ -23,19 +23,23 @@ }, "result" : { "params" : [ - { "name" : "incomingWebhook", "type" : "com.your.mattermost.url.client.IncomingWebhook" } + { "name" : "incomingWebhook", "type" : "com.your.mattermost.url.client.IncomingWebhook", "desc" : "" } ], "map" : { "result.incomingWebhook" : "in.webhook" } - }, - "tags" : "connector" + } }, + "tags" : [ + "connector" + ], "visual" : { "at" : { "x" : 112, "y" : 64 }, "labelOffset" : { "x" : 73, "y" : 49 } }, - "connect" : { "id" : "f4", "to" : "f3" } + "connect" : [ + { "id" : "f4", "to" : "f3" } + ] }, { "id" : "f1", "type" : "CallSubEnd", @@ -47,29 +51,36 @@ "type" : "RestClientCall", "name" : "Get Incomming webhook by team Id", "config" : { - "path" : "/api/v4/hooks/incoming", - "clientId" : "402ef8e2-8431-4198-b4c7-be6000e557c9", - "clientErrorCode" : "ivy:error:rest:client", - "queryParams" : { - "page" : "", - "per_page" : "Integer.parseInt(ivy.var.mattermost_incomingWebhookPerPage)", - "team_id" : "in.teamId" + "target" : { + "clientId" : "402ef8e2-8431-4198-b4c7-be6000e557c9", + "path" : "/api/v4/hooks/incoming", + "templateParams" : { + "ivy.var.mattermost.baseUrl" : "" + }, + "queryParams" : { + "page" : "", + "per_page" : "Integer.parseInt(ivy.var.get(\"incomingWebhookPerPage\"))", + "team_id" : "in.teamId" + } }, - "statusErrorCode" : "ivy:error:rest:client", - "resultType" : "java.util.List", - "responseCode" : [ - "import com.your.mattermost.url.client.IncomingWebhook;", - "for (IncomingWebhook webhook: result) {", - " if (webhook.getChannelId().equals(in.channelId)) {", - " in.webhook = webhook;", - " break;", - " }", - "}" - ] + "response" : { + "entity" : { + "type" : "java.util.List", + "code" : [ + "import com.your.mattermost.url.client.IncomingWebhook;", + "for (IncomingWebhook webhook: result) {", + " if (webhook.getChannelId().equals(in.channelId)) {", + " in.webhook = webhook;", + " break;", + " }", + "}" + ] + } + } }, "visual" : { "at" : { "x" : 304, "y" : 64 }, - "size" : { "width" : 136, "height" : 60 } + "size" : { "width" : 136 } }, "boundaries" : [ { "id" : "f5", @@ -85,8 +96,12 @@ "visual" : { "at" : { "x" : 372, "y" : 98 } }, - "connect" : { "id" : "f6", "to" : "f1", "via" : [ { "x" : 480, "y" : 98 } ] } + "connect" : [ + { "id" : "f6", "to" : "f1", "via" : [ { "x" : 480, "y" : 98 } ] } + ] } ], - "connect" : { "id" : "f2", "to" : "f1" } + "connect" : [ + { "id" : "f2", "to" : "f1" } + ] } ] } \ No newline at end of file diff --git a/mattermost-connector/processes/connector/Team.p.json b/mattermost-connector/processes/connector/Team.p.json index 9d17cfa..efa975c 100644 --- a/mattermost-connector/processes/connector/Team.p.json +++ b/mattermost-connector/processes/connector/Team.p.json @@ -1,5 +1,5 @@ { - "format" : "10.0.0", + "$schema" : "https://json-schema.axonivy.com/process/11.3.0/process.json", "id" : "18F9AA4D04244482", "kind" : "CALLABLE_SUB", "config" : { @@ -10,10 +10,10 @@ "type" : "CallSubStart", "name" : "getTeamId(String)", "config" : { - "callSignature" : "getTeamId", + "signature" : "getTeamId", "input" : { "params" : [ - { "name" : "teamName", "type" : "String" } + { "name" : "teamName", "type" : "String", "desc" : "" } ], "map" : { "out.teamName" : "param.teamName" @@ -21,19 +21,23 @@ }, "result" : { "params" : [ - { "name" : "teamId", "type" : "String" } + { "name" : "teamId", "type" : "String", "desc" : "" } ], "map" : { "result.teamId" : "in.teamId" } - }, - "tags" : "connector" + } }, + "tags" : [ + "connector" + ], "visual" : { "at" : { "x" : 96, "y" : 64 }, "labelOffset" : { "x" : 17, "y" : 33 } }, - "connect" : { "id" : "f3", "to" : "f5" } + "connect" : [ + { "id" : "f3", "to" : "f5" } + ] }, { "id" : "f1", "type" : "CallSubEnd", @@ -45,17 +49,21 @@ "type" : "RestClientCall", "name" : "Get Team Id by name", "config" : { - "path" : "/api/v4/teams/name/{name}", - "clientId" : "402ef8e2-8431-4198-b4c7-be6000e557c9", - "clientErrorCode" : "ivy:error:rest:client", - "statusErrorCode" : "ivy:error:rest:client", - "responseMapping" : { - "out.teamId" : "result.id" - }, - "templateParams" : { - "name" : "in.teamName" + "target" : { + "clientId" : "402ef8e2-8431-4198-b4c7-be6000e557c9", + "path" : "/api/v4/teams/name/{name}", + "templateParams" : { + "name" : "in.teamName" + } }, - "resultType" : "com.your.mattermost.url.client.Team" + "response" : { + "entity" : { + "type" : "com.your.mattermost.url.client.Team", + "map" : { + "out.teamId" : "result.id" + } + } + } }, "visual" : { "at" : { "x" : 240, "y" : 63 }, @@ -75,8 +83,12 @@ "visual" : { "at" : { "x" : 304, "y" : 96 } }, - "connect" : { "id" : "f8", "to" : "f1", "via" : [ { "x" : 384, "y" : 96 } ] } + "connect" : [ + { "id" : "f8", "to" : "f1", "via" : [ { "x" : 384, "y" : 96 } ] } + ] } ], - "connect" : { "id" : "f2", "to" : "f1" } + "connect" : [ + { "id" : "f2", "to" : "f1" } + ] } ] } \ No newline at end of file diff --git a/pom.xml b/pom.xml index e007b78..3c19b8c 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ com.axonivy.connector.mattermost mattermost-connector mattermost-connector-modules - 10.0.20-SNAPSHOT + 11.0.0-SNAPSHOT pom