diff --git a/.project b/.project new file mode 100644 index 00000000..1d5e5ac9 --- /dev/null +++ b/.project @@ -0,0 +1,17 @@ + + + process-analyzer-modules + + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.m2e.core.maven2Nature + + diff --git a/.settings/org.eclipse.m2e.core.prefs b/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 00000000..14b697b7 --- /dev/null +++ b/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/MY-PRODUCT-NAME-product/README.md b/MY-PRODUCT-NAME-product/README.md deleted file mode 100644 index ee9062a5..00000000 --- a/MY-PRODUCT-NAME-product/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# MY-PRODUCT-NAME - -YOUR DESCRIPTION GOES HERE - -## Demo - -YOUR DEMO DESCRIPTION GOES HERE - -## Setup - -YOUR SETUP DESCRIPTION GOES HERE - -``` -@variables.yaml@ -``` \ No newline at end of file diff --git a/MY-PRODUCT-NAME-product/pom.xml b/MY-PRODUCT-NAME-product/pom.xml deleted file mode 100644 index dd590118..00000000 --- a/MY-PRODUCT-NAME-product/pom.xml +++ /dev/null @@ -1,67 +0,0 @@ - - 4.0.0 - com.axonivy.market - MY-PRODUCT-NAME-product - 10.0.0-SNAPSHOT - pom - - - ../MY-PRODUCT-NAME/config/variables.yaml - - - - - - org.apache.maven.plugins - maven-assembly-plugin - 3.3.0 - - - package - - single - - - false - - zip.xml - - - - - - - maven-antrun-plugin - 1.7 - - - generate-sources - - ${skip-readme} - - - - - - - - - - - run - - - - - - - - - org.apache.maven.plugins - maven-deploy-plugin - 3.0.0-M1 - - - - - diff --git a/README.md b/README.md index 0f94020d..b87f8330 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,15 @@ -# MY-PRODUCT-NAME +# Advanced Process Analyzer -[![CI Build](https://github.com/axonivy-market/REPO-NAME/actions/workflows/ci.yml/badge.svg)](https://github.com/axonivy-market/REPO-NAME/actions/workflows/ci.yml) +[![CI Build](https://github.com/axonivy-professional-services/market-process-analyzer/actions/workflows/ci.yml/badge.svg)](https://github.com/axonivy-professional-services/market-process-analyzer/actions/workflows/ci.yml) -"YOUR SHORT DESCRIPTION GOES HERE" +- Configure needed information directly in the process model + - Default duration of a task for multiple use cases. Each task can have multiple named default durations. + - Different “happy path” flows. It’s possible to set multiple named process paths. +- Possibilities to override settings of the process model + - Override duration + - Override default path for the gateways +- Create a list of all tasks in the process. +- Get configured duration for a task. +- Get all upcoming tasks on a configured process path with expected start timestamp for each task. -Read our [documentation](MY-PRODUCT-NAME-product/README.md). +Read our [documentation](process-analyzer-product/README.md). diff --git a/pom.xml b/pom.xml index 517336be..86c0cfda 100644 --- a/pom.xml +++ b/pom.xml @@ -1,9 +1,9 @@ 4.0.0 - com.axonivy.market - my-product - my-product-modules - 10.0.0-SNAPSHOT + com.axonivy.utils.process.analyzer + process-analyzer + process-analyzer-modules + 11.2.1-SNAPSHOT pom @@ -14,7 +14,7 @@ - scm:git:https://github.com/axonivy-market/${project.name}.git + scm:git:https://github.com/axonivy-professional-services/market-${project.name}.git HEAD diff --git a/process-analyzer-demo/.classpath b/process-analyzer-demo/.classpath new file mode 100644 index 00000000..3d85544f --- /dev/null +++ b/process-analyzer-demo/.classpath @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/process-analyzer-demo/.gitignore b/process-analyzer-demo/.gitignore new file mode 100644 index 00000000..9b0d458b --- /dev/null +++ b/process-analyzer-demo/.gitignore @@ -0,0 +1,19 @@ +# general +Thumbs.db +.DS_Store +*~ +*.log + +# java +*.class +hs_err_pid* + +# maven +target/ +lib/mvn-deps/ + +# ivy +classes/ +src_dataClasses/ +src_wsproc/ +logs/ diff --git a/process-analyzer-demo/.project b/process-analyzer-demo/.project new file mode 100644 index 00000000..2f02baed --- /dev/null +++ b/process-analyzer-demo/.project @@ -0,0 +1,60 @@ + + + process-analyzer-demo + + + + + + ch.ivyteam.ivy.designer.dataClasses.ui.ivyDataClassBuilder + + + + + ch.ivyteam.ivy.designer.process.ui.ivyWebServiceProcessClassBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + ch.ivyteam.ivy.designer.ide.ivyModelValidationBuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + ch.ivyteam.ivy.project.IvyProjectNature + org.eclipse.wst.common.modulecore.ModuleCoreNature + org.eclipse.jem.workbench.JavaEMFNature + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + org.eclipse.jem.beaninfo.BeanInfoNature + org.eclipse.wst.common.project.facet.core.nature + org.eclipse.wst.jsdt.core.jsNature + org.eclipse.pde.PluginNature + + diff --git a/process-analyzer-demo/.settings/.jsdtscope b/process-analyzer-demo/.settings/.jsdtscope new file mode 100644 index 00000000..869c01da --- /dev/null +++ b/process-analyzer-demo/.settings/.jsdtscope @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/process-analyzer-demo/.settings/ch.ivyteam.ivy.designer.prefs b/process-analyzer-demo/.settings/ch.ivyteam.ivy.designer.prefs new file mode 100644 index 00000000..241f480d --- /dev/null +++ b/process-analyzer-demo/.settings/ch.ivyteam.ivy.designer.prefs @@ -0,0 +1,5 @@ +ch.ivyteam.ivy.designer.preferences.DataClassPreferencePage\:DEFAULT_DATA_CLASS=com.axonivy.utils.estimator.demo.Data +ch.ivyteam.ivy.designer.preferences.DataClassPreferencePage\:DEFAULT_NAMESPACE=com.axonivy.utils.estimator.demo +ch.ivyteam.ivy.project.preferences\:PRIMEFACES_VERSION=11 +ch.ivyteam.ivy.project.preferences\:PROJECT_VERSION=112000 +eclipse.preferences.version=1 diff --git a/process-analyzer-demo/.settings/org.eclipse.jdt.core.prefs b/process-analyzer-demo/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..d4540a53 --- /dev/null +++ b/process-analyzer-demo/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +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.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 diff --git a/process-analyzer-demo/.settings/org.eclipse.wst.common.component b/process-analyzer-demo/.settings/org.eclipse.wst.common.component new file mode 100644 index 00000000..8bb5f853 --- /dev/null +++ b/process-analyzer-demo/.settings/org.eclipse.wst.common.component @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/process-analyzer-demo/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml b/process-analyzer-demo/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml new file mode 100644 index 00000000..9b4b9fcf --- /dev/null +++ b/process-analyzer-demo/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/process-analyzer-demo/.settings/org.eclipse.wst.common.project.facet.core.xml b/process-analyzer-demo/.settings/org.eclipse.wst.common.project.facet.core.xml new file mode 100644 index 00000000..156ecdbe --- /dev/null +++ b/process-analyzer-demo/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/process-analyzer-demo/.settings/org.eclipse.wst.css.core.prefs b/process-analyzer-demo/.settings/org.eclipse.wst.css.core.prefs new file mode 100644 index 00000000..5ddc6bd5 --- /dev/null +++ b/process-analyzer-demo/.settings/org.eclipse.wst.css.core.prefs @@ -0,0 +1,2 @@ +css-profile/=org.eclipse.wst.css.core.cssprofile.css3 +eclipse.preferences.version=1 diff --git a/process-analyzer-demo/.settings/org.eclipse.wst.jsdt.ui.superType.container b/process-analyzer-demo/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 00000000..3bd5d0a4 --- /dev/null +++ b/process-analyzer-demo/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/process-analyzer-demo/.settings/org.eclipse.wst.jsdt.ui.superType.name b/process-analyzer-demo/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 00000000..05bd71b6 --- /dev/null +++ b/process-analyzer-demo/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/process-analyzer-demo/META-INF/MANIFEST.MF b/process-analyzer-demo/META-INF/MANIFEST.MF new file mode 100644 index 00000000..18b1de35 --- /dev/null +++ b/process-analyzer-demo/META-INF/MANIFEST.MF @@ -0,0 +1,11 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: workflow-estimator-demo +Bundle-SymbolicName: process-analyzer-demo +Bundle-Version: 1.0.0.qualifier +Bundle-RequiredExecutionEnvironment: JavaSE-17 +Automatic-Module-Name: workflow.estimator.demo +Export-Package: com.axonivy.utils.process.analyzer.demo, + com.axonivy.utils.process.analyzer.demo.constant, + com.axonivy.utils.process.analyzer.demo.model +Require-Bundle: ch.ivyteam.ivy.process.rdm;bundle-version="11.2.1" diff --git a/process-analyzer-demo/build.properties b/process-analyzer-demo/build.properties new file mode 100644 index 00000000..8dc25c4f --- /dev/null +++ b/process-analyzer-demo/build.properties @@ -0,0 +1,5 @@ +source.. = src/,\ + src_wsproc/,\ + src_dataClasses/ +bin.includes = META-INF/,\ + . diff --git a/process-analyzer-demo/config/custom-fields.yaml b/process-analyzer-demo/config/custom-fields.yaml new file mode 100644 index 00000000..bb20b708 --- /dev/null +++ b/process-analyzer-demo/config/custom-fields.yaml @@ -0,0 +1,22 @@ +# yaml-language-server: $schema=https://json-schema.axonivy.com/app/0.0.1/custom-fields.json +# +# == Custom Fields Information == +# +# You can define here your project custom fields. +# Have a look at our documentation for more information. +# +CustomFields: +# Tasks: +# MyTaskCustomField: +# Label: My task custom field +# Description: This new task custom field can be used to ... +# Type: STRING +# Cases: +# MyCaseCustomField: +# Label: My case custom field +# Description: This new case custom field can be used to ... +# Type: STRING +# Starts: +# MyStartCustomField: +# Label: My start custom field +# Description: This new start custom field can be used to ... diff --git a/process-analyzer-demo/config/databases.yaml b/process-analyzer-demo/config/databases.yaml new file mode 100644 index 00000000..10319e2e --- /dev/null +++ b/process-analyzer-demo/config/databases.yaml @@ -0,0 +1,2 @@ +# yaml-language-server: $schema=https://json-schema.axonivy.com/app/0.0.1/databases.json +Databases: diff --git a/process-analyzer-demo/config/overrides.any b/process-analyzer-demo/config/overrides.any new file mode 100644 index 00000000..f59ec20a --- /dev/null +++ b/process-analyzer-demo/config/overrides.any @@ -0,0 +1 @@ +* \ No newline at end of file diff --git a/process-analyzer-demo/config/persistence.xml b/process-analyzer-demo/config/persistence.xml new file mode 100644 index 00000000..d6b96d79 --- /dev/null +++ b/process-analyzer-demo/config/persistence.xml @@ -0,0 +1,2 @@ + + diff --git a/process-analyzer-demo/config/rest-clients.yaml b/process-analyzer-demo/config/rest-clients.yaml new file mode 100644 index 00000000..4bffaca0 --- /dev/null +++ b/process-analyzer-demo/config/rest-clients.yaml @@ -0,0 +1,2 @@ +# yaml-language-server: $schema=https://json-schema.axonivy.com/app/0.0.1/rest-clients.json +RestClients: diff --git a/process-analyzer-demo/config/roles.xml b/process-analyzer-demo/config/roles.xml new file mode 100644 index 00000000..59892fed --- /dev/null +++ b/process-analyzer-demo/config/roles.xml @@ -0,0 +1,4 @@ + + + Everybody + diff --git a/process-analyzer-demo/config/users.xml b/process-analyzer-demo/config/users.xml new file mode 100644 index 00000000..51a69066 --- /dev/null +++ b/process-analyzer-demo/config/users.xml @@ -0,0 +1,2 @@ + + diff --git a/process-analyzer-demo/config/variables.yaml b/process-analyzer-demo/config/variables.yaml new file mode 100644 index 00000000..fd144582 --- /dev/null +++ b/process-analyzer-demo/config/variables.yaml @@ -0,0 +1,6 @@ +# == Variables == +# +# You can define here your project Variables. +# +Variables: +# myVariable: value diff --git a/process-analyzer-demo/config/webservice-clients.yaml b/process-analyzer-demo/config/webservice-clients.yaml new file mode 100644 index 00000000..688047a7 --- /dev/null +++ b/process-analyzer-demo/config/webservice-clients.yaml @@ -0,0 +1,2 @@ +# yaml-language-server: $schema=https://json-schema.axonivy.com/app/0.0.1/webservice-clients.json +WebServiceClients: diff --git a/process-analyzer-demo/dataclasses/com/axonivy/utils/estimator/demo/FlowDemoSubProcessCallData.ivyClass b/process-analyzer-demo/dataclasses/com/axonivy/utils/estimator/demo/FlowDemoSubProcessCallData.ivyClass new file mode 100644 index 00000000..705fe4ed --- /dev/null +++ b/process-analyzer-demo/dataclasses/com/axonivy/utils/estimator/demo/FlowDemoSubProcessCallData.ivyClass @@ -0,0 +1,2 @@ +FlowDemoSubProcessCallData #class +com.axonivy.utils.estimator.demo #namespace diff --git a/process-analyzer-demo/dataclasses/com/axonivy/utils/process/analyzer/demo/Data.ivyClass b/process-analyzer-demo/dataclasses/com/axonivy/utils/process/analyzer/demo/Data.ivyClass new file mode 100644 index 00000000..39153bef --- /dev/null +++ b/process-analyzer-demo/dataclasses/com/axonivy/utils/process/analyzer/demo/Data.ivyClass @@ -0,0 +1,2 @@ +Data #class +com.axonivy.utils.process.analyzer.demo #namespace diff --git a/process-analyzer-demo/dataclasses/com/axonivy/utils/process/analyzer/demo/DemoData.ivyClass b/process-analyzer-demo/dataclasses/com/axonivy/utils/process/analyzer/demo/DemoData.ivyClass new file mode 100644 index 00000000..f5cb0479 --- /dev/null +++ b/process-analyzer-demo/dataclasses/com/axonivy/utils/process/analyzer/demo/DemoData.ivyClass @@ -0,0 +1,4 @@ +DemoData #class +com.axonivy.utils.process.analyzer.demo #namespace +bean com.axonivy.utils.process.analyzer.demo.ProcessAnalyzerBean #field +bean PERSISTENT #fieldModifier diff --git a/process-analyzer-demo/pom.xml b/process-analyzer-demo/pom.xml new file mode 100644 index 00000000..3c96ea32 --- /dev/null +++ b/process-analyzer-demo/pom.xml @@ -0,0 +1,28 @@ + + + 4.0.0 + com.axonivy.utils.process.analyzer.demo + process-analyzer-demo + 11.2.1-SNAPSHOT + iar + + 11.2.0 + + + + com.axonivy.utils.process.analyzer + process-analyzer + ${project.version} + + + + + + com.axonivy.ivy.ci + project-build-plugin + ${build.plugin.version} + true + + + + diff --git a/process-analyzer-demo/processes/Analysis Processes/FlowDemoBasic.p.json b/process-analyzer-demo/processes/Analysis Processes/FlowDemoBasic.p.json new file mode 100644 index 00000000..63b84874 --- /dev/null +++ b/process-analyzer-demo/processes/Analysis Processes/FlowDemoBasic.p.json @@ -0,0 +1,373 @@ +{ + "$schema" : "https://json-schema.axonivy.com/process/11.2.2/process.json", + "id" : "18E180A64355D4D9", + "config" : { + "data" : "com.axonivy.utils.process.analyzer.demo.Data", + "permissions" : { + "view" : { + "allowed" : false + } + } + }, + "elements" : [ { + "id" : "f0", + "type" : "RequestStart", + "name" : "Start", + "config" : { + "signature" : "start" + }, + "visual" : { + "at" : { "x" : 224, "y" : 64 } + }, + "connect" : [ + { "id" : "f3", "to" : "f2" } + ] + }, { + "id" : "f1", + "type" : "TaskEnd", + "visual" : { + "at" : { "x" : 1224, "y" : 64 } + } + }, { + "id" : "f2", + "type" : "UserTask", + "name" : "Task A", + "config" : { + "dialog" : "com.axonivy.utils.process.analyzer.demo.Dummy:start()", + "task" : { + "name" : "Task A", + "code" : [ + "import com.axonivy.utils.process.analyzer.demo.constant.UseCase;", + "import com.axonivy.utils.process.analyzer.APAConfig;", + "import java.util.concurrent.TimeUnit;", + "", + "APAConfig.setEstimate(5,TimeUnit.HOURS,UseCase.BIGPROJECT);", + "APAConfig.setEstimate(3,TimeUnit.HOURS,UseCase.SMALLPROJECT);" + ] + } + }, + "visual" : { + "at" : { "x" : 336, "y" : 64 } + }, + "connect" : [ + { "id" : "f5", "to" : "f4" } + ] + }, { + "id" : "f4", + "type" : "Alternative", + "name" : "alter1", + "config" : { + "conditions" : { + "f13" : "true" + } + }, + "visual" : { + "at" : { "x" : 440, "y" : 64 }, + "labelOffset" : { "x" : 16, "y" : -16 } + }, + "connect" : [ + { "id" : "f13", "to" : "f12", "label" : { + "name" : [ + "{internal}", + "{external}", + "{mixed}" + ] + } }, + { "id" : "f15", "to" : "f7", "color" : "default path" } + ] + }, { + "id" : "f6", + "type" : "Alternative", + "name" : "alter2", + "visual" : { + "at" : { "x" : 720, "y" : 64 }, + "labelOffset" : { "x" : 16, "y" : -16 } + }, + "connect" : [ + { "id" : "f9", "to" : "f8" } + ] + }, { + "id" : "f8", + "type" : "Alternative", + "name" : "alter3", + "visual" : { + "at" : { "x" : 864, "y" : 64 }, + "labelOffset" : { "x" : 16, "y" : -16 } + }, + "connect" : [ + { "id" : "f10", "to" : "f37" } + ] + }, { + "id" : "f11", + "type" : "UserTask", + "name" : "Task C", + "config" : { + "dialog" : "com.axonivy.utils.process.analyzer.demo.Dummy:start()", + "task" : { + "name" : "Task C", + "code" : [ + "import com.axonivy.utils.process.analyzer.demo.constant.UseCase;", + "import com.axonivy.utils.process.analyzer.APAConfig;", + "import java.util.concurrent.TimeUnit;", + "", + "APAConfig.setEstimate(8,TimeUnit.HOURS,UseCase.BIGPROJECT);", + "APAConfig.setEstimate(4,TimeUnit.HOURS,UseCase.SMALLPROJECT);" + ] + } + }, + "visual" : { + "at" : { "x" : 592, "y" : 192 } + }, + "connect" : [ + { "id" : "f19", "to" : "f6", "via" : [ { "x" : 720, "y" : 192 } ] } + ] + }, { + "id" : "f12", + "type" : "Alternative", + "name" : "int/ext?", + "config" : { + "conditions" : { + "f14" : "true" + } + }, + "visual" : { + "at" : { "x" : 440, "y" : 192 }, + "labelOffset" : { "x" : -32, "y" : -8 } + }, + "connect" : [ + { "id" : "f14", "to" : "f11", "label" : { + "name" : "{internal}", + "offset" : { "x" : -7, "y" : -2 } + } }, + { "id" : "f21", "to" : "f20", "color" : "default path", "label" : { + "name" : "{external}" + } } + ] + }, { + "id" : "f7", + "type" : "UserTask", + "name" : "Task B", + "config" : { + "dialog" : "com.axonivy.utils.process.analyzer.demo.Dummy:start()", + "task" : { + "name" : "Task B", + "code" : [ + "import com.axonivy.utils.process.analyzer.demo.constant.UseCase;", + "import com.axonivy.utils.process.analyzer.APAConfig;", + "import java.util.concurrent.TimeUnit;", + "", + "APAConfig.setEstimate(3,TimeUnit.HOURS,UseCase.BIGPROJECT);", + "APAConfig.setEstimate(1,TimeUnit.HOURS,UseCase.SMALLPROJECT);" + ] + } + }, + "visual" : { + "at" : { "x" : 584, "y" : 64 } + }, + "connect" : [ + { "id" : "f16", "to" : "f6" } + ] + }, { + "id" : "f17", + "type" : "RequestStart", + "name" : "NewStart", + "config" : { + "signature" : "start2" + }, + "visual" : { + "at" : { "x" : 232, "y" : 192 } + }, + "connect" : [ + { "id" : "f18", "to" : "f12" } + ] + }, { + "id" : "f20", + "type" : "UserTask", + "name" : "Task D", + "config" : { + "dialog" : "com.axonivy.utils.process.analyzer.demo.Dummy:start()", + "task" : { + "name" : "Task D", + "code" : [ + "import java.util.concurrent.TimeUnit;", + "import com.axonivy.utils.process.analyzer.demo.constant.UseCase;", + "import com.axonivy.utils.process.analyzer.APAConfig;", + "", + "APAConfig.setEstimate(9,TimeUnit.HOURS,UseCase.BIGPROJECT);" + ] + } + }, + "visual" : { + "at" : { "x" : 440, "y" : 376 } + }, + "connect" : [ + { "id" : "f26", "to" : "f22", "var" : "in1" } + ] + }, { + "id" : "f22", + "type" : "TaskSwitchGateway", + "name" : "Task1", + "config" : { + "tasks" : [ { + "id" : "TaskA", + "name" : "Task1A", + "code" : [ + "import java.util.concurrent.TimeUnit;", + "import com.axonivy.utils.process.analyzer.demo.constant.UseCase;", + "import com.axonivy.utils.process.analyzer.APAConfig;", + "", + "APAConfig.setEstimate(1,TimeUnit.HOURS,UseCase.BIGPROJECT);" + ] + }, { + "id" : "TaskB", + "name" : "Task1B", + "code" : [ + "import java.util.concurrent.TimeUnit;", + "import com.axonivy.utils.process.analyzer.demo.constant.UseCase;", + "import com.axonivy.utils.process.analyzer.APAConfig;", + "", + "APAConfig.setEstimate(2,TimeUnit.HOURS,UseCase.BIGPROJECT);" + ] + } ] + }, + "visual" : { + "at" : { "x" : 560, "y" : 376 }, + "labelOffset" : { "x" : -16, "y" : -16 } + }, + "connect" : [ + { "id" : "f27", "to" : "f23", "via" : [ { "x" : 560, "y" : 320 } ], "condition" : "ivp==\"TaskA.ivp\"" }, + { "id" : "f28", "to" : "f24", "via" : [ { "x" : 560, "y" : 432 } ], "condition" : "ivp==\"TaskB.ivp\"" } + ] + }, { + "id" : "f23", + "type" : "UserTask", + "name" : "Task K", + "config" : { + "dialog" : "com.axonivy.utils.process.analyzer.demo.Dummy:start()", + "task" : { + "name" : "Task K", + "code" : [ + "import java.util.concurrent.TimeUnit;", + "import com.axonivy.utils.process.analyzer.demo.constant.UseCase;", + "import com.axonivy.utils.process.analyzer.APAConfig;", + "", + "APAConfig.setEstimate(6,TimeUnit.HOURS,UseCase.BIGPROJECT);" + ] + } + }, + "visual" : { + "at" : { "x" : 656, "y" : 320 } + }, + "connect" : [ + { "id" : "f29", "to" : "f25", "via" : [ { "x" : 752, "y" : 320 } ], "var" : "in1" } + ] + }, { + "id" : "f24", + "type" : "UserTask", + "name" : "Task G", + "config" : { + "dialog" : "com.axonivy.utils.process.analyzer.demo.Dummy:start()", + "task" : { + "name" : "Task G", + "code" : [ + "import java.util.concurrent.TimeUnit;", + "import com.axonivy.utils.process.analyzer.demo.constant.UseCase;", + "import com.axonivy.utils.process.analyzer.APAConfig;", + "", + "APAConfig.setEstimate(2,TimeUnit.HOURS,UseCase.BIGPROJECT);" + ] + } + }, + "visual" : { + "at" : { "x" : 656, "y" : 432 } + }, + "connect" : [ + { "id" : "f30", "to" : "f25", "via" : [ { "x" : 752, "y" : 432 } ], "var" : "in2" } + ] + }, { + "id" : "f25", + "type" : "TaskSwitchGateway", + "name" : "Join", + "config" : { + "tasks" : [ { + "id" : "TaskA", + "responsible" : { + "activator" : "SYSTEM" + } + } ] + }, + "visual" : { + "at" : { "x" : 752, "y" : 368 }, + "labelOffset" : { "x" : -16, "y" : 8 } + }, + "connect" : [ + { "id" : "f32", "to" : "f35", "condition" : "ivp==\"TaskA.ivp\"" } + ] + }, { + "id" : "f31", + "type" : "Alternative", + "name" : "alter4", + "config" : { + "conditions" : { + "f34" : "true", + "f33" : "" + } + }, + "visual" : { + "at" : { "x" : 864, "y" : 248 }, + "labelOffset" : { "x" : 48, "y" : 8 } + }, + "connect" : [ + { "id" : "f33", "to" : "f8", "color" : "default path" }, + { "id" : "f34", "to" : "f12", "via" : [ { "x" : 472, "y" : 248 } ] } + ] + }, { + "id" : "f35", + "type" : "UserTask", + "name" : "Task F", + "config" : { + "dialog" : "com.axonivy.utils.process.analyzer.demo.Dummy:start()", + "task" : { + "name" : "Task F" + } + }, + "visual" : { + "at" : { "x" : 864, "y" : 368 } + }, + "connect" : [ + { "id" : "f36", "to" : "f31" } + ] + }, { + "id" : "f37", + "type" : "SubProcessCall", + "name" : "FlowDemoSubProcessCall", + "config" : { + "processCall" : "Analysis Processes/FlowDemoSubProcessCall:call()", + "call" : { + "map" : { }, + "code" : [ + "import com.axonivy.utils.process.analyzer.demo.constant.UseCase;", + "import java.util.concurrent.TimeUnit;", + "import com.axonivy.utils.process.analyzer.APAConfig;", + "", + "APAConfig.handleAsTask();", + "APAConfig.setTaskName(\"Task sub\");", + "APAConfig.setCustomInfo(\"Custom info\");", + "APAConfig.setEstimate(5,TimeUnit.HOURS,UseCase.BIGPROJECT);" + ] + } + }, + "visual" : { + "at" : { "x" : 1048, "y" : 64 }, + "size" : { "width" : 176, "height" : 52 } + }, + "connect" : [ + { "id" : "f38", "to" : "f1" } + ] + } ], + "layout" : { + "colors" : { + "default path" : "#1af929" + } + } +} \ No newline at end of file diff --git a/process-analyzer-demo/processes/Analysis Processes/FlowDemoSubProcessCall.p.json b/process-analyzer-demo/processes/Analysis Processes/FlowDemoSubProcessCall.p.json new file mode 100644 index 00000000..f2385237 --- /dev/null +++ b/process-analyzer-demo/processes/Analysis Processes/FlowDemoSubProcessCall.p.json @@ -0,0 +1,53 @@ +{ + "$schema" : "https://json-schema.axonivy.com/process/11.2.2/process.json", + "id" : "18EEB6E309329524", + "kind" : "CALLABLE_SUB", + "config" : { + "data" : "com.axonivy.utils.estimator.demo.FlowDemoSubProcessCallData" + }, + "elements" : [ { + "id" : "f0", + "type" : "CallSubStart", + "name" : "call()", + "config" : { + "signature" : "call" + }, + "visual" : { + "at" : { "x" : 96, "y" : 64 } + }, + "connect" : [ + { "id" : "f2", "to" : "f3" } + ] + }, { + "id" : "f1", + "type" : "CallSubEnd", + "visual" : { + "at" : { "x" : 536, "y" : 64 } + } + }, { + "id" : "f3", + "type" : "UserTask", + "name" : "TaskA", + "config" : { + "dialog" : "com.axonivy.utils.process.analyzer.demo.Dummy:start()", + "task" : { + "name" : "TaskA", + "code" : [ + "import java.util.concurrent.TimeUnit;", + "import com.axonivy.utils.process.analyzer.demo.constant.UseCase;", + "import com.axonivy.utils.process.analyzer.APAConfig;", + "", + "", + "APAConfig.setCustomInfo(\"Custom info A\");", + "APAConfig.setEstimate(5,TimeUnit.HOURS,UseCase.BIGPROJECT);" + ] + } + }, + "visual" : { + "at" : { "x" : 312, "y" : 64 } + }, + "connect" : [ + { "id" : "f4", "to" : "f1" } + ] + } ] +} \ No newline at end of file diff --git a/process-analyzer-demo/processes/Analysis Processes/FlowParallelInOrder.p.json b/process-analyzer-demo/processes/Analysis Processes/FlowParallelInOrder.p.json new file mode 100644 index 00000000..eff6b97b --- /dev/null +++ b/process-analyzer-demo/processes/Analysis Processes/FlowParallelInOrder.p.json @@ -0,0 +1,404 @@ +{ + "$schema" : "https://json-schema.axonivy.com/process/11.2.2/process.json", + "id" : "18E3BEFFB97FCA4D", + "config" : { + "data" : "com.axonivy.utils.process.analyzer.demo.Data" + }, + "elements" : [ { + "id" : "f39", + "type" : "RequestStart", + "name" : "start", + "config" : { + "signature" : "start" + }, + "visual" : { + "at" : { "x" : 32, "y" : 176 } + }, + "connect" : [ + { "id" : "f41", "to" : "f40", "var" : "in1" } + ] + }, { + "id" : "f40", + "type" : "TaskSwitchGateway", + "name" : "Task 1", + "config" : { + "tasks" : [ { + "id" : "TaskA", + "name" : "Task1A", + "code" : [ + "import com.axonivy.utils.process.analyzer.demo.constant.UseCase;", + "import com.axonivy.utils.process.analyzer.APAConfig;", + "import java.util.concurrent.TimeUnit;", + "", + "APAConfig.setEstimate(1,TimeUnit.HOURS,UseCase.BIGPROJECT);", + "APAConfig.setEstimate(1,TimeUnit.HOURS,UseCase.SMALLPROJECT);" + ] + }, { + "id" : "TaskB", + "name" : "Task1B", + "code" : [ + "import com.axonivy.utils.process.analyzer.demo.constant.UseCase;", + "import com.axonivy.utils.process.analyzer.APAConfig;", + "import java.util.concurrent.TimeUnit;", + "", + "APAConfig.setEstimate(1,TimeUnit.HOURS,UseCase.BIGPROJECT);", + "APAConfig.setEstimate(1,TimeUnit.HOURS,UseCase.SMALLPROJECT);" + ] + } ] + }, + "visual" : { + "at" : { "x" : 112, "y" : 176 }, + "labelOffset" : { "x" : -8, "y" : -8 } + }, + "connect" : [ + { "id" : "f43", "to" : "f44", "via" : [ { "x" : 112, "y" : 216 } ], "condition" : "ivp==\"TaskA.ivp\"" }, + { "id" : "f45", "to" : "f42", "via" : [ { "x" : 112, "y" : 136 } ], "condition" : "ivp==\"TaskB.ivp\"" } + ] + }, { + "id" : "f42", + "type" : "UserTask", + "name" : "Task A", + "config" : { + "dialog" : "com.axonivy.utils.process.analyzer.demo.Dummy:start()", + "task" : { + "name" : "Task A", + "code" : [ + "import com.axonivy.utils.process.analyzer.demo.constant.UseCase;", + "import com.axonivy.utils.process.analyzer.APAConfig;", + "import java.util.concurrent.TimeUnit;", + "", + "APAConfig.setEstimate(5,TimeUnit.HOURS,UseCase.BIGPROJECT);", + "APAConfig.setEstimate(3,TimeUnit.HOURS,UseCase.SMALLPROJECT);" + ] + } + }, + "visual" : { + "at" : { "x" : 224, "y" : 136 } + }, + "connect" : [ + { "id" : "f47", "to" : "f46", "via" : [ { "x" : 336, "y" : 136 } ], "var" : "in1" } + ] + }, { + "id" : "f44", + "type" : "UserTask", + "name" : "Task B", + "config" : { + "dialog" : "com.axonivy.utils.process.analyzer.demo.Dummy:start()", + "task" : { + "name" : "Task B", + "code" : [ + "import com.axonivy.utils.process.analyzer.demo.constant.UseCase;", + "import com.axonivy.utils.process.analyzer.APAConfig;", + "import java.util.concurrent.TimeUnit;", + "", + "APAConfig.setEstimate(5,TimeUnit.HOURS,UseCase.BIGPROJECT);", + "APAConfig.setEstimate(3,TimeUnit.HOURS,UseCase.SMALLPROJECT);" + ] + } + }, + "visual" : { + "at" : { "x" : 224, "y" : 216 } + }, + "connect" : [ + { "id" : "f48", "to" : "f46", "via" : [ { "x" : 336, "y" : 216 } ], "var" : "in2" } + ] + }, { + "id" : "f46", + "type" : "TaskSwitchGateway", + "name" : "Task 2", + "config" : { + "tasks" : [ { + "id" : "TaskB", + "name" : "Task2B", + "code" : [ + "import com.axonivy.utils.process.analyzer.demo.constant.UseCase;", + "import com.axonivy.utils.process.analyzer.APAConfig;", + "import java.util.concurrent.TimeUnit;", + "", + "APAConfig.setEstimate(1,TimeUnit.HOURS,UseCase.BIGPROJECT);", + "APAConfig.setEstimate(1,TimeUnit.HOURS,UseCase.SMALLPROJECT);" + ] + }, { + "id" : "TaskA", + "name" : "Task2A", + "code" : [ + "import com.axonivy.utils.process.analyzer.demo.constant.UseCase;", + "import com.axonivy.utils.process.analyzer.APAConfig;", + "import java.util.concurrent.TimeUnit;", + "", + "APAConfig.setEstimate(1,TimeUnit.HOURS,UseCase.BIGPROJECT);", + "APAConfig.setEstimate(1,TimeUnit.HOURS,UseCase.SMALLPROJECT);" + ] + }, { + "id" : "TaskC", + "name" : "Task2C", + "code" : [ + "import com.axonivy.utils.process.analyzer.demo.constant.UseCase;", + "import com.axonivy.utils.process.analyzer.APAConfig;", + "import java.util.concurrent.TimeUnit;", + "", + "APAConfig.setEstimate(1,TimeUnit.HOURS,UseCase.BIGPROJECT);", + "APAConfig.setEstimate(1,TimeUnit.HOURS,UseCase.SMALLPROJECT);" + ] + } ] + }, + "visual" : { + "at" : { "x" : 352, "y" : 176 }, + "labelOffset" : { "x" : -24, "y" : 16 } + }, + "connect" : [ + { "id" : "f52", "to" : "f49", "via" : [ { "x" : 376, "y" : 208 } ], "condition" : "ivp==\"TaskB.ivp\"" }, + { "id" : "f50", "to" : "f51", "via" : [ { "x" : 376, "y" : 136 } ], "condition" : "ivp==\"TaskA.ivp\"" }, + { "id" : "f60", "to" : "f63", "condition" : "ivp==\"TaskC.ivp\"" } + ] + }, { + "id" : "f49", + "type" : "UserTask", + "name" : "Task D", + "config" : { + "dialog" : "com.axonivy.utils.process.analyzer.demo.Dummy:start()", + "task" : { + "name" : "Task D", + "code" : [ + "import com.axonivy.utils.process.analyzer.demo.constant.UseCase;", + "import com.axonivy.utils.process.analyzer.APAConfig;", + "import java.util.concurrent.TimeUnit;", + "", + "APAConfig.setEstimate(5,TimeUnit.HOURS,UseCase.BIGPROJECT);", + "APAConfig.setEstimate(3,TimeUnit.HOURS,UseCase.SMALLPROJECT);" + ] + } + }, + "visual" : { + "at" : { "x" : 456, "y" : 216 } + }, + "connect" : [ + { "id" : "f55", "to" : "f53", "var" : "in2" } + ] + }, { + "id" : "f51", + "type" : "UserTask", + "name" : "Task C", + "config" : { + "dialog" : "com.axonivy.utils.process.analyzer.demo.Dummy:start()", + "task" : { + "name" : "Task C", + "code" : [ + "import com.axonivy.utils.process.analyzer.demo.constant.UseCase;", + "import com.axonivy.utils.process.analyzer.APAConfig;", + "import java.util.concurrent.TimeUnit;", + "", + "APAConfig.setEstimate(5,TimeUnit.HOURS,UseCase.BIGPROJECT);", + "APAConfig.setEstimate(3,TimeUnit.HOURS,UseCase.SMALLPROJECT);" + ] + } + }, + "visual" : { + "at" : { "x" : 456, "y" : 136 } + }, + "connect" : [ + { "id" : "f61", "to" : "f54" } + ] + }, { + "id" : "f53", + "type" : "TaskSwitchGateway", + "name" : "Task 3", + "config" : { + "tasks" : [ { + "id" : "TaskA", + "name" : "Task3A", + "code" : [ + "import com.axonivy.utils.process.analyzer.demo.constant.UseCase;", + "import com.axonivy.utils.process.analyzer.APAConfig;", + "import java.util.concurrent.TimeUnit;", + "", + "APAConfig.setEstimate(1,TimeUnit.HOURS,UseCase.BIGPROJECT);", + "APAConfig.setEstimate(1,TimeUnit.HOURS,UseCase.SMALLPROJECT);" + ] + } ] + }, + "visual" : { + "at" : { "x" : 792, "y" : 216 }, + "labelOffset" : { "x" : 48, "y" : 32 } + }, + "connect" : [ + { "id" : "f57", "to" : "f71", "condition" : "ivp==\"TaskA.ivp\"" } + ] + }, { + "id" : "f56", + "type" : "TaskEnd", + "visual" : { + "at" : { "x" : 1032, "y" : 216 } + } + }, { + "id" : "f58", + "type" : "UserTask", + "name" : "Task E", + "config" : { + "dialog" : "com.axonivy.utils.process.analyzer.demo.Dummy:start()", + "task" : { + "name" : "Task E", + "code" : [ + "import com.axonivy.utils.process.analyzer.demo.constant.UseCase;", + "import com.axonivy.utils.process.analyzer.APAConfig;", + "import java.util.concurrent.TimeUnit;", + "", + "APAConfig.setEstimate(5,TimeUnit.HOURS,UseCase.BIGPROJECT);", + "APAConfig.setEstimate(3,TimeUnit.HOURS,UseCase.SMALLPROJECT);" + ] + } + }, + "visual" : { + "at" : { "x" : 480, "y" : 344 } + }, + "connect" : [ + { "id" : "f59", "to" : "f56", "via" : [ { "x" : 1032, "y" : 344 } ] } + ] + }, { + "id" : "f54", + "type" : "Alternative", + "config" : { + "conditions" : { + "f69" : "true", + "f66" : "" + } + }, + "visual" : { + "at" : { "x" : 584, "y" : 136 } + }, + "connect" : [ + { "id" : "f66", "to" : "f62", "color" : "default path" }, + { "id" : "f69", "to" : "f68", "via" : [ { "x" : 584, "y" : 56 } ], "label" : { + "name" : "{internal}", + "segment" : 0.99 + } } + ] + }, { + "id" : "f62", + "type" : "UserTask", + "name" : "Task F", + "config" : { + "dialog" : "com.axonivy.utils.process.analyzer.demo.Dummy:start()", + "task" : { + "name" : "Task F", + "code" : [ + "import com.axonivy.utils.process.analyzer.demo.constant.UseCase;", + "import com.axonivy.utils.process.analyzer.APAConfig;", + "import java.util.concurrent.TimeUnit;", + "", + "APAConfig.setEstimate(5,TimeUnit.HOURS,UseCase.BIGPROJECT);", + "APAConfig.setEstimate(3,TimeUnit.HOURS,UseCase.SMALLPROJECT);" + ] + } + }, + "visual" : { + "at" : { "x" : 688, "y" : 136 } + }, + "connect" : [ + { "id" : "f67", "to" : "f76" } + ] + }, { + "id" : "f68", + "type" : "UserTask", + "name" : "Task K", + "config" : { + "dialog" : "com.axonivy.utils.process.analyzer.demo.Dummy:start()", + "task" : { + "name" : "Task K", + "code" : [ + "import com.axonivy.utils.process.analyzer.demo.constant.UseCase;", + "import com.axonivy.utils.process.analyzer.APAConfig;", + "import java.util.concurrent.TimeUnit;", + "", + "APAConfig.setEstimate(5,TimeUnit.HOURS,UseCase.BIGPROJECT);", + "APAConfig.setEstimate(3,TimeUnit.HOURS,UseCase.SMALLPROJECT);" + ] + } + }, + "visual" : { + "at" : { "x" : 688, "y" : 56 } + }, + "connect" : [ + { "id" : "f70", "to" : "f76", "via" : [ { "x" : 792, "y" : 56 } ] } + ] + }, { + "id" : "f71", + "type" : "UserTask", + "name" : "Task I3", + "config" : { + "dialog" : "com.axonivy.utils.process.analyzer.demo.Dummy:start()", + "task" : { + "name" : "Task I", + "code" : [ + "import com.axonivy.utils.process.analyzer.demo.constant.UseCase;", + "import com.axonivy.utils.process.analyzer.APAConfig;", + "import java.util.concurrent.TimeUnit;", + "", + "APAConfig.setEstimate(5,TimeUnit.HOURS,UseCase.BIGPROJECT);", + "APAConfig.setEstimate(3,TimeUnit.HOURS,UseCase.SMALLPROJECT);" + ] + } + }, + "visual" : { + "at" : { "x" : 904, "y" : 216 } + }, + "connect" : [ + { "id" : "f72", "to" : "f56" } + ] + }, { + "id" : "f76", + "type" : "Alternative", + "visual" : { + "at" : { "x" : 792, "y" : 136 } + }, + "connect" : [ + { "id" : "f77", "to" : "f53", "var" : "in5" } + ] + }, { + "id" : "f63", + "type" : "Alternative", + "config" : { + "conditions" : { + "f64" : "true" + } + }, + "visual" : { + "at" : { "x" : 352, "y" : 280 } + }, + "connect" : [ + { "id" : "f64", "to" : "f58", "via" : [ { "x" : 352, "y" : 344 } ] }, + { "id" : "f79", "to" : "f0", "color" : "default path", "label" : { + "name" : "{internal}" + } } + ] + }, { + "id" : "f0", + "type" : "UserTask", + "name" : "Task G", + "config" : { + "dialog" : "com.axonivy.utils.process.analyzer.demo.Dummy:start()", + "task" : { + "name" : "Task G", + "code" : [ + "import com.axonivy.utils.process.analyzer.demo.constant.UseCase;", + "import com.axonivy.utils.process.analyzer.APAConfig;", + "import java.util.concurrent.TimeUnit;", + "", + "APAConfig.setEstimate(5,TimeUnit.HOURS,UseCase.BIGPROJECT);", + "APAConfig.setEstimate(3,TimeUnit.HOURS,UseCase.SMALLPROJECT);" + ] + } + }, + "visual" : { + "at" : { "x" : 648, "y" : 280 } + }, + "connect" : [ + { "id" : "f1", "to" : "f53", "via" : [ { "x" : 792, "y" : 280 } ], "var" : "in1" } + ] + } ], + "layout" : { + "colors" : { + "default path" : "#06f416" + } + } +} \ No newline at end of file diff --git a/process-analyzer-demo/processes/Analysis Processes/FlowSubProcessDemo.p.json b/process-analyzer-demo/processes/Analysis Processes/FlowSubProcessDemo.p.json new file mode 100644 index 00000000..b8cedbd2 --- /dev/null +++ b/process-analyzer-demo/processes/Analysis Processes/FlowSubProcessDemo.p.json @@ -0,0 +1,206 @@ +{ + "$schema" : "https://json-schema.axonivy.com/process/11.2.2/process.json", + "id" : "18E31D6BC0E4B857", + "config" : { + "data" : "com.axonivy.utils.process.analyzer.demo.Data" + }, + "elements" : [ { + "id" : "f0", + "type" : "RequestStart", + "name" : "start", + "config" : { + "signature" : "start" + }, + "visual" : { + "at" : { "x" : 96, "y" : 64 } + }, + "connect" : [ + { "id" : "f2", "to" : "S10" } + ] + }, { + "id" : "f1", + "type" : "TaskEnd", + "visual" : { + "at" : { "x" : 568, "y" : 64 } + } + }, { + "id" : "S10", + "type" : "EmbeddedProcess", + "name" : "sub process 2 levels", + "elements" : [ { + "id" : "S10-g0", + "type" : "EmbeddedStart", + "visual" : { + "at" : { "x" : 64, "y" : 256 } + }, + "parentConnector" : "f2", + "connect" : [ + { "id" : "S10-f0", "to" : "S10-S10" } + ] + }, { + "id" : "S10-g1", + "type" : "EmbeddedEnd", + "visual" : { + "at" : { "x" : 416, "y" : 256 } + }, + "parentConnector" : "f3" + }, { + "id" : "S10-S10", + "type" : "EmbeddedProcess", + "name" : "sub of sub process", + "elements" : [ { + "id" : "S10-S10-g0", + "type" : "EmbeddedStart", + "visual" : { + "at" : { "x" : 64, "y" : 256 } + }, + "parentConnector" : "S10-f0", + "connect" : [ + { "id" : "S10-S10-f0", "to" : "S10-S10-f1" } + ] + }, { + "id" : "S10-S10-g1", + "type" : "EmbeddedEnd", + "visual" : { + "at" : { "x" : 496, "y" : 256 } + }, + "parentConnector" : "S10-f1" + }, { + "id" : "S10-S10-f1", + "type" : "UserTask", + "name" : "Task A", + "config" : { + "dialog" : "com.axonivy.utils.process.analyzer.demo.Dummy:start()", + "task" : { + "name" : "Task A", + "code" : [ + "import java.util.concurrent.TimeUnit;", + "import com.axonivy.utils.process.analyzer.demo.constant.UseCase;", + "import com.axonivy.utils.process.analyzer.APAConfig;", + "", + "APAConfig.setEstimate(1,TimeUnit.HOURS,UseCase.BIGPROJECT);" + ] + } + }, + "visual" : { + "at" : { "x" : 192, "y" : 256 } + }, + "connect" : [ + { "id" : "S10-S10-f2", "to" : "S10-S10-S10" } + ] + }, { + "id" : "S10-S10-S10", + "type" : "EmbeddedProcess", + "name" : "sub level 3th", + "elements" : [ { + "id" : "S10-S10-S10-g0", + "type" : "EmbeddedStart", + "visual" : { + "at" : { "x" : 64, "y" : 256 } + }, + "parentConnector" : "S10-S10-f2", + "connect" : [ + { "id" : "S10-S10-S10-f0", "to" : "S10-S10-S10-f1" } + ] + }, { + "id" : "S10-S10-S10-g1", + "type" : "EmbeddedEnd", + "visual" : { + "at" : { "x" : 400, "y" : 256 } + }, + "parentConnector" : "S10-S10-f3" + }, { + "id" : "S10-S10-S10-f1", + "type" : "UserTask", + "name" : "Task B", + "config" : { + "dialog" : "com.axonivy.utils.process.analyzer.demo.Dummy:start()", + "task" : { + "code" : [ + "import java.util.concurrent.TimeUnit;", + "import com.axonivy.utils.process.analyzer.demo.constant.UseCase;", + "import com.axonivy.utils.process.analyzer.APAConfig;", + "", + "APAConfig.setEstimate(3,TimeUnit.HOURS,UseCase.BIGPROJECT);" + ] + } + }, + "visual" : { + "at" : { "x" : 216, "y" : 256 } + }, + "connect" : [ + { "id" : "S10-S10-S10-f2", "to" : "S10-S10-S10-g1" } + ] + } ], + "visual" : { + "at" : { "x" : 368, "y" : 256 } + }, + "connect" : [ + { "id" : "S10-S10-f3", "to" : "S10-S10-g1" } + ] + } ], + "visual" : { + "at" : { "x" : 224, "y" : 256 } + }, + "connect" : [ + { "id" : "S10-f1", "to" : "S10-g1" } + ] + } ], + "visual" : { + "at" : { "x" : 264, "y" : 64 } + }, + "connect" : [ + { "id" : "f3", "to" : "S20" } + ] + }, { + "id" : "S20", + "type" : "EmbeddedProcess", + "name" : "sub process 1 level", + "elements" : [ { + "id" : "S20-g0", + "type" : "EmbeddedStart", + "visual" : { + "at" : { "x" : 64, "y" : 256 } + }, + "parentConnector" : "f3", + "connect" : [ + { "id" : "S20-f0", "to" : "S20-f1" } + ] + }, { + "id" : "S20-g1", + "type" : "EmbeddedEnd", + "visual" : { + "at" : { "x" : 416, "y" : 256 } + }, + "parentConnector" : "f4" + }, { + "id" : "S20-f1", + "type" : "UserTask", + "name" : "Task C", + "config" : { + "dialog" : "com.axonivy.utils.process.analyzer.demo.Dummy:start()", + "task" : { + "code" : [ + "import java.util.concurrent.TimeUnit;", + "import com.axonivy.utils.process.analyzer.demo.constant.UseCase;", + "import com.axonivy.utils.process.analyzer.APAConfig;", + "", + "APAConfig.setEstimate(4,TimeUnit.HOURS,UseCase.BIGPROJECT);" + ] + } + }, + "visual" : { + "at" : { "x" : 232, "y" : 256 } + }, + "connect" : [ + { "id" : "S20-f2", "to" : "S20-g1" } + ] + } ], + "visual" : { + "at" : { "x" : 432, "y" : 64 } + }, + "connect" : [ + { "id" : "f4", "to" : "f1" } + ] + } ] +} \ No newline at end of file diff --git a/process-analyzer-demo/processes/Start Processes/Demo.p.json b/process-analyzer-demo/processes/Start Processes/Demo.p.json new file mode 100644 index 00000000..b47ba6a1 --- /dev/null +++ b/process-analyzer-demo/processes/Start Processes/Demo.p.json @@ -0,0 +1,69 @@ +{ + "$schema" : "https://json-schema.axonivy.com/process/11.2.2/process.json", + "id" : "18E180F943F963D5", + "config" : { + "data" : "com.axonivy.utils.process.analyzer.demo.DemoData" + }, + "elements" : [ { + "id" : "f0", + "type" : "RequestStart", + "name" : "start", + "config" : { + "signature" : "start", + "request" : { + "name" : "ProcessAnalyzerDemo" + } + }, + "visual" : { + "at" : { "x" : 80, "y" : 64 } + }, + "connect" : [ + { "id" : "f2", "to" : "f5" } + ] + }, { + "id" : "f1", + "type" : "TaskEnd", + "visual" : { + "at" : { "x" : 552, "y" : 64 } + } + }, { + "id" : "f3", + "type" : "DialogCall", + "name" : "Table Show", + "config" : { + "dialog" : "com.axonivy.utils.process.analyzer.demo.ProcessAnalyzerTable:start(com.axonivy.utils.process.analyzer.demo.ProcessAnalyzerBean)", + "call" : { + "map" : { + "param.processAnalyzerBean" : "in.bean" + } + } + }, + "visual" : { + "at" : { "x" : 408, "y" : 64 } + }, + "connect" : [ + { "id" : "f4", "to" : "f1" } + ] + }, { + "id" : "f5", + "type" : "Script", + "name" : "init data", + "config" : { + "output" : { + "code" : [ + "import com.axonivy.utils.process.analyzer.demo.model.Analyzer;", + "import com.axonivy.utils.process.analyzer.demo.ProcessAnalyzerBean;", + "", + "in.bean = new ProcessAnalyzerBean();", + "in.bean.selectedAnalyzer = new Analyzer();" + ] + } + }, + "visual" : { + "at" : { "x" : 224, "y" : 64 } + }, + "connect" : [ + { "id" : "f6", "to" : "f3" } + ] + } ] +} \ No newline at end of file diff --git a/process-analyzer-demo/src/com/axonivy/utils/process/analyzer/demo/ProcessAnalyzerBean.java b/process-analyzer-demo/src/com/axonivy/utils/process/analyzer/demo/ProcessAnalyzerBean.java new file mode 100644 index 00000000..4449da78 --- /dev/null +++ b/process-analyzer-demo/src/com/axonivy/utils/process/analyzer/demo/ProcessAnalyzerBean.java @@ -0,0 +1,249 @@ +package com.axonivy.utils.process.analyzer.demo; + +import static java.util.Collections.emptyList; +import static org.apache.commons.lang3.StringUtils.defaultIfEmpty; + +import java.time.Duration; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +import javax.faces.event.AjaxBehaviorEvent; + +import org.primefaces.component.selectoneradio.SelectOneRadio; + +import com.axonivy.utils.process.analyzer.AdvancedProcessAnalyzer; +import com.axonivy.utils.process.analyzer.demo.constant.FindType; +import com.axonivy.utils.process.analyzer.demo.constant.UseCase; +import com.axonivy.utils.process.analyzer.demo.helper.DateTimeHelper; +import com.axonivy.utils.process.analyzer.demo.model.Analyzer; +import com.axonivy.utils.process.analyzer.internal.ProcessAnalyzer; +import com.axonivy.utils.process.analyzer.model.DetectedAlternative; +import com.axonivy.utils.process.analyzer.model.DetectedElement; + +import ch.ivyteam.ivy.environment.Ivy; +import ch.ivyteam.ivy.process.model.BaseElement; +import ch.ivyteam.ivy.process.model.EmbeddedProcess; +import ch.ivyteam.ivy.process.model.Process; +import ch.ivyteam.ivy.process.model.connector.SequenceFlow; +import ch.ivyteam.ivy.process.model.element.EmbeddedProcessElement; +import ch.ivyteam.ivy.process.model.element.ProcessElement; +import ch.ivyteam.ivy.process.model.element.SingleTaskCreator; +import ch.ivyteam.ivy.process.model.element.gateway.Alternative; +import ch.ivyteam.ivy.process.rdm.IProcess; +import ch.ivyteam.ivy.process.rdm.IProcessManager; +import ch.ivyteam.ivy.process.viewer.api.ProcessViewer; +import ch.ivyteam.ivy.workflow.start.IProcessWebStartable; +import ch.ivyteam.ivy.workflow.start.IWebStartable; + +public class ProcessAnalyzerBean { + + private List analyzers = new ArrayList<>(); + + private List processes = emptyList(); + + private Analyzer selectedAnalyzer = null; + + AdvancedProcessAnalyzer processAnalyzer; + + public ProcessAnalyzerBean() { + this.processes = getAllProcesses(); + } + + public List getAnalyzers() { + return analyzers; + } + + public void setAnalyzers(List analyzers) { + this.analyzers = analyzers; + } + + public List getProcesses() { + return processes; + } + + public Analyzer getSelectedAnalyzer() { + return selectedAnalyzer; + } + + public void setSelectedAnalyzer(Analyzer selectedAnalyzer) { + this.selectedAnalyzer = selectedAnalyzer; + } + + public List getAllTaskModifier() { + this.processAnalyzer = new ProcessAnalyzer(); + return getElementOfProcess(this.selectedAnalyzer.getProcess()).stream() + .filter(item -> item instanceof SingleTaskCreator) + .map(SingleTaskCreator.class::cast) + .toList(); + } + + public List getAllFindType(){ + return Arrays.stream(FindType.values()).toList(); + } + + public List getAllUseCases(){ + return Arrays.stream(UseCase.values()).toList(); + } + + public List getALternativeWithMoreThanOneOutgoing() throws Exception { + + processAnalyzer.enableDescribeAlternativeElements(); + + List alternatives = processAnalyzer.findAllTasks(selectedAnalyzer.getStartElement(), null).stream() + .filter(item -> item instanceof DetectedAlternative) + .map(DetectedAlternative.class::cast) + .filter(item -> item.getOptions().size() > 1) + .toList(); + return alternatives; + } + + public void onSelectSequenceFlow(AjaxBehaviorEvent event) { + if (event.getSource() != null) { + DetectedElement newSequenceFlow = (DetectedElement) ((SelectOneRadio) event.getSource()).getValue(); + String sequenceFlowId = newSequenceFlow.getPid(); + + SequenceFlow sequenceFlow = getElementOfProcess(selectedAnalyzer.getProcess()).stream() + .filter(it -> it.getPid().getRawPid().equals(sequenceFlowId)) + .filter(it -> it instanceof SequenceFlow == true).map(SequenceFlow.class::cast).findFirst() + .orElse(null); + + if (sequenceFlow != null) { + if (sequenceFlow.getSource() instanceof Alternative) { + Alternative alternative = (Alternative) sequenceFlow.getSource(); + selectedAnalyzer.getAlternativeFlows().put(alternative, sequenceFlow); + } + } + } + } + + public List getDetectedTask() throws Exception { + UseCase useCase = selectedAnalyzer.getUseCase(); + String flowName = selectedAnalyzer.getFlowName(); + SingleTaskCreator startElement = selectedAnalyzer.getStartElement(); + processAnalyzer = updateProcessAnalyzer(selectedAnalyzer); + + long startTime = System.currentTimeMillis(); + List detectedElements = null; + if (FindType.ALL_TASK.equals(selectedAnalyzer.getFindType())) { + detectedElements = processAnalyzer.findAllTasks(startElement, useCase); + } else { + detectedElements = processAnalyzer.findTasksOnPath(startElement, useCase, flowName); + } + + long executionTime = System.currentTimeMillis() - startTime; + selectedAnalyzer.setExecutionTime(executionTime); + + return detectedElements.stream().map(DetectedElement.class::cast).toList(); + } + + public Duration getDetectedTaskCalculate() throws Exception{ + UseCase useCase = selectedAnalyzer.getUseCase(); + String flowName = selectedAnalyzer.getFlowName(); + SingleTaskCreator startElement = selectedAnalyzer.getStartElement(); + processAnalyzer = updateProcessAnalyzer(selectedAnalyzer); + Duration total = Duration.ZERO; + if (FindType.ALL_TASK.equals(selectedAnalyzer.getFindType())) { + total = processAnalyzer.calculateWorstCaseDuration(startElement, useCase); + } else { + total = processAnalyzer.calculateDurationOfPath(startElement, useCase, flowName); + } + + return total; + } + + public String getDisplayDuration(Duration duration) { + return DateTimeHelper.getDisplayDuration(duration); + } + + public String getDisplayDetectedElement(DetectedElement element) { + String elementName = defaultIfEmpty(element.getElementName(), "No name"); + String shortPid = getShortPid(element.getPid()); + return String.format("%s (%s)", elementName, shortPid); + } + + public String getProcessWebLink() { + String guid = this.selectedAnalyzer.getProcess().getPid().getProcessGuid(); + IWebStartable webStartable = Ivy.session().getStartables().stream().filter(it -> it.getLink().toRelativeUri().getPath().contains(guid)).findFirst().orElse(null); + + if(webStartable != null) { + return ProcessViewer.of((IProcessWebStartable) webStartable).url().toWebLink().getRelative(); + } + return null; + } + + public String getShortPid(String pid) { + int index = pid.indexOf("-"); + return pid.substring(index + 1); + } + + private AdvancedProcessAnalyzer updateProcessAnalyzer(Analyzer analyzer) { + Map flowOverrides = getProcessFlowOverride(analyzer); + processAnalyzer.disableDescribeAlternativeElements(); + processAnalyzer.setProcessFlowOverrides(flowOverrides); + return processAnalyzer; + } + + private Map getProcessFlowOverride(Analyzer analyzer) { + Map alternativeFlows = analyzer.getAlternativeFlows(); + Map processFlowOverride = new HashMap(); + + for (Alternative item : alternativeFlows.keySet()) { + if (alternativeFlows.get(item) != null) { + processFlowOverride.put(item.getPid().getRawPid(), alternativeFlows.get(item).getPid().getRawPid()); + } + } + return processFlowOverride; + } + + private List getAllProcesses() { + List processes = IProcessManager.instance().getProjectDataModels().stream() + .flatMap(project -> project.getProcesses().stream()) + .map(IProcess::getModel) + .toList(); + return processes; + } + + private boolean isAcceptedProcess(Listfolders, String fullQualifiedName) { + return folders.stream().anyMatch(folder -> fullQualifiedName.contains(folder)); + } + + private static List getElementOfProcess (Process process) { + var processElements = process.getProcessElements(); + var childElments = getElementOfProcesses(processElements); + var elements = process.getElements(); + elements.addAll(childElments); + + return elements; + } + + private static List getElementOfProcesses (List processElements) { + if(processElements.isEmpty()) { + return emptyList(); + } + var embeddedProcess = processElements.stream() + .filter(it -> it instanceof EmbeddedProcessElement == true) + .map(EmbeddedProcessElement.class::cast) + .map(it -> it.getEmbeddedProcess()) + .collect(Collectors.toList()); + + var elememets = embeddedProcess.stream() + .map(EmbeddedProcess::getElements) + .flatMap(List::stream) + .collect(Collectors.toList()); + + var childProcessElements = embeddedProcess.stream() + .map(EmbeddedProcess::getProcessElements) + .flatMap(List::stream) + .collect(Collectors.toList()); + + var childElememts = getElementOfProcesses(childProcessElements); + + elememets.addAll(childElememts); + + return elememets; + } +} diff --git a/process-analyzer-demo/src/com/axonivy/utils/process/analyzer/demo/constant/FindType.java b/process-analyzer-demo/src/com/axonivy/utils/process/analyzer/demo/constant/FindType.java new file mode 100644 index 00000000..f8d71fd5 --- /dev/null +++ b/process-analyzer-demo/src/com/axonivy/utils/process/analyzer/demo/constant/FindType.java @@ -0,0 +1,15 @@ +package com.axonivy.utils.process.analyzer.demo.constant; + +public enum FindType { + ALL_TASK("Find All Task"), TASK_ON_PATH("Find Task On Path"); + + private final String displayName; + + private FindType(String displayName) { + this.displayName = displayName; + } + + public String getDisplayName() { + return this.displayName; + } +} diff --git a/process-analyzer-demo/src/com/axonivy/utils/process/analyzer/demo/constant/UseCase.java b/process-analyzer-demo/src/com/axonivy/utils/process/analyzer/demo/constant/UseCase.java new file mode 100644 index 00000000..3119eb40 --- /dev/null +++ b/process-analyzer-demo/src/com/axonivy/utils/process/analyzer/demo/constant/UseCase.java @@ -0,0 +1,6 @@ +package com.axonivy.utils.process.analyzer.demo.constant; + + +public enum UseCase { + BIGPROJECT, MEDIUMPROJECT, SMALLPROJECT +} diff --git a/process-analyzer-demo/src/com/axonivy/utils/process/analyzer/demo/converter/PojoConverter.java b/process-analyzer-demo/src/com/axonivy/utils/process/analyzer/demo/converter/PojoConverter.java new file mode 100644 index 00000000..887b42e1 --- /dev/null +++ b/process-analyzer-demo/src/com/axonivy/utils/process/analyzer/demo/converter/PojoConverter.java @@ -0,0 +1,73 @@ +package com.axonivy.utils.process.analyzer.demo.converter; + +import java.util.Map; + +import javax.faces.component.UIComponent; +import javax.faces.component.UIViewRoot; +import javax.faces.context.FacesContext; +import javax.faces.convert.Converter; +import javax.faces.convert.ConverterException; +import javax.faces.convert.FacesConverter; + +/** + * Converter that can handle POJOs. Can handle each type of object. + * + * Attention: If a no selection item is provided its item value must be ''. An empty string ('') is + * not allowed as choosable item value (it will always be converted to {@code null}). + * + * Attention: If the POJOs must match each other (e.g. in a dropdown) over multiple views it is + * required that the POJOs implement the hasCode method properly. + * + * Attention: This converter could fail in rare cases because it is based on the identityHashcode which is not unique for an object. + */ +@FacesConverter("pojoConverter") +public class PojoConverter implements Converter { + private static final String UNIQUE_CONVERTER_IDENTIFIER = PojoConverter.class.getName(); + private static final String KEY_DELIMITER = ":::"; + private static final String MAP_KEY_TEMPLATE = UNIQUE_CONVERTER_IDENTIFIER + KEY_DELIMITER + "%s" + KEY_DELIMITER + + "%s"; + + /** + * {@inheritDoc}
+ * This implementation:
+ * Returns the item's hash code or the default no selection value. + */ + @Override + public String getAsString(FacesContext context, UIComponent component, Object item) throws ConverterException { + if (item != null && !isEmptyString(item)) { + Map viewMap = getViewMap(context); + String identityHashCode = String.valueOf(System.identityHashCode(item)); + String mapKey = String.format(MAP_KEY_TEMPLATE, component.getId(), identityHashCode); + viewMap.put(mapKey, item); + + return identityHashCode; + } + return ""; + } + + /** + * {@inheritDoc}
+ * This implementation:
+ * Returns the item that corresponds the the given selected value. + */ + @Override + public Object getAsObject(FacesContext context, UIComponent component, String selectedvalue) { + if (selectedvalue != null && selectedvalue.length() > 0) { + + String mapKey = String.format(MAP_KEY_TEMPLATE, component.getId(), selectedvalue); + Map viewMap = getViewMap(context); + + return viewMap.get(mapKey); + } + return null; + } + + private boolean isEmptyString(Object item) { + return String.class.isAssignableFrom(item.getClass()) && "".equals(item); + } + + private Map getViewMap(FacesContext context) { + UIViewRoot viewRoot = context.getViewRoot(); + return viewRoot.getViewMap(); + } +} diff --git a/process-analyzer-demo/src/com/axonivy/utils/process/analyzer/demo/helper/DateTimeHelper.java b/process-analyzer-demo/src/com/axonivy/utils/process/analyzer/demo/helper/DateTimeHelper.java new file mode 100644 index 00000000..cd3ee643 --- /dev/null +++ b/process-analyzer-demo/src/com/axonivy/utils/process/analyzer/demo/helper/DateTimeHelper.java @@ -0,0 +1,17 @@ +package com.axonivy.utils.process.analyzer.demo.helper; + +import java.time.Duration; + +import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.time.DurationFormatUtils; + +public class DateTimeHelper { + private static final String HOUR_MINUTES_FORMAT = "H'h' m'm'"; + public static String getDisplayDuration(Duration duration) { + if(duration == null) { + return StringUtils.EMPTY; + } + String format = duration.isNegative() ? "- (%s)" : "%s"; + return DurationFormatUtils.formatDuration(duration.abs().toMillis(), String.format(format, HOUR_MINUTES_FORMAT), false); + } +} diff --git a/process-analyzer-demo/src/com/axonivy/utils/process/analyzer/demo/model/Analyzer.java b/process-analyzer-demo/src/com/axonivy/utils/process/analyzer/demo/model/Analyzer.java new file mode 100644 index 00000000..a691abec --- /dev/null +++ b/process-analyzer-demo/src/com/axonivy/utils/process/analyzer/demo/model/Analyzer.java @@ -0,0 +1,163 @@ +package com.axonivy.utils.process.analyzer.demo.model; + +import static java.util.Collections.emptyList; + +import java.time.Duration; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import java.util.stream.Collectors; + +import com.axonivy.utils.process.analyzer.demo.constant.UseCase; +import com.axonivy.utils.process.analyzer.demo.constant.FindType; +import com.axonivy.utils.process.analyzer.demo.helper.DateTimeHelper; +import com.axonivy.utils.process.analyzer.model.DetectedAlternative; +import com.axonivy.utils.process.analyzer.model.DetectedElement; + +import ch.ivyteam.ivy.process.model.Process; +import ch.ivyteam.ivy.process.model.connector.SequenceFlow; +import ch.ivyteam.ivy.process.model.element.SingleTaskCreator; +import ch.ivyteam.ivy.process.model.element.gateway.Alternative; + +public class Analyzer { + private String id; + private String flowName; + private Process process; + private String processPath; + private UseCase useCase; + private List elements; + private FindType findType; + private SingleTaskCreator startElement; + private List tasks; + private Duration totalDuration; + private long executionTime; + private List alternatives; + private Map alternativeFlows; + + public Analyzer() { + this.id = UUID.randomUUID().toString(); + this.flowName = null; + this.process = null; + this.processPath = null; + this.elements = emptyList(); + this.findType = null; + this.startElement = null; + this.tasks = emptyList(); + this.totalDuration = Duration.ZERO; + this.executionTime = 0; + this.alternativeFlows = new HashMap<>(); + } + + public String getId() { + return id; + } + + public Process getProcess() { + return process; + } + + public void setProcess(Process process) { + this.process = process; + } + + public String getProcessPath() { + return processPath; + } + + public void setProcessPath(String processPath) { + this.processPath = processPath; + } + + public List getElements() { + return elements; + } + + public void setElements(List elements) { + this.elements = elements; + } + + public SingleTaskCreator getStartElement() { + return startElement; + } + + public void setStartElement(SingleTaskCreator startElement) { + this.startElement = startElement; + } + + public FindType getFindType() { + return findType; + } + + public void setFindType(FindType findType) { + this.findType = findType; + } + + public UseCase getUseCase() { + return useCase; + } + + public void setUseCase(UseCase useCase) { + this.useCase = useCase; + } + + public List getTasks() { + return tasks; + } + + public void setTasks(List tasks) { + this.tasks = tasks; + } + + public String getFlowName() { + return flowName; + } + + public void setFlowName(String flowName) { + this.flowName = flowName; + } + + public Duration getTotalDuration() { + return totalDuration; + } + + public void setTotalDuration(Duration toDuration) { + this.totalDuration = toDuration; + } + + public String getDisplayTotalDuration() { + return DateTimeHelper.getDisplayDuration (totalDuration); + } + + public String getElementNames() { + return this.tasks.stream().map(DetectedElement::getElementName).collect(Collectors.joining(" -> ")); + } + + public String getTaskNames() { + return this.tasks.stream().map(DetectedElement::getTaskName).collect(Collectors.joining(" -> ")); + } + + public long getExecutionTime() { + return executionTime; + } + + public void setExecutionTime(long executionTime) { + this.executionTime = executionTime; + } + + public List getAlternatives() { + return alternatives; + } + + public void setAlternatives(List alternatives) { + this.alternatives = alternatives; + } + + public Map getAlternativeFlows() { + return alternativeFlows; + } + + public void setAlternativeFlows(Map alternativeFlows) { + this.alternativeFlows = alternativeFlows; + } +} diff --git a/process-analyzer-demo/src_hd/com/axonivy/utils/process/analyzer/demo/Dummy/Dummy.rddescriptor b/process-analyzer-demo/src_hd/com/axonivy/utils/process/analyzer/demo/Dummy/Dummy.rddescriptor new file mode 100644 index 00000000..ae605f0d --- /dev/null +++ b/process-analyzer-demo/src_hd/com/axonivy/utils/process/analyzer/demo/Dummy/Dummy.rddescriptor @@ -0,0 +1,7 @@ + + + + viewTechnology + JSF + + diff --git a/process-analyzer-demo/src_hd/com/axonivy/utils/process/analyzer/demo/Dummy/Dummy.xhtml b/process-analyzer-demo/src_hd/com/axonivy/utils/process/analyzer/demo/Dummy/Dummy.xhtml new file mode 100644 index 00000000..e9df7f7c --- /dev/null +++ b/process-analyzer-demo/src_hd/com/axonivy/utils/process/analyzer/demo/Dummy/Dummy.xhtml @@ -0,0 +1,35 @@ + + + + Dummy + + +

+ This is an + Html Dialog + implemented with JSF and Primefaces as widget library +

+ + + + + + + + +
+
+ + +
+
+ +
+
+
+ + diff --git a/process-analyzer-demo/src_hd/com/axonivy/utils/process/analyzer/demo/Dummy/DummyData.ivyClass b/process-analyzer-demo/src_hd/com/axonivy/utils/process/analyzer/demo/Dummy/DummyData.ivyClass new file mode 100644 index 00000000..deae43d8 --- /dev/null +++ b/process-analyzer-demo/src_hd/com/axonivy/utils/process/analyzer/demo/Dummy/DummyData.ivyClass @@ -0,0 +1,2 @@ +DummyData #class +com.axonivy.utils.process.analyzer.demo.Dummy #namespace diff --git a/process-analyzer-demo/src_hd/com/axonivy/utils/process/analyzer/demo/Dummy/DummyProcess.p.json b/process-analyzer-demo/src_hd/com/axonivy/utils/process/analyzer/demo/Dummy/DummyProcess.p.json new file mode 100644 index 00000000..2b27d4a7 --- /dev/null +++ b/process-analyzer-demo/src_hd/com/axonivy/utils/process/analyzer/demo/Dummy/DummyProcess.p.json @@ -0,0 +1,48 @@ +{ + "$schema" : "https://json-schema.axonivy.com/process/11.2.2/process.json", + "id" : "18E7EA48B28E4A37", + "kind" : "HTML_DIALOG", + "config" : { + "data" : "com.axonivy.utils.process.analyzer.demo.Dummy.DummyData" + }, + "elements" : [ { + "id" : "f0", + "type" : "HtmlDialogStart", + "name" : "start()", + "config" : { + "signature" : "start", + "guid" : "18E7EA48B2A39CB6" + }, + "visual" : { + "at" : { "x" : 96, "y" : 64 } + }, + "connect" : [ + { "id" : "f2", "to" : "f1" } + ] + }, { + "id" : "f1", + "type" : "HtmlDialogEnd", + "visual" : { + "at" : { "x" : 224, "y" : 64 } + } + }, { + "id" : "f3", + "type" : "HtmlDialogEventStart", + "name" : "close", + "config" : { + "guid" : "18E7EA48B2A6D6C3" + }, + "visual" : { + "at" : { "x" : 96, "y" : 160 } + }, + "connect" : [ + { "id" : "f5", "to" : "f4" } + ] + }, { + "id" : "f4", + "type" : "HtmlDialogExit", + "visual" : { + "at" : { "x" : 224, "y" : 160 } + } + } ] +} \ No newline at end of file diff --git a/process-analyzer-demo/src_hd/com/axonivy/utils/process/analyzer/demo/ProcessAnalyzerTable/ProcessAnalyzerTable.rddescriptor b/process-analyzer-demo/src_hd/com/axonivy/utils/process/analyzer/demo/ProcessAnalyzerTable/ProcessAnalyzerTable.rddescriptor new file mode 100644 index 00000000..ae605f0d --- /dev/null +++ b/process-analyzer-demo/src_hd/com/axonivy/utils/process/analyzer/demo/ProcessAnalyzerTable/ProcessAnalyzerTable.rddescriptor @@ -0,0 +1,7 @@ + + + + viewTechnology + JSF + + diff --git a/process-analyzer-demo/src_hd/com/axonivy/utils/process/analyzer/demo/ProcessAnalyzerTable/ProcessAnalyzerTable.xhtml b/process-analyzer-demo/src_hd/com/axonivy/utils/process/analyzer/demo/ProcessAnalyzerTable/ProcessAnalyzerTable.xhtml new file mode 100644 index 00000000..6d9d116e --- /dev/null +++ b/process-analyzer-demo/src_hd/com/axonivy/utils/process/analyzer/demo/ProcessAnalyzerTable/ProcessAnalyzerTable.xhtml @@ -0,0 +1,40 @@ + + + + ProcessAnalyzerDetail + + +

Advanced Process Analyzer

+ + + + + + + + + + + + +
+
+
+ + \ No newline at end of file diff --git a/process-analyzer-demo/src_hd/com/axonivy/utils/process/analyzer/demo/ProcessAnalyzerTable/ProcessAnalyzerTableData.ivyClass b/process-analyzer-demo/src_hd/com/axonivy/utils/process/analyzer/demo/ProcessAnalyzerTable/ProcessAnalyzerTableData.ivyClass new file mode 100644 index 00000000..bd76c0c6 --- /dev/null +++ b/process-analyzer-demo/src_hd/com/axonivy/utils/process/analyzer/demo/ProcessAnalyzerTable/ProcessAnalyzerTableData.ivyClass @@ -0,0 +1,4 @@ +ProcessAnalyzerTableData #class +com.axonivy.utils.process.analyzer.demo.ProcessAnalyzerTable #namespace +processAnalyzerBean com.axonivy.utils.process.analyzer.demo.ProcessAnalyzerBean #field +processAnalyzerBean PERSISTENT #fieldModifier diff --git a/process-analyzer-demo/src_hd/com/axonivy/utils/process/analyzer/demo/ProcessAnalyzerTable/ProcessAnalyzerTableProcess.p.json b/process-analyzer-demo/src_hd/com/axonivy/utils/process/analyzer/demo/ProcessAnalyzerTable/ProcessAnalyzerTableProcess.p.json new file mode 100644 index 00000000..b1cf67c9 --- /dev/null +++ b/process-analyzer-demo/src_hd/com/axonivy/utils/process/analyzer/demo/ProcessAnalyzerTable/ProcessAnalyzerTableProcess.p.json @@ -0,0 +1,56 @@ +{ + "$schema" : "https://json-schema.axonivy.com/process/11.2.2/process.json", + "id" : "18E18129A25A9EEC", + "kind" : "HTML_DIALOG", + "config" : { + "data" : "com.axonivy.utils.process.analyzer.demo.ProcessAnalyzerTable.ProcessAnalyzerTableData" + }, + "elements" : [ { + "id" : "f0", + "type" : "HtmlDialogStart", + "name" : "start(ProcessAnalyzerBean)", + "config" : { + "signature" : "start", + "input" : { + "params" : [ + { "name" : "processAnalyzerBean", "type" : "com.axonivy.utils.process.analyzer.demo.ProcessAnalyzerBean", "desc" : "" } + ], + "map" : { + "out.processAnalyzerBean" : "param.processAnalyzerBean" + } + }, + "guid" : "18E18129A262E35E" + }, + "visual" : { + "at" : { "x" : 104, "y" : 64 } + }, + "connect" : [ + { "id" : "f2", "to" : "f1" } + ] + }, { + "id" : "f1", + "type" : "HtmlDialogEnd", + "visual" : { + "at" : { "x" : 224, "y" : 64 } + } + }, { + "id" : "f3", + "type" : "HtmlDialogEventStart", + "name" : "close", + "config" : { + "guid" : "18E18129A2768836" + }, + "visual" : { + "at" : { "x" : 104, "y" : 160 } + }, + "connect" : [ + { "id" : "f5", "to" : "f4" } + ] + }, { + "id" : "f4", + "type" : "HtmlDialogExit", + "visual" : { + "at" : { "x" : 224, "y" : 160 } + } + } ] +} \ No newline at end of file diff --git a/process-analyzer-demo/src_hd/com/axonivy/utils/process/analyzer/demo/component/AnalyzerDetail/AnalyzerDetail.rddescriptor b/process-analyzer-demo/src_hd/com/axonivy/utils/process/analyzer/demo/component/AnalyzerDetail/AnalyzerDetail.rddescriptor new file mode 100644 index 00000000..ae605f0d --- /dev/null +++ b/process-analyzer-demo/src_hd/com/axonivy/utils/process/analyzer/demo/component/AnalyzerDetail/AnalyzerDetail.rddescriptor @@ -0,0 +1,7 @@ + + + + viewTechnology + JSF + + diff --git a/process-analyzer-demo/src_hd/com/axonivy/utils/process/analyzer/demo/component/AnalyzerDetail/AnalyzerDetail.xhtml b/process-analyzer-demo/src_hd/com/axonivy/utils/process/analyzer/demo/component/AnalyzerDetail/AnalyzerDetail.xhtml new file mode 100644 index 00000000..aca197f0 --- /dev/null +++ b/process-analyzer-demo/src_hd/com/axonivy/utils/process/analyzer/demo/component/AnalyzerDetail/AnalyzerDetail.xhtml @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/process-analyzer-demo/src_hd/com/axonivy/utils/process/analyzer/demo/component/AnalyzerDetail/AnalyzerDetailData.ivyClass b/process-analyzer-demo/src_hd/com/axonivy/utils/process/analyzer/demo/component/AnalyzerDetail/AnalyzerDetailData.ivyClass new file mode 100644 index 00000000..bf9ab7ea --- /dev/null +++ b/process-analyzer-demo/src_hd/com/axonivy/utils/process/analyzer/demo/component/AnalyzerDetail/AnalyzerDetailData.ivyClass @@ -0,0 +1,6 @@ +AnalyzerDetailData #class +com.axonivy.utils.process.analyzer.demo.component.AnalyzerDetail #namespace +processAnalyzerBean com.axonivy.utils.process.analyzer.demo.ProcessAnalyzerBean #field +processAnalyzerBean PERSISTENT #fieldModifier +analyzer com.axonivy.utils.process.analyzer.demo.model.Analyzer #field +analyzer PERSISTENT #fieldModifier diff --git a/process-analyzer-demo/src_hd/com/axonivy/utils/process/analyzer/demo/component/AnalyzerDetail/AnalyzerDetailProcess.p.json b/process-analyzer-demo/src_hd/com/axonivy/utils/process/analyzer/demo/component/AnalyzerDetail/AnalyzerDetailProcess.p.json new file mode 100644 index 00000000..6f385db4 --- /dev/null +++ b/process-analyzer-demo/src_hd/com/axonivy/utils/process/analyzer/demo/component/AnalyzerDetail/AnalyzerDetailProcess.p.json @@ -0,0 +1,56 @@ +{ + "$schema" : "https://json-schema.axonivy.com/process/11.2.2/process.json", + "id" : "18E3C233B54C77EA", + "kind" : "HTML_DIALOG", + "config" : { + "data" : "com.axonivy.utils.process.analyzer.demo.component.AnalyzerDetail.AnalyzerDetailData" + }, + "elements" : [ { + "id" : "f0", + "type" : "HtmlDialogStart", + "name" : "start(ProcessAnalyzerBean)", + "config" : { + "signature" : "start", + "input" : { + "params" : [ + { "name" : "processAnalyzerBean", "type" : "com.axonivy.utils.process.analyzer.demo.ProcessAnalyzerBean", "desc" : "" } + ], + "map" : { + "out.processAnalyzerBean" : "param.processAnalyzerBean" + } + }, + "guid" : "18E3C233B55F65EA" + }, + "visual" : { + "at" : { "x" : 96, "y" : 64 } + }, + "connect" : [ + { "id" : "f2", "to" : "f1" } + ] + }, { + "id" : "f1", + "type" : "HtmlDialogEnd", + "visual" : { + "at" : { "x" : 224, "y" : 64 } + } + }, { + "id" : "f3", + "type" : "HtmlDialogEventStart", + "name" : "close", + "config" : { + "guid" : "18E3C233B56CB324" + }, + "visual" : { + "at" : { "x" : 96, "y" : 160 } + }, + "connect" : [ + { "id" : "f5", "to" : "f4" } + ] + }, { + "id" : "f4", + "type" : "HtmlDialogExit", + "visual" : { + "at" : { "x" : 224, "y" : 160 } + } + } ] +} \ No newline at end of file diff --git a/process-analyzer-demo/src_hd/com/axonivy/utils/process/analyzer/demo/component/AnalyzerDetail/resources/analyzer-detail.css b/process-analyzer-demo/src_hd/com/axonivy/utils/process/analyzer/demo/component/AnalyzerDetail/resources/analyzer-detail.css new file mode 100644 index 00000000..64ebfda8 --- /dev/null +++ b/process-analyzer-demo/src_hd/com/axonivy/utils/process/analyzer/demo/component/AnalyzerDetail/resources/analyzer-detail.css @@ -0,0 +1,6 @@ +@charset "ISO-8859-1"; + +.ui-datatable-data .text-overflow { + white-space: nowrap; + text-overflow: ellipsis; +} \ No newline at end of file diff --git a/process-analyzer-demo/src_hd/com/axonivy/utils/process/analyzer/demo/component/AnalyzerSelection/AnalyzerSelection.rddescriptor b/process-analyzer-demo/src_hd/com/axonivy/utils/process/analyzer/demo/component/AnalyzerSelection/AnalyzerSelection.rddescriptor new file mode 100644 index 00000000..ae605f0d --- /dev/null +++ b/process-analyzer-demo/src_hd/com/axonivy/utils/process/analyzer/demo/component/AnalyzerSelection/AnalyzerSelection.rddescriptor @@ -0,0 +1,7 @@ + + + + viewTechnology + JSF + + diff --git a/process-analyzer-demo/src_hd/com/axonivy/utils/process/analyzer/demo/component/AnalyzerSelection/AnalyzerSelection.xhtml b/process-analyzer-demo/src_hd/com/axonivy/utils/process/analyzer/demo/component/AnalyzerSelection/AnalyzerSelection.xhtml new file mode 100644 index 00000000..5a901ecd --- /dev/null +++ b/process-analyzer-demo/src_hd/com/axonivy/utils/process/analyzer/demo/component/AnalyzerSelection/AnalyzerSelection.xhtml @@ -0,0 +1,121 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +