Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MARP-1632 IDP connector error handling #17

Merged
merged 3 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .settings/org.eclipse.core.resources.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8
9 changes: 9 additions & 0 deletions git.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager">
<output url="file://$MODULE_DIR$/bin" />
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
"type" : "ch.ivyteam.ivy.bpm.error.BpmError"
}, {
"name" : "sampleFile",
"type" : "com.axonivy.connector.idp.demo.SampleFile",
"modifiers" : [ "PERSISTENT" ]
"type" : "com.axonivy.connector.idp.demo.SampleFile"
} ]
}
53 changes: 29 additions & 24 deletions idp-connector-demo/pom.xml
Original file line number Diff line number Diff line change
@@ -1,26 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.axonivy.connector.idp</groupId>
<artifactId>idp-connector-demo</artifactId>
<version>12.0.3-SNAPSHOT</version>
<packaging>iar</packaging>
<dependencies>
<dependency>
<groupId>com.axonivy.connector.idp</groupId>
<artifactId>idp-connector</artifactId>
<version>${project.version}</version>
<type>iar</type>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.axonivy.ivy.ci</groupId>
<artifactId>project-build-plugin</artifactId>
<version>12.0.0</version>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.axonivy.connector.idp</groupId>
<artifactId>idp-connector-demo</artifactId>
<version>12.0.3-SNAPSHOT</version>
<packaging>iar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.axonivy.connector.idp</groupId>
<artifactId>idp-connector</artifactId>
<version>${project.version}</version>
<type>iar</type>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.axonivy.ivy.ci</groupId>
<artifactId>project-build-plugin</artifactId>
<version>12.0.0</version>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
</project>
113 changes: 32 additions & 81 deletions idp-connector-demo/processes/IDPDemo.p.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"id" : "f1",
"type" : "TaskEnd",
"visual" : {
"at" : { "x" : 1617, "y" : 312 }
"at" : { "x" : 1480, "y" : 416 }
}
}, {
"id" : "f11",
Expand All @@ -29,7 +29,7 @@
}
},
"visual" : {
"at" : { "x" : 1136, "y" : 312 }
"at" : { "x" : 944, "y" : 416 }
},
"connect" : [
{ "id" : "f24", "to" : "f23" }
Expand All @@ -56,7 +56,7 @@
"demo"
],
"visual" : {
"at" : { "x" : 304, "y" : 312 }
"at" : { "x" : 263, "y" : 416 }
},
"connect" : [
{ "id" : "f47", "to" : "f39" }
Expand All @@ -66,10 +66,11 @@
"type" : "DialogCall",
"name" : "File Selection",
"config" : {
"dialog" : "com.axonivy.connector.idp.connector.demo.FileSelection:start(com.axonivy.connector.idp.demo.Demo)",
"dialog" : "com.axonivy.connector.idp.connector.demo.FileSelection:start(com.axonivy.connector.idp.demo.Demo,String,com.fasterxml.jackson.databind.JsonNode,java.util.UUID)",
"call" : {
"map" : {
"param.demo" : "com.axonivy.connector.idp.demo.Demo.SPLITTING_DOCUMENT"
"param.demo" : "com.axonivy.connector.idp.demo.Demo.SPLITTING_DOCUMENT",
"param.workflowId" : "in.workflowId"
},
"code" : [
"// set taskname",
Expand All @@ -80,40 +81,13 @@
"output" : {
"map" : {
"out" : "in",
"out.file" : "result.file"
}
}
},
"visual" : {
"at" : { "x" : 440, "y" : 312 }
},
"connect" : [
{ "id" : "f45", "to" : "f44" }
]
}, {
"id" : "f44",
"type" : "SubProcessCall",
"name" : "Splitting file",
"config" : {
"processCall" : "ProcessingService:processing(String,java.io.File)",
"call" : {
"map" : {
"param.workfowId" : "in.workflowId",
"param.file" : "in.file"
"out.file" : "result.file",
"out.processingId" : "result.processingId"
}
},
"output" : {
"code" : [
"",
"ivy.log.debug(\"processingid={0}\", result.processingId.toString());",
"",
"out.processingId = result.#processingId;",
"out.error = result.#error;"
]
}
},
"visual" : {
"at" : { "x" : 616, "y" : 312 }
"at" : { "x" : 407, "y" : 416 }
},
"connect" : [
{ "id" : "f17", "to" : "f6" }
Expand All @@ -137,7 +111,7 @@
}
},
"visual" : {
"at" : { "x" : 792, "y" : 312 }
"at" : { "x" : 592, "y" : 416 }
},
"connect" : [
{ "id" : "f7", "to" : "f27" }
Expand All @@ -160,37 +134,11 @@
"demo"
],
"visual" : {
"at" : { "x" : 296, "y" : 592 }
"at" : { "x" : 263, "y" : 696 }
},
"connect" : [
{ "id" : "f16", "to" : "f10" }
]
}, {
"id" : "f14",
"type" : "SubProcessCall",
"name" : "Extract file",
"config" : {
"processCall" : "ProcessingService:processing(String,java.io.File)",
"call" : {
"map" : {
"param.workfowId" : "in.workflowId",
"param.file" : "in.file"
}
},
"output" : {
"code" : [
"out.processingId = result.processingId;",
"out.processingResultNode = result.processingResult;"
]
}
},
"visual" : {
"at" : { "x" : 616, "y" : 592 },
"size" : { "width" : 120 }
},
"connect" : [
{ "id" : "f32", "to" : "f33" }
]
}, {
"id" : "f19",
"type" : "DialogCall",
Expand All @@ -212,7 +160,7 @@
}
},
"visual" : {
"at" : { "x" : 1136, "y" : 591 },
"at" : { "x" : 951, "y" : 696 },
"size" : { "width" : 124, "height" : 63 }
},
"connect" : [
Expand All @@ -222,7 +170,7 @@
"id" : "f20",
"type" : "TaskEnd",
"visual" : {
"at" : { "x" : 1617, "y" : 592 }
"at" : { "x" : 1479, "y" : 696 }
}
}, {
"id" : "f33",
Expand All @@ -246,7 +194,7 @@
}
},
"visual" : {
"at" : { "x" : 792, "y" : 592 }
"at" : { "x" : 584, "y" : 696 }
},
"connect" : [
{ "id" : "f26", "to" : "f9" }
Expand All @@ -273,7 +221,7 @@
}
},
"visual" : {
"at" : { "x" : 975, "y" : 591 },
"at" : { "x" : 758, "y" : 696 },
"size" : { "width" : 127, "height" : 63 }
},
"connect" : [
Expand All @@ -284,10 +232,11 @@
"type" : "DialogCall",
"name" : "File Selection",
"config" : {
"dialog" : "com.axonivy.connector.idp.connector.demo.FileSelection:start(com.axonivy.connector.idp.demo.Demo)",
"dialog" : "com.axonivy.connector.idp.connector.demo.FileSelection:start(com.axonivy.connector.idp.demo.Demo,String,com.fasterxml.jackson.databind.JsonNode,java.util.UUID)",
"call" : {
"map" : {
"param.demo" : "com.axonivy.connector.idp.demo.Demo.EXTRACTION"
"param.demo" : "com.axonivy.connector.idp.demo.Demo.EXTRACTION",
"param.workflowId" : "in.workflowId"
},
"code" : [
"// set taskname",
Expand All @@ -299,15 +248,17 @@
"map" : {
"out" : "in",
"out.file" : "result.file",
"out.processingId" : "result.processingId",
"out.processingResultNode" : "result.processingResultNode",
quanpham-axonivy marked this conversation as resolved.
Show resolved Hide resolved
"out.sampleFile" : "result.selectedFile"
}
}
},
"visual" : {
"at" : { "x" : 440, "y" : 592 }
"at" : { "x" : 408, "y" : 696 }
},
"connect" : [
{ "id" : "f30", "to" : "f14" }
{ "id" : "f14", "to" : "f33" }
]
}, {
"id" : "f34",
Expand All @@ -325,7 +276,7 @@
"demo"
],
"visual" : {
"at" : { "x" : 296, "y" : 864 }
"at" : { "x" : 263, "y" : 968 }
},
"connect" : [
{ "id" : "f38", "to" : "f36" }
Expand All @@ -334,7 +285,7 @@
"id" : "f35",
"type" : "TaskEnd",
"visual" : {
"at" : { "x" : 760, "y" : 864 }
"at" : { "x" : 727, "y" : 968 }
}
}, {
"id" : "f36",
Expand Down Expand Up @@ -363,7 +314,7 @@
}
},
"visual" : {
"at" : { "x" : 440, "y" : 864 }
"at" : { "x" : 407, "y" : 968 }
},
"connect" : [
{ "id" : "f42", "to" : "f40" }
Expand All @@ -385,7 +336,7 @@
}
},
"visual" : {
"at" : { "x" : 616, "y" : 864 }
"at" : { "x" : 583, "y" : 968 }
},
"connect" : [
{ "id" : "f37", "to" : "f35" }
Expand Down Expand Up @@ -413,7 +364,7 @@
}
},
"visual" : {
"at" : { "x" : 975, "y" : 312 },
"at" : { "x" : 759, "y" : 416 },
"size" : { "width" : 127, "height" : 63 }
},
"connect" : [
Expand All @@ -427,7 +378,7 @@
"or your custom workflow(UUID format)"
],
"visual" : {
"at" : { "x" : 456, "y" : 463 },
"at" : { "x" : 407, "y" : 567 },
"size" : { "width" : 378, "height" : 51 }
},
"connect" : [
Expand All @@ -454,7 +405,7 @@
}
},
"visual" : {
"at" : { "x" : 1496, "y" : 311 },
"at" : { "x" : 1303, "y" : 416 },
"size" : { "width" : 127, "height" : 63 }
},
"connect" : [
Expand All @@ -480,7 +431,7 @@
}
},
"visual" : {
"at" : { "x" : 1496, "y" : 591 },
"at" : { "x" : 1302, "y" : 696 },
"size" : { "width" : 127, "height" : 63 }
},
"connect" : [
Expand All @@ -507,7 +458,7 @@
}
},
"visual" : {
"at" : { "x" : 1328, "y" : 312 },
"at" : { "x" : 1120, "y" : 416 },
"size" : { "width" : 120 }
},
"connect" : [
Expand All @@ -534,7 +485,7 @@
}
},
"visual" : {
"at" : { "x" : 1336, "y" : 592 },
"at" : { "x" : 1119, "y" : 696 },
"size" : { "width" : 120 }
},
"connect" : [
Expand Down
Loading
Loading