You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by kb...@apache.org on 2025/05/16 09:32:37 UTC
(incubator-kie-tools) branch main updated: kie-issues#1941/kie-issues#1921: Simplify enveloped components and add Process Definitions to the Management Console (#3090)
This is an automated email from the ASF dual-hosted git repository.
kbowers pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-tools.git
The following commit(s) were added to refs/heads/main by this push:
new a912d147c93 kie-issues#1941/kie-issues#1921: Simplify enveloped components and add Process Definitions to the Management Console (#3090)
a912d147c93 is described below
commit a912d147c93856f0778bb01e8fb26a798286d252
Author: Thiago Lugli <th...@users.noreply.github.com>
AuthorDate: Fri May 16 06:32:33 2025 -0300
kie-issues#1941/kie-issues#1921: Simplify enveloped components and add Process Definitions to the Management Console (#3090)
---
.gitignore | 1 +
.rat-excludes | 12 +-
.../main/resources/META-INF/processSVG/hiring.svg | 1518 ++++++++++++++++++++
.../custom-forms-dev/hiring_ITInterview.tsx | 125 ++
.../main/resources/{Sample.bpmn => hiring.bpmn} | 0
.../{Sample.dmn => loan-pre-qualification.dmn} | 0
packages/runtime-tools-components/package.json | 2 +-
.../src/common/static/avatar.svg | 86 --
.../src/common/static/kogitoAbout.png | Bin 100282 -> 0 bytes
.../components/AboutModalBox/AboutModalBox.tsx | 0
.../{common => }/components/BulkList/BulkList.tsx | 0
.../src/{common => }/components/BulkList/index.ts | 0
.../components/DataTable/DataTable.tsx | 0
.../src/{common => }/components/DataTable/index.ts | 0
.../components/EndpointLink/EndpointLink.tsx | 0
.../{common => }/components/EndpointLink/index.ts | 0
.../components/FormFooter/FormFooter.tsx | 0
.../{common => }/components/FormFooter/index.ts | 0
.../FormNotification/FormNotification.tsx | 4 +-
.../components/FormNotification/index.ts | 0
.../components/FormRenderer/FormRenderer.tsx | 0
.../{common => }/components/FormRenderer/index.ts | 0
.../components/InlineEdit/InlineEdit.tsx | 0
.../{common => }/components/InlineEdit/index.ts | 0
.../components/ItemDescriptor/ItemDescriptor.tsx | 0
.../components/ItemDescriptor/index.ts | 0
.../KeycloakUnavailablePage.tsx | 0
.../components/KeycloakUnavailablePage/index.ts | 0
.../KogitoEmptyState/KogitoEmptyState.tsx | 0
.../components/KogitoEmptyState/index.ts | 0
.../components/KogitoSpinner/KogitoSpinner.tsx | 0
.../{common => }/components/KogitoSpinner/index.ts | 0
.../{common => }/components/LoadMore/LoadMore.tsx | 0
.../src/{common => }/components/LoadMore/index.ts | 0
.../components/PageLayout/PageLayout.tsx | 0
.../{common => }/components/PageLayout/index.ts | 0
.../PageSectionHeader/PageSectionHeader.tsx | 6 +-
.../components/PageSectionHeader/index.ts | 0
.../components/PageTitle/PageTitle.tsx | 2 +-
.../src/{common => }/components/PageTitle/index.ts | 0
.../components/PageToolbar/PageToolbar.tsx | 0
.../ProcessInfoModal/ProcessInfoModal.tsx | 0
.../components/ProcessInfoModal/index.ts | 0
.../RequestDataEditor/RequestDataEditor.tsx | 0
.../RequestDataEditorController.ts | 0
.../components/RequestDataEditor/index.ts | 0
.../components/ServerErrors/ServerErrors.tsx | 18 +-
.../{common => }/components/ServerErrors/index.ts | 0
.../WorkflowInfoModal/WorkflowInfoModal.tsx | 0
.../components/WorkflowInfoModal/index.ts | 0
.../src/{common => }/components/styles.css | 0
.../contexts/BrandContext/BrandContext.ts | 0
.../contexts/KogitoAppContext/KogitoAppContext.ts | 4 +-
.../KogitoAppContext/KogitoAppContextProvider.tsx | 6 +-
.../contexts/KogitoAppContext/TestUserContext.ts | 0
.../contexts/KogitoAppContext/auth/Auth.ts | 0
.../KogitoAppContext/auth/KeycloakUserContext.ts | 0
.../contexts/KogitoAppContext/auth/index.ts | 0
.../contexts/KogitoAppContext/index.ts | 4 +-
.../{config => src}/declare.d.ts | 0
.../src/{common => }/ouiaTools/OuiaUtils.ts | 0
.../src/{common => }/ouiaTools/index.ts | 0
.../src/{common => }/utils/FormActionsUtils.tsx | 0
.../src/{common => }/utils/FormValidator.ts | 0
.../src/{common => }/utils/KeycloakClient.ts | 0
.../src/{common => }/utils/ModelConversionTool.ts | 0
.../src/{common => }/utils/Utils.tsx | 0
.../src/{common => }/utils/index.ts | 0
packages/runtime-tools-components/tsconfig.json | 2 +-
.../dev-webapp/secured-runtime/pom.xml | 1 +
.../dev-webapp/unsecured-runtime/pom.xml | 29 +
.../src/main/java/org/acme/message/Message.java} | 51 +-
.../src/main/java/org/acme/travel/Traveler.java | 98 ++
.../acme/travel/TravelerValidationService.java} | 14 +-
.../resources/META-INF/processSVG/travelers.svg | 936 ++++++++++++
.../src/main/resources/application.properties | 19 +-
.../main/resources/custom-forms-dev/hiring.config | 7 +
.../src/main/resources/custom-forms-dev/hiring.tsx | 204 +++
.../custom-forms-dev/hiring_ITInterview.config | 12 +
.../custom-forms-dev/hiring_ITInterview.html | 71 +
.../src/main/resources/travelers.bpmn | 515 +++++++
.../src/main/resources/travelers.drl} | 36 +-
.../package.json | 2 +-
.../src/authSessions/AuthSessionsService.ts | 2 +
.../src/forms/form-displayer-envelope.ts | 2 +-
.../src/jobs/Jobs.tsx | 22 +-
.../managementConsole/ManagementConsoleHome.tsx | 2 +-
.../ManagementConsolePageLayout.tsx | 7 +-
.../managementConsole/ManagementConsoleRoutes.tsx | 21 +-
.../src/navigation/Routes.ts | 11 +
.../ProcessDefinitionsList.tsx} | 76 +-
.../definitions/ProcessDefinitionsListPage.tsx} | 46 +-
.../src/process/details/ProcessDetails.tsx | 28 +-
.../src/process/form/ProcessDefinitionForm.tsx | 197 +++
.../src/process/form/ProcessDefinitionFormPage.tsx | 119 ++
.../src/process/index.ts | 2 +
.../src/process/list/ProcessList.tsx | 25 +-
.../src/runtime/RuntimeContext.tsx | 49 +-
.../src/runtime/RuntimeNav.tsx | 12 +-
.../src/runtime/RuntimePageLayoutContext.tsx | 14 +-
.../src/styles.css | 1 -
.../src/tasks/TaskDetails.tsx | 216 ++-
.../src/tasks/TaskDetailsPage.tsx | 9 +-
.../src/tasks/TaskForm.tsx | 83 +-
.../src/tasks/Tasks.tsx | 47 +-
.../src/tasks/TasksPage.tsx | 17 +-
.../src/tasks/components/FormNotification.tsx | 66 -
.../src/tasks/components/index.ts | 2 +-
.../src/utils/QueryUtils.ts | 43 -
.../static/resources/form-displayer.html | 7 +-
.../tsconfig.json | 5 +-
.../package.json | 1 -
.../resources/form-displayer.html | 8 +-
...sGatewayApi.ts => FormDetailsChannelApiImpl.ts} | 15 +-
.../src/channel/FormDetails/FormDetailsContext.ts | 8 +-
.../FormDetails/FormDetailsContextProvider.tsx | 17 +-
.../src/channel/FormDetails/index.ts | 2 +-
...istGatewayApi.ts => FormsListChannelApiImpl.ts} | 59 +-
.../src/channel/FormsList/FormsListContext.ts | 8 +-
.../channel/FormsList/FormsListContextProvider.tsx | 10 +-
.../src/channel/FormsList/index.ts | 4 +-
.../ProcessDefinitionListGatewayApi.ts | 107 --
.../ProcessDefinitionListQueries.ts | 43 -
.../src/channel/ProcessDefinitionList/index.ts | 21 -
.../channel/ProcessForm/ProcessFormGatewayApi.ts | 61 -
.../components/DevUI/DevUILayout/DevUILayout.tsx | 12 +-
.../components/DevUI/DevUIRoutes/DevUIRoutes.tsx | 4 +-
.../FormDetailsContainer/FormDetailsContainer.tsx | 62 +-
.../FormsListContainer/FormsListContainer.tsx | 20 +-
.../JobsManagementContainer.tsx | 18 +-
.../ProcessDefinitionListContainer.tsx | 40 +-
.../ProcessDetailsContainer.tsx | 25 +-
.../ProcessFormContainer/ProcessFormContainer.tsx | 73 +-
.../ProcessListContainer/ProcessListContainer.tsx | 24 +-
.../TaskFormContainer/TaskFormContainer.tsx | 73 +-
.../TaskListContainer.tsx} | 30 +-
.../components/contexts/ProcessContextProvider.tsx | 10 +-
.../contexts/TaskFormContextProvider.tsx | 9 +-
...extProvider.tsx => TaskListContextProvider.tsx} | 22 +-
.../ProcessDetailsPage/ProcessDetailsPage.tsx | 31 +-
.../pages/ProcessFormPage/ProcessFormPage.tsx | 144 +-
.../components/InlineEdit/InlineEdit.tsx | 21 +-
.../pages/ProcessesPage/ProcessesPage.tsx | 94 +-
.../pages/TaskDetailsPage/TaskDetailsPage.tsx | 18 +-
.../TaskListPage.tsx} | 36 +-
.../components/TaskListSwitchUser.tsx} | 4 +-
.../src/resources/form-displayer.ts | 2 +-
.../package.json | 1 -
.../api/FormDetailsApi.ts} | 9 +-
.../src/formDetails/api/FormDetailsChannelApi.ts} | 15 +-
.../src/formDetails/api/FormDetailsDriver.ts} | 15 +-
.../src/formDetails/api/FormDetailsEnvelopeApi.ts} | 21 +-
.../src/formDetails/api}/index.ts | 5 +-
.../embedded/EmbeddedFormDetails.tsx} | 50 +-
.../src/formDetails/embedded}/index.ts | 2 +-
.../envelope/FormDetailsEnvelope.tsx} | 43 +-
.../envelope/FormDetailsEnvelopeApiImpl.ts} | 34 +-
.../envelope/FormDetailsEnvelopeContext.ts} | 7 +-
.../envelope/FormDetailsEnvelopeView.tsx} | 48 +-
.../components/FormDetails/FormDetails.tsx | 233 +++
.../envelope/components/FormEditor/FormEditor.tsx | 103 ++
.../FormEditor/FormEditorController.tsx} | 31 +-
.../components/contexts/FormDetailsContext.tsx | 63 +
.../contexts/FormDetailsContextProvider.tsx} | 21 +-
.../formDetails/envelope/components/styles.css} | 8 +-
.../FormDisplayerContainer.tsx | 60 +
.../FormDisplayerContainer/utils/utils.ts} | 49 +-
.../src/formDetails/envelope}/index.ts | 2 +-
.../index.ts | 5 +-
.../src/formDisplayer/api/FormDisplayerApi.ts} | 13 +-
.../formDisplayer/api/FormDisplayerChannelApi.ts} | 6 +-
.../formDisplayer/api/FormDisplayerEnvelopeApi.ts} | 14 +-
.../src/formDisplayer/api}/index.ts | 5 +-
.../api/types.ts} | 54 +-
.../embedded/EmbeddedFormDisplayer.tsx | 133 ++
.../src/formDisplayer/embedded}/index.ts | 2 +-
.../envelope/FormDisplayerEnvelope.tsx | 52 +
.../envelope/FormDisplayerEnvelopeApiImpl.ts} | 54 +-
.../envelope/FormDisplayerEnvelopeContext.ts} | 7 +-
.../envelope/FormDisplayerEnvelopeView.tsx | 2 +-
.../components/ErrorBoundary/ErrorBoundary.tsx | 63 +
.../components/FormDisplayer/FormDisplayer.tsx | 2 +-
.../FormDisplayer/apis/InternalDisplayerApi.ts | 88 ++
.../components/FormDisplayer/apis}/index.ts | 2 +-
.../FormErrorsWrapper/FormErrorsWrapper.tsx | 82 ++
.../HtmlFormRenderer/HtmlFormRenderer.tsx | 2 +-
.../ReactFormRenderer/ReactFormRenderer.tsx | 129 ++
.../ResourcesContainer/ResourcesContainer.tsx | 2 +-
.../formDisplayer/envelope/components/styles.css} | 8 +-
.../src/formDisplayer/envelope}/index.ts | 5 +-
.../index.ts | 5 +-
.../src/formDisplayer/utils}/index.ts | 2 +-
.../src/formDisplayer/utils/utils.tsx | 70 +
.../api/FormsListApi.ts} | 9 +-
.../src/formsList/api/FormsListChannelApi.ts | 19 +-
.../api/FormsListEnvelopeApi.ts} | 21 +-
.../src/formsList/api}/index.ts | 4 +-
.../embedded/EmbeddedFormsList.tsx} | 53 +-
.../src/formsList/embedded}/index.ts | 2 +-
.../envelope/FormsListEnvelope.tsx} | 37 +-
.../envelope/FormsListEnvelopeApiImpl.ts} | 33 +-
.../envelope/FormsListEnvelopeContext.ts} | 11 +-
.../envelope/FormsListEnvelopeView.tsx} | 38 +-
.../envelope/components/FormCard/FormCard.tsx | 41 +-
.../components/FormsGallery/FormsGallery.tsx | 14 +-
.../envelope/components/FormsList/FormsList.tsx | 61 +-
.../FormsListToolbar/FormsListToolbar.tsx} | 102 +-
.../components/FormsListUtils/FormsListUtils.tsx | 3 +-
.../envelope/components/FormsTable/FormsTable.tsx | 79 +-
.../src/formsList/envelope}/index.ts | 2 +-
.../{processDefinitionList => formsList}/index.ts | 5 +-
.../src/jobsManagement/api/JobsManagementApi.ts | 8 +
.../jobsManagement/api/JobsManagementChannelApi.ts | 16 +-
.../src/jobsManagement/api/JobsManagementDriver.ts | 40 -
.../api/JobsManagementEnvelopeApi.ts | 10 +-
.../src/jobsManagement/api/index.ts | 1 -
.../embedded/EmbeddedJobsManagement.tsx | 9 +-
.../embedded/JobsManagementChannelApiImpl.ts | 63 -
.../src/jobsManagement/embedded/index.ts | 1 -
.../envelope/JobsManagementEnvelopeView.tsx | 9 +-
.../envelope/JobsManagementEnvelopeViewDriver.ts | 64 -
.../components/JobsManagement/JobsManagement.tsx | 101 +-
.../JobsManagementTable/JobsManagementTable.tsx | 14 +-
.../JobsManagementToolbar.tsx | 9 -
.../api/ProcessDefinitionListChannelApi.ts | 29 -
.../api/ProcessDefinitionListDriver.ts | 29 -
.../src/processDefinitionList/api/index.ts | 22 -
.../ProcessDefinitionListChannelApiImpl.ts | 40 -
.../ProcessDefinitionListEnvelopeViewDriver.ts | 40 -
.../ProcessDefinitionList.tsx | 125 --
.../src/processDefinitionList/envelope/index.ts | 19 -
.../api/ProcessDefinitionsListApi.ts} | 11 +-
.../api/ProcessDefinitionsListChannelApi.ts | 47 +
.../api/ProcessDefinitionsListEnvelopeApi.ts} | 16 +-
.../src/processDefinitionsList/api}/index.ts | 4 +-
.../embedded/EmbeddedProcessDefinitionsList.tsx} | 46 +-
.../embedded/index.ts | 2 +-
.../envelope/ProcessDefinitionsListEnvelope.tsx} | 42 +-
.../ProcessDefinitionsListEnvelopeApiImpl.ts} | 31 +-
.../ProcessDefinitionsListEnvelopeContext.ts} | 4 +-
.../ProcessDefinitionsListEnvelopeView.tsx} | 38 +-
.../envelope/components/ProcessDefinitionsList.tsx | 165 +++
.../components/ProcessDefinitionsListToolbar.tsx | 170 +++
.../components/ProcessDefinitionsListUtils.tsx} | 2 +-
.../envelope/components/styles.css | 23 +-
.../src/processDefinitionsList/envelope}/index.ts | 2 +-
.../index.ts | 0
.../src/processDetails/api/ProcessDetailsApi.ts | 4 +
.../processDetails/api/ProcessDetailsChannelApi.ts | 28 +-
.../src/processDetails/api/ProcessDetailsDriver.ts | 48 -
.../src/processDetails/api/index.ts | 1 -
.../embedded/EmbeddedProcessDetails.tsx | 22 +-
.../embedded/ProcessDetailsChannelApiImpl.ts | 93 --
.../src/processDetails/embedded/index.ts | 1 -
.../envelope/ProcessDetailsEnvelopeView.tsx | 8 +-
.../envelope/ProcessDetailsEnvelopeViewDriver.ts | 91 --
.../components/JobActionsKebab/JobActionsKebab.tsx | 14 +-
.../envelope/components/JobsPanel/JobsPanel.tsx | 22 +-
.../components/ProcessDetails/ProcessDetails.tsx | 355 ++---
.../ProcessDetailsNodeTrigger.tsx | 29 +-
.../ProcessDetailsPanel/ProcessDetailsPanel.tsx | 27 +-
.../ProcessDetailsTimelinePanel.tsx | 31 +-
.../components/ProcessDiagram/ProcessDiagram.tsx | 72 +-
.../ProcessVariables/ProcessVariables.tsx | 7 +-
.../src/processDetails/hooks/useController.ts | 29 -
.../src/processDetails/utils/Utils.tsx | 36 +-
.../src/processForm/api/ProcessFormChannelApi.ts | 26 +-
.../src/processForm/api/ProcessFormDriver.ts | 29 -
.../src/processForm/api/ProcessFormEnvelopeApi.ts | 8 +-
.../src/processForm/api/index.ts | 1 -
.../processForm/embedded/EmbeddedProcessForm.tsx | 24 +-
.../embedded/EmbeddedProcessFormChannelApiImpl.ts | 36 -
.../processForm/envelope/ProcessFormEnvelope.tsx | 10 +-
.../envelope/ProcessFormEnvelopeView.tsx | 12 +-
.../envelope/ProcessFormEnvelopeViewDriver.ts | 40 -
.../CustomProcessFormDisplayer.tsx | 105 +-
.../components/{ProcessForm => }/ProcessForm.tsx | 137 +-
.../src/processForm/envelope/styles.css | 4 +
.../src/processList/api/ProcessListApi.ts | 8 +
.../src/processList/api/ProcessListChannelApi.ts | 17 +-
.../src/processList/api/ProcessListDriver.ts | 42 -
.../src/processList/api/ProcessListEnvelopeApi.ts | 7 +-
.../src/processList/api/index.ts | 1 -
.../processList/embedded/EmbeddedProcessList.tsx | 12 +-
.../embedded/ProcessListChannelApiImpl.ts | 69 -
.../envelope/ProcessListEnvelopeApiImpl.ts | 1 -
.../envelope/ProcessListEnvelopeView.tsx | 14 +-
.../envelope/ProcessListEnvelopeViewDriver.ts | 64 -
.../components/ProcessList/ProcessList.tsx | 32 +-
.../ProcessListChildTable.tsx | 37 +-
.../ProcessListTable/ProcessListTable.tsx | 65 +-
.../ProcessListToolbar/ProcessListToolbar.tsx | 79 +-
.../src/processList/envelope/components/styles.css | 7 -
.../envelope/TaskDetailsEnvelopeApiImpl.ts | 15 +
.../envelope/components/TaskDetails.tsx | 26 +-
.../taskDetails/envelope/components/TaskState.tsx | 7 +-
.../src/taskForm/api/TaskFormChannelApi.ts | 9 +-
.../src/taskForm/api/index.ts | 1 -
.../src/taskForm/embedded/EmbeddedTaskForm.tsx | 14 +-
.../src/taskForm/envelope/TaskFormEnvelopeView.tsx | 110 +-
.../envelope/TaskFormEnvelopeViewDriver.ts | 44 -
.../CustomTaskFormDisplayer.tsx | 24 +-
.../components/EmptyTaskForm/EmptyTaskForm.tsx | 39 +-
.../envelope/components/TaskForm/TaskForm.tsx | 55 +-
.../TaskFormRenderer/TaskFormRenderer.tsx | 23 +-
.../src/taskInbox/api/TaskInboxChannelApi.ts | 59 -
.../src/taskInbox/api/TaskInboxDriver.ts | 31 -
.../src/taskInbox/api/TaskInboxEnvelopeApi.ts | 75 -
.../src/taskInbox/api/index.ts | 22 -
.../taskInbox/embedded/TaskInboxChannelApiImpl.ts | 47 -
.../envelope/TaskInboxEnvelopeViewDriver.ts | 48 -
.../api/TaskListApi.ts} | 22 +-
.../src/taskList/api/TaskListChannelApi.ts | 99 ++
.../api/TaskListEnvelopeApi.ts} | 33 +-
.../src/taskList/api}/index.ts | 4 +-
.../embedded/EmbeddedTaskList.tsx} | 29 +-
.../envelope => taskList/embedded}/index.ts | 2 +-
.../envelope/TaskListEnvelope.tsx} | 39 +-
.../envelope/TaskListEnvelopeApiImpl.ts} | 24 +-
.../envelope/TaskListEnvelopeContext.ts} | 2 +-
.../envelope/TaskListEnvelopeView.tsx} | 27 +-
.../components/TaskDescription/TaskDescription.tsx | 0
.../envelope/components/TaskList/TaskList.tsx} | 69 +-
.../TaskListToolbar/TaskListToolbar.tsx} | 12 +-
.../envelope/components/utils/TaskListUtils.tsx} | 0
.../embedded => taskList/envelope}/index.ts | 2 +-
.../src/{taskInbox => taskList}/index.ts | 0
.../src/gatewayApi/apis.tsx | 592 --------
.../src/gatewayApi/dataIndexQueries.ts | 442 ++++++
.../src/gatewayApi/index.ts | 3 +-
.../src/gatewayApi/restApis.ts | 113 ++
.../src/graphql/types.tsx | 22 +
.../runtime-tools-process-gateway-api/src/types.ts | 45 +-
.../package.json | 1 -
.../JobsManagementChannelApiImpl.tsx | 108 ++
.../src/JobsManagement/JobsManagementContext.ts | 8 +-
.../JobsManagementContextProvider.tsx | 10 +-
.../src/JobsManagement/JobsManagementGatewayApi.ts | 133 --
.../src/JobsManagement/JobsManagementQueries.ts | 74 -
.../src/JobsManagement/index.ts | 2 +-
.../ProcessDefinitionsListChannelApiImpl.ts | 128 ++
.../ProcessDefinitionsListContext.ts} | 14 +-
.../ProcessDefinitionsListContextProvider.tsx} | 26 +-
.../src/ProcessDefinitionsList}/index.ts | 4 +-
...sQueries.ts => ProcessDetailsChannelApiImpl.ts} | 147 +-
.../src/ProcessDetails/ProcessDetailsContext.ts | 8 +-
.../ProcessDetailsContextProvider.tsx | 7 +-
.../src/ProcessDetails/ProcessDetailsGatewayApi.ts | 181 ---
.../src/ProcessDetails/index.ts | 2 +-
.../src/ProcessForm/ProcessFormChannelApiImpl.ts | 88 ++
.../src}/ProcessForm/ProcessFormContext.ts | 10 +-
.../ProcessForm/ProcessFormContextProvider.tsx | 19 +-
.../src/ProcessForm}/index.ts | 4 +-
.../src/ProcessList/ProcessListChannelApiImpl.ts | 157 ++
.../src/ProcessList/ProcessListContext.ts | 8 +-
.../src/ProcessList/ProcessListContextProvider.tsx | 11 +-
.../src/ProcessList/ProcessListGatewayApi.ts | 185 ---
.../src/ProcessList/ProcessListQueries.ts | 95 --
.../src/ProcessList/index.ts | 2 +-
...FormGatewayApi.ts => TaskFormChannelApiImpl.ts} | 198 ++-
.../src/TaskForms/TaskFormContext.tsx | 6 +-
.../src/TaskForms/TaskFormContextProvider.tsx | 15 +-
.../src/TaskForms/index.ts | 2 +-
.../src/TaskInbox/TaskInboxContext.tsx | 26 -
.../src/TaskInbox/TaskInboxGatewayApi.ts | 149 --
.../src/TaskInbox/TaskInboxQueries.ts | 113 --
.../src/TaskInbox/index.ts | 22 -
.../src/TaskList/TaskListChannelApiImpl.ts | 146 ++
.../src/TaskList/TaskListContext.tsx} | 9 +-
.../TaskListContextProvider.tsx} | 18 +-
.../src/TaskList}/index.ts | 4 +-
.../src/utils/QueryUtils.ts | 12 +-
.../api/CustomDashboardListChannelApi.ts | 2 +-
.../envelope/FormDisplayerEnvelopeView.tsx | 2 +-
.../components/FormDisplayer/FormDisplayer.tsx | 2 +-
.../HtmlFormRenderer/HtmlFormRenderer.tsx | 2 +-
.../ResourcesContainer/ResourcesContainer.tsx | 2 +-
.../src/formsList/api/FormsListChannelApi.ts | 2 +-
.../src/formsList/api/FormsListDriver.ts | 2 +-
.../envelope/FormsListEnvelopeViewDriver.ts | 2 +-
.../envelope/components/FormCard/FormCard.tsx | 2 +-
.../components/FormsGallery/FormsGallery.tsx | 2 +-
.../envelope/components/FormsList/FormsList.tsx | 2 +-
.../components/FormsListUtils/FormsListUtils.tsx | 2 +-
.../envelope/components/FormsTable/FormsTable.tsx | 2 +-
.../package.json | 1 -
.../package.json | 1 -
packages/sonataflow-deployment-webapp/package.json | 1 -
.../src/index.tsx | 2 +-
packages/webpack-base/package.json | 2 +
packages/webpack-base/webpack.common.config.js | 6 +-
pnpm-lock.yaml | 370 ++---
repo/graph.dot | 19 +-
repo/graph.json | 71 +-
394 files changed, 9658 insertions(+), 6493 deletions(-)
diff --git a/.gitignore b/.gitignore
index 6facd1e436b..8b62c772093 100644
--- a/.gitignore
+++ b/.gitignore
@@ -338,6 +338,7 @@ packages/python-venv/venv
# devbox
.devbox
+.venv
# turbo
.turbo
diff --git a/.rat-excludes b/.rat-excludes
index e81b5799354..ef1d467b019 100644
--- a/.rat-excludes
+++ b/.rat-excludes
@@ -510,8 +510,8 @@ README.md
ImportJavaClasses.test.tsx.snap
# packages/jbpm-quarkus-devui/jbpm-quarkus-devui-parent.iml
jbpm-quarkus-devui-parent.iml
-# packages/jbpm-quarkus-devui/dev/src/main/resources/custom-forms-dev/hiring_ITInterview.html
-hiring_ITInterview.html
+# packages/jbpm-quarkus-devui/dev/src/main/resources/custom-forms-dev/hiring_ITInterview.tsx
+hiring_ITInterview.tsx
# packages/jbpm-quarkus-devui/dev/src/main/resources/custom-forms-dev/hiring_ITInterview.config
hiring_ITInterview.config
# packages/jbpm-quarkus-devui/dev/src/main/resources/custom-forms-dev/hiring.tsx
@@ -522,6 +522,14 @@ hiring.config
hiring_HRInterview.config
# packages/jbpm-quarkus-devui/jbpm-quarkus-devui-runtime/src/test/resources/forms/hiring_ITInterview.config
hiring_ITInterview.config
+# packages/runtime-tools-management-console-webapp/dev-webapp/unsecured-runtime/src/main/resources/custom-forms-dev/hiring_ITInterview.html
+hiring_ITInterview.html
+# packages/runtime-tools-management-console-webapp/dev-webapp/unsecured-runtime/src/main/resources/custom-forms-dev/hiring_ITInterview.config
+hiring_ITInterview.config
+# packages/runtime-tools-management-console-webapp/dev-webapp/unsecured-runtime/src/main/resources/custom-forms-dev/hiring.tsx
+hiring.tsx
+# packages/runtime-tools-management-console-webapp/dev-webapp/unsecured-runtime/src/main/resources/custom-forms-dev/hiring.config
+hiring.config
# packages/json-yaml-language-service/tests/__snapshots__/EditorJsonLanguageService.test.ts.snap
EditorJsonLanguageService.test.ts.snap
# packages/json-yaml-language-service/tests/__snapshots__/EditorYamlLanguageService.test.ts.snap
diff --git a/packages/jbpm-quarkus-devui/dev/src/main/resources/META-INF/processSVG/hiring.svg b/packages/jbpm-quarkus-devui/dev/src/main/resources/META-INF/processSVG/hiring.svg
new file mode 100644
index 00000000000..46854e4299a
--- /dev/null
+++ b/packages/jbpm-quarkus-devui/dev/src/main/resources/META-INF/processSVG/hiring.svg
@@ -0,0 +1,1518 @@
+<svg
+ version="1.1"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ width="1435"
+ height="521"
+ viewBox="0 0 1435 521"
+>
+ <defs />
+ <g transform="matrix(1,0,0,1,0,0)">
+ <g>
+ <g>
+ <g>
+ <path
+ fill="none"
+ stroke="#d3d3d3"
+ paint-order="fill stroke markers"
+ d=" M 0 0 L 1200 0"
+ stroke-miterlimit="10"
+ stroke-opacity="0.8"
+ stroke-dasharray="5"
+ />
+ </g>
+ <g>
+ <path
+ fill="none"
+ stroke="#d3d3d3"
+ paint-order="fill stroke markers"
+ d=" M 0 0 L 0 800"
+ stroke-miterlimit="10"
+ stroke-opacity="0.8"
+ stroke-dasharray="5"
+ />
+ </g>
+ </g>
+ <g
+ id="_1639F738-45F3-4CD6-A80E-CCEBAA605D56"
+ bpmn2nodeid="_1639F738-45F3-4CD6-A80E-CCEBAA605D56"
+ transform="matrix(1,0,0,1,72,35.00000000000006)"
+ >
+ <g>
+ <path fill="none" stroke="none" />
+ </g>
+ <g transform="matrix(0.125,0,0,0.125,0,0)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#e8fae6"
+ stroke="black"
+ id="_1639F738-45F3-4CD6-A80E-CCEBAA605D56?shapeType=BACKGROUND"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 444 224 C 444 263.9 434.2 300.8 414.4 334.5 C 394.7 368.2 368 394.9 334.4 414.5 C 300.79999999999995 434.1 263.9 444 224 444 C 184.10000000000002 444 147.2 434.2 113.5 414.4 C 79.8 394.7 53.1 368 33.5 334.4 C 13.899999999999999 300.79999999999995 4 263.9 4 224 C 4 184.10000000000002 13.8 147.2 33.6 113.5 C 53.400000000000006 79.80000000000001 80.1 53.1 113.6 33.5 C 147.1 13.899999999999999 184.1 4 224 4 C 263.9 4 300.8 13.8 334.5 33.6 C 368.2 53.400000000000006 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#4aa241"
+ stroke="black"
+ id="_1639F738-45F3-4CD6-A80E-CCEBAA605D56?shapeType=BORDER&renderType=FILL"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 224 0 C 100.3 0 0 100.3 0 224 C 0 347.7 100.3 448 224 448 C 347.7 448 448 347.7 448 224 C 448 100.30000000000001 347.7 0 224 0 Z M 0 0 M 224 432 C 109.1 432 16 338.9 16 224 C 16 109.10000000000002 109.1 16 224 16 C 338.9 16 432 109.1 432 224 C 432 338.9 338.9 432 224 432 Z"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ </g>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,28,61)" />
+ </g>
+ <g transform="matrix(1,0,0,1,72,35.00000000000006)" />
+ <g
+ id="_B8C4F63C-81AD-4291-9C1B-84967277EEF6"
+ bpmn2nodeid="_B8C4F63C-81AD-4291-9C1B-84967277EEF6"
+ transform="matrix(1,0,0,1,628,12.000000000000057)"
+ >
+ <g>
+ <path fill="none" stroke="none" />
+ </g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#ffffff"
+ stroke="none"
+ id="_B8C4F63C-81AD-4291-9C1B-84967277EEF6?shapeType=BACKGROUND"
+ paint-order="stroke fill markers"
+ d=" M 2 0 L 152 0 L 152 0 A 2 2 0 0 1 154 2 L 154 100 L 154 100 A 2 2 0 0 1 152 102 L 2 102 L 2 102 A 2 2 0 0 1 0 100 L 0 2 L 0 2.0000000000000004 A 2 2 0 0 1 1.9999999999999996 0 Z"
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="none"
+ stroke="#000000"
+ id="_B8C4F63C-81AD-4291-9C1B-84967277EEF6?shapeType=BORDER&renderType=STROKE"
+ paint-order="fill stroke markers"
+ d=" M 2 0 L 152 0 L 152 0 A 2 2 0 0 1 154 2 L 154 100 L 154 100 A 2 2 0 0 1 152 102 L 2 102 L 2 102 A 2 2 0 0 1 0 100 L 0 2 L 0 2.0000000000000004 A 2 2 0 0 1 1.9999999999999996 0 Z"
+ stroke-miterlimit="10"
+ stroke-width="1.5"
+ stroke-dasharray=""
+ />
+ </g>
+ <g>
+ <g transform="matrix(0.06,0,0,0.06,9.4,9.4)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#393f44"
+ stroke="black"
+ id="_B8C4F63C-81AD-4291-9C1B-84967277EEF6_task__uLWC__XJzN"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 16 445.2101 C 16 440.86867 18.784312 431.12906000000004 22.001325 424.21728 C 35.767643 394.6402 77.282944 359.28049 129 333.08362 C 144.51625 325.22398 157.34689 319.96394 167.80739 317.17416 C 171.93153 316.07426 175.72913 314.41389999999996 176.5251 313.36265 C 178.89361 310.23449999999997 180.91404 302.90781 181.72673 294.5 L 182.5 286.5 L 178.50715 283.45457 C 166.30327 274.14645 154.2837 251.67767 148.03953 226.5 C 145.61086 216.70715 145.05603000000002 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,4.039999999999992,13.680000000000007)">
+ <g transform="matrix(0.04,0,0,0.04,63.36,69.12)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path fill="none" stroke="none" />
+ </g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path fill="none" stroke="none" />
+ </g>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,35,43.5)">
+ <text
+ fill="#000000"
+ stroke="none"
+ font-family="Open Sans"
+ font-size="12pt"
+ font-style="normal"
+ font-weight="normal"
+ text-decoration="normal"
+ x="47.2265625"
+ y="12"
+ text-anchor="middle"
+ dominant-baseline="alphabetic"
+ >HR Interview</text>
+ </g>
+ <g
+ id="_116F3C54-A10E-4952-9E08-1CACE74CED0B"
+ bpmn2nodeid="_116F3C54-A10E-4952-9E08-1CACE74CED0B"
+ transform="matrix(1,0,0,1,60,74)"
+ >
+ <g>
+ <path fill="none" stroke="none" />
+ </g>
+ <g transform="matrix(0.125,0,0,0.125,0,0)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#fbefcf"
+ stroke="black"
+ id="_116F3C54-A10E-4952-9E08-1CACE74CED0B?shapeType=BACKGROUND"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 444 224 C 444 263.9 434.2 300.8 414.4 334.5 C 394.7 368.2 368 394.9 334.4 414.5 C 300.79999999999995 434.1 263.9 444 224 444 C 184.10000000000002 444 147.2 434.2 113.5 414.4 C 79.8 394.7 53.1 368 33.5 334.4 C 13.899999999999999 300.79999999999995 4 263.9 4 224 C 4 184.10000000000002 13.8 147.2 33.6 113.5 C 53.400000000000006 79.80000000000001 80.1 53.1 113.6 33.5 C 147.1 13.899999999999999 184.1 4 224 4 C 263.9 4 300.8 13.8 334.5 33.6 C 368.2 53.40000000000000 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#e5a000"
+ stroke="none"
+ id="_116F3C54-A10E-4952-9E08-1CACE74CED0B?shapeType=BORDER&renderType=FILL"
+ paint-order="stroke fill markers"
+ d=" M 0 0 M 224 408 C 122.5 408 40 325.5 40 224 C 40 122.5 122.5 40 224 40 C 325.5 40 408 122.5 408 224 C 408 325.5 325.5 408 224 408 Z M 0 0 M 224 56 C 131.4 56 56 131.4 56 224 C 56 316.6 131.4 392 224 392 C 316.6 392 392 316.6 392 224 C 392 131.39999999999998 316.6 56 224 56 Z M 0 0 M 224 16 C 252.1 16 279.3 21.5 305 32.3 C 329.8 42.8 352 57.8 371.1 76.9 C 390.20000000000005 96.00000000000001 405.20000000000005 118.30000000000001 415.70000000000005 143 C 426.5000000 [...]
+ />
+ </g>
+ </g>
+ </g>
+ <g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#e5a000"
+ stroke="black"
+ id="_116F3C54-A10E-4952-9E08-1CACE74CED0B_wait"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 240.2 176.7 L 240.2 232.7 C 240.2 233.89999999999998 239.79999999999998 234.79999999999998 239.1 235.6 C 238.4 236.4 237.4 236.7 236.2 236.7 L 196.2 236.7 C 195 236.7 194.1 236.29999999999998 193.29999999999998 235.6 C 192.49999999999997 234.9 192.2 233.9 192.2 232.7 L 192.2 224.7 C 192.2 223.5 192.6 222.6 193.29999999999998 221.79999999999998 C 193.99999999999997 220.99999999999997 194.99999999999997 220.7 196.2 220.7 L 224.2 220.7 L 224.2 176.7 C 224.2 1 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ </g>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,28,61)" />
+ </g>
+ </g>
+ <g
+ id="_8962C15F-55EC-46F7-B926-5D5A1FD8D35E"
+ bpmn2nodeid="_8962C15F-55EC-46F7-B926-5D5A1FD8D35E"
+ transform="matrix(1,0,0,1,824,12.000000000000057)"
+ >
+ <g>
+ <path fill="none" stroke="none" />
+ </g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#ffffff"
+ stroke="none"
+ id="_8962C15F-55EC-46F7-B926-5D5A1FD8D35E?shapeType=BACKGROUND"
+ paint-order="stroke fill markers"
+ d=" M 2 0 L 152 0 L 152 0 A 2 2 0 0 1 154 2 L 154 100 L 154 100 A 2 2 0 0 1 152 102 L 2 102 L 2 102 A 2 2 0 0 1 0 100 L 0 2 L 0 2.0000000000000004 A 2 2 0 0 1 1.9999999999999996 0 Z"
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="none"
+ stroke="#000000"
+ id="_8962C15F-55EC-46F7-B926-5D5A1FD8D35E?shapeType=BORDER&renderType=STROKE"
+ paint-order="fill stroke markers"
+ d=" M 2 0 L 152 0 L 152 0 A 2 2 0 0 1 154 2 L 154 100 L 154 100 A 2 2 0 0 1 152 102 L 2 102 L 2 102 A 2 2 0 0 1 0 100 L 0 2 L 0 2.0000000000000004 A 2 2 0 0 1 1.9999999999999996 0 Z"
+ stroke-miterlimit="10"
+ stroke-width="1.5"
+ stroke-dasharray=""
+ />
+ </g>
+ <g>
+ <g transform="matrix(0.06,0,0,0.06,9.4,9.4)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#393f44"
+ stroke="black"
+ id="_8962C15F-55EC-46F7-B926-5D5A1FD8D35E_task__uLWC__XJzN"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 16 445.2101 C 16 440.86867 18.784312 431.12906000000004 22.001325 424.21728 C 35.767643 394.6402 77.282944 359.28049 129 333.08362 C 144.51625 325.22398 157.34689 319.96394 167.80739 317.17416 C 171.93153 316.07426 175.72913 314.41389999999996 176.5251 313.36265 C 178.89361 310.23449999999997 180.91404 302.90781 181.72673 294.5 L 182.5 286.5 L 178.50715 283.45457 C 166.30327 274.14645 154.2837 251.67767 148.03953 226.5 C 145.61086 216.70715 145.05603000000002 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,4.039999999999992,13.680000000000007)">
+ <g transform="matrix(0.04,0,0,0.04,63.36,69.12)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path fill="none" stroke="none" />
+ </g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path fill="none" stroke="none" />
+ </g>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,35,43.5)">
+ <text
+ fill="#000000"
+ stroke="none"
+ font-family="Open Sans"
+ font-size="12pt"
+ font-style="normal"
+ font-weight="normal"
+ text-decoration="normal"
+ x="43.03515625"
+ y="12"
+ text-anchor="middle"
+ dominant-baseline="alphabetic"
+ >IT Interview</text>
+ </g>
+ <g
+ id="_B375FFE6-D0A8-4E4F-A7AA-8B1E8B861E0D"
+ bpmn2nodeid="_B375FFE6-D0A8-4E4F-A7AA-8B1E8B861E0D"
+ transform="matrix(1,0,0,1,72,74)"
+ >
+ <g>
+ <path fill="none" stroke="none" />
+ </g>
+ <g transform="matrix(0.125,0,0,0.125,0,0)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#fbefcf"
+ stroke="black"
+ id="_B375FFE6-D0A8-4E4F-A7AA-8B1E8B861E0D?shapeType=BACKGROUND"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 444 224 C 444 263.9 434.2 300.8 414.4 334.5 C 394.7 368.2 368 394.9 334.4 414.5 C 300.79999999999995 434.1 263.9 444 224 444 C 184.10000000000002 444 147.2 434.2 113.5 414.4 C 79.8 394.7 53.1 368 33.5 334.4 C 13.899999999999999 300.79999999999995 4 263.9 4 224 C 4 184.10000000000002 13.8 147.2 33.6 113.5 C 53.400000000000006 79.80000000000001 80.1 53.1 113.6 33.5 C 147.1 13.899999999999999 184.1 4 224 4 C 263.9 4 300.8 13.8 334.5 33.6 C 368.2 53.40000000000000 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#e5a000"
+ stroke="none"
+ id="_B375FFE6-D0A8-4E4F-A7AA-8B1E8B861E0D?shapeType=BORDER&renderType=FILL"
+ paint-order="stroke fill markers"
+ d=" M 0 0 M 224 408 C 122.5 408 40 325.5 40 224 C 40 122.5 122.5 40 224 40 C 325.5 40 408 122.5 408 224 C 408 325.5 325.5 408 224 408 Z M 0 0 M 224 56 C 131.4 56 56 131.4 56 224 C 56 316.6 131.4 392 224 392 C 316.6 392 392 316.6 392 224 C 392 131.39999999999998 316.6 56 224 56 Z M 0 0 M 224 16 C 252.1 16 279.3 21.5 305 32.3 C 329.8 42.8 352 57.8 371.1 76.9 C 390.20000000000005 96.00000000000001 405.20000000000005 118.30000000000001 415.70000000000005 143 C 426.5000000 [...]
+ />
+ </g>
+ </g>
+ </g>
+ <g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#e5a000"
+ stroke="black"
+ id="_B375FFE6-D0A8-4E4F-A7AA-8B1E8B861E0D_wait"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 240.2 176.7 L 240.2 232.7 C 240.2 233.89999999999998 239.79999999999998 234.79999999999998 239.1 235.6 C 238.4 236.4 237.4 236.7 236.2 236.7 L 196.2 236.7 C 195 236.7 194.1 236.29999999999998 193.29999999999998 235.6 C 192.49999999999997 234.9 192.2 233.9 192.2 232.7 L 192.2 224.7 C 192.2 223.5 192.6 222.6 193.29999999999998 221.79999999999998 C 193.99999999999997 220.99999999999997 194.99999999999997 220.7 196.2 220.7 L 224.2 220.7 L 224.2 176.7 C 224.2 1 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ </g>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,28,61)" />
+ </g>
+ </g>
+ <g
+ id="_5BDBE48C-CC83-46A9-9D56-F846F8FC1045"
+ bpmn2nodeid="_5BDBE48C-CC83-46A9-9D56-F846F8FC1045"
+ transform="matrix(1,0,0,1,162.75,12.000000000000057)"
+ >
+ <g>
+ <path fill="none" stroke="none" />
+ </g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#ffffff"
+ stroke="none"
+ id="_5BDBE48C-CC83-46A9-9D56-F846F8FC1045?shapeType=BACKGROUND"
+ paint-order="stroke fill markers"
+ d=" M 2 0 L 152 0 L 152 0 A 2 2 0 0 1 154 2 L 154 100 L 154 100 A 2 2 0 0 1 152 102 L 2 102 L 2 102 A 2 2 0 0 1 0 100 L 0 2 L 0 2.0000000000000004 A 2 2 0 0 1 1.9999999999999996 0 Z"
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="none"
+ stroke="#000000"
+ id="_5BDBE48C-CC83-46A9-9D56-F846F8FC1045?shapeType=BORDER&renderType=STROKE"
+ paint-order="fill stroke markers"
+ d=" M 2 0 L 152 0 L 152 0 A 2 2 0 0 1 154 2 L 154 100 L 154 100 A 2 2 0 0 1 152 102 L 2 102 L 2 102 A 2 2 0 0 1 0 100 L 0 2 L 0 2.0000000000000004 A 2 2 0 0 1 1.9999999999999996 0 Z"
+ stroke-miterlimit="10"
+ stroke-width="1.5"
+ stroke-dasharray=""
+ />
+ </g>
+ <g>
+ <g transform="matrix(0.06,0,0,0.06,9.4,9.4)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#393f44"
+ stroke="black"
+ id="_5BDBE48C-CC83-46A9-9D56-F846F8FC1045_task__2UXp__ZM2l"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 197.3 130.2 C 194.4 127.29999999999998 189.60000000000002 127.29999999999998 186.70000000000002 130.2 L 130.20000000000002 186.7 C 127.30000000000001 189.6 127.30000000000001 194.39999999999998 130.20000000000002 197.29999999999998 L 186.70000000000002 253.79999999999998 C 188.10000000000002 255.29999999999998 190.10000000000002 255.99999999999997 192.00000000000003 255.99999999999997 C 193.90000000000003 255.99999999999997 195.90000000000003 255.2999999999999 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#393f44"
+ stroke="black"
+ id="_5BDBE48C-CC83-46A9-9D56-F846F8FC1045_task__2UXp__RTEX"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 261.3 130.2 C 258.40000000000003 127.29999999999998 253.60000000000002 127.29999999999998 250.70000000000002 130.2 C 247.8 133.1 247.8 137.89999999999998 250.70000000000002 140.79999999999998 L 301.8 191.89999999999998 L 250.7 243 C 247.79999999999998 245.9 247.79999999999998 250.7 250.7 253.6 C 252.1 255.29999999999998 254.1 256 256 256 C 257.9 256 259.9 255.3 261.3 253.8 L 317.8 197.3 C 320.7 194.4 320.7 189.60000000000002 317.8 186.70000000000002 L 261.3 130.2 Z"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#393f44"
+ stroke="black"
+ id="_5BDBE48C-CC83-46A9-9D56-F846F8FC1045_task__2UXp__lCVI"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 400 32 C 400 32 152.8 32 128 32 C 62 32 64 96 64 96 L 64 288 L 1 288 C 1 288 -4 416 78 416 L 320 416 C 368 416 384 368 384 336 C 384 314.2 384 224.4 384 160 L 448 160 L 448 96 C 448 96 449 32 400 32 Z M 0 0 M 78 383.9 C 68.5 383.9 61.6 381.09999999999997 55.5 374.9 C 43.4 362.4 37.5 339.59999999999997 34.9 320 L 256.9 320 C 257.09999999999997 322.7 257.29999999999995 325.4 257.59999999999997 328.2 C 259.99999999999994 351.59999999999997 264.7 370.0999999999999 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,35.83203125,43.5)">
+ <text
+ fill="#000000"
+ stroke="none"
+ font-family="Open Sans"
+ font-size="12pt"
+ font-style="normal"
+ font-weight="normal"
+ text-decoration="normal"
+ x="41.16796875"
+ y="12"
+ text-anchor="middle"
+ dominant-baseline="alphabetic"
+ >New Hiring</text>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,162.75,12.000000000000057)" />
+ <g
+ id="_834B21EF-9229-44F8-A5DB-D96EBB39A347"
+ bpmn2nodeid="_834B21EF-9229-44F8-A5DB-D96EBB39A347"
+ transform="matrix(1,0,0,1,746,288.00000000000006)"
+ >
+ <g>
+ <path fill="none" stroke="none" />
+ </g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#ffffff"
+ stroke="none"
+ id="_834B21EF-9229-44F8-A5DB-D96EBB39A347?shapeType=BACKGROUND"
+ paint-order="stroke fill markers"
+ d=" M 2 0 L 152 0 L 152 0 A 2 2 0 0 1 154 2 L 154 100 L 154 100 A 2 2 0 0 1 152 102 L 2 102 L 2 102 A 2 2 0 0 1 0 100 L 0 2 L 0 2.0000000000000004 A 2 2 0 0 1 1.9999999999999996 0 Z"
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="none"
+ stroke="#000000"
+ id="_834B21EF-9229-44F8-A5DB-D96EBB39A347?shapeType=BORDER&renderType=STROKE"
+ paint-order="fill stroke markers"
+ d=" M 2 0 L 152 0 L 152 0 A 2 2 0 0 1 154 2 L 154 100 L 154 100 A 2 2 0 0 1 152 102 L 2 102 L 2 102 A 2 2 0 0 1 0 100 L 0 2 L 0 2.0000000000000004 A 2 2 0 0 1 1.9999999999999996 0 Z"
+ stroke-miterlimit="10"
+ stroke-width="1.5"
+ stroke-dasharray=""
+ />
+ </g>
+ <g>
+ <g transform="matrix(0.06,0,0,0.06,9.4,9.4)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#393f44"
+ stroke="black"
+ id="_834B21EF-9229-44F8-A5DB-D96EBB39A347_task__2UXp__ZM2l"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 197.3 130.2 C 194.4 127.29999999999998 189.60000000000002 127.29999999999998 186.70000000000002 130.2 L 130.20000000000002 186.7 C 127.30000000000001 189.6 127.30000000000001 194.39999999999998 130.20000000000002 197.29999999999998 L 186.70000000000002 253.79999999999998 C 188.10000000000002 255.29999999999998 190.10000000000002 255.99999999999997 192.00000000000003 255.99999999999997 C 193.90000000000003 255.99999999999997 195.90000000000003 255.2999999999999 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#393f44"
+ stroke="black"
+ id="_834B21EF-9229-44F8-A5DB-D96EBB39A347_task__2UXp__RTEX"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 261.3 130.2 C 258.40000000000003 127.29999999999998 253.60000000000002 127.29999999999998 250.70000000000002 130.2 C 247.8 133.1 247.8 137.89999999999998 250.70000000000002 140.79999999999998 L 301.8 191.89999999999998 L 250.7 243 C 247.79999999999998 245.9 247.79999999999998 250.7 250.7 253.6 C 252.1 255.29999999999998 254.1 256 256 256 C 257.9 256 259.9 255.3 261.3 253.8 L 317.8 197.3 C 320.7 194.4 320.7 189.60000000000002 317.8 186.70000000000002 L 261.3 130.2 Z"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#393f44"
+ stroke="black"
+ id="_834B21EF-9229-44F8-A5DB-D96EBB39A347_task__2UXp__lCVI"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 400 32 C 400 32 152.8 32 128 32 C 62 32 64 96 64 96 L 64 288 L 1 288 C 1 288 -4 416 78 416 L 320 416 C 368 416 384 368 384 336 C 384 314.2 384 224.4 384 160 L 448 160 L 448 96 C 448 96 449 32 400 32 Z M 0 0 M 78 383.9 C 68.5 383.9 61.6 381.09999999999997 55.5 374.9 C 43.4 362.4 37.5 339.59999999999997 34.9 320 L 256.9 320 C 257.09999999999997 322.7 257.29999999999995 325.4 257.59999999999997 328.2 C 259.99999999999994 351.59999999999997 264.7 370.0999999999999 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,35,21)">
+ <text
+ fill="#000000"
+ stroke="none"
+ font-family="Open Sans"
+ font-size="12pt"
+ font-style="normal"
+ font-weight="normal"
+ text-decoration="normal"
+ x="49.3046875"
+ y="12"
+ text-anchor="middle"
+ dominant-baseline="alphabetic"
+ > Send </text>
+ <text
+ fill="#000000"
+ stroke="none"
+ font-family="Open Sans"
+ font-size="12pt"
+ font-style="normal"
+ font-weight="normal"
+ text-decoration="normal"
+ x="49.3046875"
+ y="27"
+ text-anchor="middle"
+ dominant-baseline="alphabetic"
+ > notification </text>
+ <text
+ fill="#000000"
+ stroke="none"
+ font-family="Open Sans"
+ font-size="12pt"
+ font-style="normal"
+ font-weight="normal"
+ text-decoration="normal"
+ x="49.3046875"
+ y="42"
+ text-anchor="middle"
+ dominant-baseline="alphabetic"
+ >HR Interview </text>
+ <text
+ fill="#000000"
+ stroke="none"
+ font-family="Open Sans"
+ font-size="12pt"
+ font-style="normal"
+ font-weight="normal"
+ text-decoration="normal"
+ x="49.3046875"
+ y="57"
+ text-anchor="middle"
+ dominant-baseline="alphabetic"
+ > avoided </text>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,746,288.00000000000006)" />
+ <g
+ id="_B9662806-84F3-4444-AD62-4790CDA7C85D"
+ bpmn2nodeid="_B9662806-84F3-4444-AD62-4790CDA7C85D"
+ transform="matrix(1,0,0,1,1032,35)"
+ >
+ <g>
+ <path fill="none" stroke="none" />
+ </g>
+ <g transform="matrix(0.125,0,0,0.125,0,0)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#fef4ea"
+ stroke="black"
+ id="_B9662806-84F3-4444-AD62-4790CDA7C85D?shapeType=BACKGROUND"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 224.4 4.3 C 216.4 4.3 208.4 7.3 202.3 13.399999999999999 L 13.5 202.2 C 1.3000000000000007 214.39999999999998 1.3000000000000007 234.2 13.5 246.39999999999998 L 202.2 435.09999999999997 C 208.29999999999998 441.2 216.39999999999998 444.2 224.29999999999998 444.2 C 232.2 444.2 240.29999999999998 441.2 246.39999999999998 435.09999999999997 L 435.09999999999997 246.39999999999998 C 447.29999999999995 234.2 447.29999999999995 214.39999999999998 435.09999999999997 20 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#ec7a08"
+ stroke="black"
+ id="_B9662806-84F3-4444-AD62-4790CDA7C85D?shapeType=BORDER&renderType=FILL"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 20.8 212.7 L 213.3 20.2 C 219.60000000000002 13.899999999999999 229.70000000000002 13.899999999999999 235.9 20.2 L 428.4 212.7 C 434.7 219 434.7 229.1 428.4 235.29999999999998 L 235.9 427.8 C 229.6 434.1 219.5 434.1 213.3 427.8 L 20.8 235.3 C 14.5 229.1 14.5 218.9 20.8 212.7 L 20.8 212.7 Z M 0 0 M 0 224 C 0 232.1 3.1 240.3 9.3 246.5 L 201.5 438.7 C 213.9 451.09999999999997 234.1 451.09999999999997 246.5 438.7 L 438.7 246.5 C 444.9 240.3 448 232.1 448 224 C 4 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ </g>
+ </g>
+ <g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#ec7a08"
+ stroke="black"
+ id="_B9662806-84F3-4444-AD62-4790CDA7C85D_exclusive"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 298.2 269.2 C 298.2 272.59999999999997 297.09999999999997 275.3 294.7 277.7 L 277.7 294.7 C 275.3 297.09999999999997 272.59999999999997 298.2 269.2 298.2 C 265.8 298.2 263.09999999999997 297.09999999999997 260.7 294.7 L 224 258 L 187.2 294.8 C 184.79999999999998 297.2 182.1 298.3 178.7 298.3 C 175.29999999999998 298.3 172.6 297.2 170.2 294.8 L 153.2 277.8 C 150.79999999999998 275.40000000000003 149.7 272.7 149.7 269.3 C 149.7 265.90000000000003 150.799999999 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ </g>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,28,61)" />
+ </g>
+ <g transform="matrix(1,0,0,1,1032,35)" />
+ <g
+ id="_A51A809E-03C0-4EA7-91F1-7B3C5E29AD04"
+ bpmn2nodeid="_A51A809E-03C0-4EA7-91F1-7B3C5E29AD04"
+ transform="matrix(1,0,0,1,343.75,35.00000000000006)"
+ >
+ <g>
+ <path fill="none" stroke="none" />
+ </g>
+ <g transform="matrix(0.125,0,0,0.125,0,0)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#fef4ea"
+ stroke="black"
+ id="_A51A809E-03C0-4EA7-91F1-7B3C5E29AD04?shapeType=BACKGROUND"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 224.4 4.3 C 216.4 4.3 208.4 7.3 202.3 13.399999999999999 L 13.5 202.2 C 1.3000000000000007 214.39999999999998 1.3000000000000007 234.2 13.5 246.39999999999998 L 202.2 435.09999999999997 C 208.29999999999998 441.2 216.39999999999998 444.2 224.29999999999998 444.2 C 232.2 444.2 240.29999999999998 441.2 246.39999999999998 435.09999999999997 L 435.09999999999997 246.39999999999998 C 447.29999999999995 234.2 447.29999999999995 214.39999999999998 435.09999999999997 20 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#ec7a08"
+ stroke="black"
+ id="_A51A809E-03C0-4EA7-91F1-7B3C5E29AD04?shapeType=BORDER&renderType=FILL"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 20.8 212.7 L 213.3 20.2 C 219.60000000000002 13.899999999999999 229.70000000000002 13.899999999999999 235.9 20.2 L 428.4 212.7 C 434.7 219 434.7 229.1 428.4 235.29999999999998 L 235.9 427.8 C 229.6 434.1 219.5 434.1 213.3 427.8 L 20.8 235.3 C 14.5 229.1 14.5 218.9 20.8 212.7 L 20.8 212.7 Z M 0 0 M 0 224 C 0 232.1 3.1 240.3 9.3 246.5 L 201.5 438.7 C 213.9 451.09999999999997 234.1 451.09999999999997 246.5 438.7 L 438.7 246.5 C 444.9 240.3 448 232.1 448 224 C 4 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ </g>
+ </g>
+ <g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#ec7a08"
+ stroke="black"
+ id="_A51A809E-03C0-4EA7-91F1-7B3C5E29AD04_exclusive"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 298.2 269.2 C 298.2 272.59999999999997 297.09999999999997 275.3 294.7 277.7 L 277.7 294.7 C 275.3 297.09999999999997 272.59999999999997 298.2 269.2 298.2 C 265.8 298.2 263.09999999999997 297.09999999999997 260.7 294.7 L 224 258 L 187.2 294.8 C 184.79999999999998 297.2 182.1 298.3 178.7 298.3 C 175.29999999999998 298.3 172.6 297.2 170.2 294.8 L 153.2 277.8 C 150.79999999999998 275.40000000000003 149.7 272.7 149.7 269.3 C 149.7 265.90000000000003 150.799999999 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ </g>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,28,61)" />
+ </g>
+ <g transform="matrix(1,0,0,1,343.75,35.00000000000006)" />
+ <g
+ id="_30C8C01B-4149-4AE5-8D86-D27D57BCA8E7"
+ bpmn2nodeid="_30C8C01B-4149-4AE5-8D86-D27D57BCA8E7"
+ transform="matrix(1,0,0,1,1032,392.00000000000006)"
+ >
+ <g>
+ <path fill="none" stroke="none" />
+ </g>
+ <g transform="matrix(0.125,0,0,0.125,0,0)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#fef4ea"
+ stroke="black"
+ id="_30C8C01B-4149-4AE5-8D86-D27D57BCA8E7?shapeType=BACKGROUND"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 224.4 4.3 C 216.4 4.3 208.4 7.3 202.3 13.399999999999999 L 13.5 202.2 C 1.3000000000000007 214.39999999999998 1.3000000000000007 234.2 13.5 246.39999999999998 L 202.2 435.09999999999997 C 208.29999999999998 441.2 216.39999999999998 444.2 224.29999999999998 444.2 C 232.2 444.2 240.29999999999998 441.2 246.39999999999998 435.09999999999997 L 435.09999999999997 246.39999999999998 C 447.29999999999995 234.2 447.29999999999995 214.39999999999998 435.09999999999997 20 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#ec7a08"
+ stroke="black"
+ id="_30C8C01B-4149-4AE5-8D86-D27D57BCA8E7?shapeType=BORDER&renderType=FILL"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 20.8 212.7 L 213.3 20.2 C 219.60000000000002 13.899999999999999 229.70000000000002 13.899999999999999 235.9 20.2 L 428.4 212.7 C 434.7 219 434.7 229.1 428.4 235.29999999999998 L 235.9 427.8 C 229.6 434.1 219.5 434.1 213.3 427.8 L 20.8 235.3 C 14.5 229.1 14.5 218.9 20.8 212.7 L 20.8 212.7 Z M 0 0 M 0 224 C 0 232.1 3.1 240.3 9.3 246.5 L 201.5 438.7 C 213.9 451.09999999999997 234.1 451.09999999999997 246.5 438.7 L 438.7 246.5 C 444.9 240.3 448 232.1 448 224 C 4 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ </g>
+ </g>
+ <g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#ec7a08"
+ stroke="black"
+ id="_30C8C01B-4149-4AE5-8D86-D27D57BCA8E7_exclusive"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 298.2 269.2 C 298.2 272.59999999999997 297.09999999999997 275.3 294.7 277.7 L 277.7 294.7 C 275.3 297.09999999999997 272.59999999999997 298.2 269.2 298.2 C 265.8 298.2 263.09999999999997 297.09999999999997 260.7 294.7 L 224 258 L 187.2 294.8 C 184.79999999999998 297.2 182.1 298.3 178.7 298.3 C 175.29999999999998 298.3 172.6 297.2 170.2 294.8 L 153.2 277.8 C 150.79999999999998 275.40000000000003 149.7 272.7 149.7 269.3 C 149.7 265.90000000000003 150.799999999 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ </g>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,28,61)" />
+ </g>
+ <g transform="matrix(1,0,0,1,1032,392.00000000000006)" />
+ <g
+ id="_4B7FF147-F096-435B-8CAF-48318EF786B0"
+ bpmn2nodeid="_4B7FF147-F096-435B-8CAF-48318EF786B0"
+ transform="matrix(1,0,0,1,1134,369.00000000000006)"
+ >
+ <g>
+ <path fill="none" stroke="none" />
+ </g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#ffffff"
+ stroke="none"
+ id="_4B7FF147-F096-435B-8CAF-48318EF786B0?shapeType=BACKGROUND"
+ paint-order="stroke fill markers"
+ d=" M 2 0 L 152 0 L 152 0 A 2 2 0 0 1 154 2 L 154 100 L 154 100 A 2 2 0 0 1 152 102 L 2 102 L 2 102 A 2 2 0 0 1 0 100 L 0 2 L 0 2.0000000000000004 A 2 2 0 0 1 1.9999999999999996 0 Z"
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="none"
+ stroke="#000000"
+ id="_4B7FF147-F096-435B-8CAF-48318EF786B0?shapeType=BORDER&renderType=STROKE"
+ paint-order="fill stroke markers"
+ d=" M 2 0 L 152 0 L 152 0 A 2 2 0 0 1 154 2 L 154 100 L 154 100 A 2 2 0 0 1 152 102 L 2 102 L 2 102 A 2 2 0 0 1 0 100 L 0 2 L 0 2.0000000000000004 A 2 2 0 0 1 1.9999999999999996 0 Z"
+ stroke-miterlimit="10"
+ stroke-width="1.5"
+ stroke-dasharray=""
+ />
+ </g>
+ <g>
+ <g transform="matrix(0.06,0,0,0.06,9.4,9.4)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#393f44"
+ stroke="black"
+ id="_4B7FF147-F096-435B-8CAF-48318EF786B0_task__2UXp__ZM2l"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 197.3 130.2 C 194.4 127.29999999999998 189.60000000000002 127.29999999999998 186.70000000000002 130.2 L 130.20000000000002 186.7 C 127.30000000000001 189.6 127.30000000000001 194.39999999999998 130.20000000000002 197.29999999999998 L 186.70000000000002 253.79999999999998 C 188.10000000000002 255.29999999999998 190.10000000000002 255.99999999999997 192.00000000000003 255.99999999999997 C 193.90000000000003 255.99999999999997 195.90000000000003 255.2999999999999 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#393f44"
+ stroke="black"
+ id="_4B7FF147-F096-435B-8CAF-48318EF786B0_task__2UXp__RTEX"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 261.3 130.2 C 258.40000000000003 127.29999999999998 253.60000000000002 127.29999999999998 250.70000000000002 130.2 C 247.8 133.1 247.8 137.89999999999998 250.70000000000002 140.79999999999998 L 301.8 191.89999999999998 L 250.7 243 C 247.79999999999998 245.9 247.79999999999998 250.7 250.7 253.6 C 252.1 255.29999999999998 254.1 256 256 256 C 257.9 256 259.9 255.3 261.3 253.8 L 317.8 197.3 C 320.7 194.4 320.7 189.60000000000002 317.8 186.70000000000002 L 261.3 130.2 Z"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#393f44"
+ stroke="black"
+ id="_4B7FF147-F096-435B-8CAF-48318EF786B0_task__2UXp__lCVI"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 400 32 C 400 32 152.8 32 128 32 C 62 32 64 96 64 96 L 64 288 L 1 288 C 1 288 -4 416 78 416 L 320 416 C 368 416 384 368 384 336 C 384 314.2 384 224.4 384 160 L 448 160 L 448 96 C 448 96 449 32 400 32 Z M 0 0 M 78 383.9 C 68.5 383.9 61.6 381.09999999999997 55.5 374.9 C 43.4 362.4 37.5 339.59999999999997 34.9 320 L 256.9 320 C 257.09999999999997 322.7 257.29999999999995 325.4 257.59999999999997 328.2 C 259.99999999999994 351.59999999999997 264.7 370.0999999999999 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,35,36)">
+ <text
+ fill="#000000"
+ stroke="none"
+ font-family="Open Sans"
+ font-size="12pt"
+ font-style="normal"
+ font-weight="normal"
+ text-decoration="normal"
+ x="43.83984375"
+ y="12"
+ text-anchor="middle"
+ dominant-baseline="alphabetic"
+ >Application </text>
+ <text
+ fill="#000000"
+ stroke="none"
+ font-family="Open Sans"
+ font-size="12pt"
+ font-style="normal"
+ font-weight="normal"
+ text-decoration="normal"
+ x="43.83984375"
+ y="27"
+ text-anchor="middle"
+ dominant-baseline="alphabetic"
+ > denied </text>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,1134,369.00000000000006)" />
+ <g
+ id="_457DC13A-0AEC-4390-A860-5CCFFB67B366"
+ bpmn2nodeid="_457DC13A-0AEC-4390-A860-5CCFFB67B366"
+ transform="matrix(1,0,0,1,1329,392.00000000000006)"
+ >
+ <g>
+ <path fill="none" stroke="none" />
+ </g>
+ <g transform="matrix(0.125,0,0,0.125,0,0)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#fce7e7"
+ stroke="black"
+ id="_457DC13A-0AEC-4390-A860-5CCFFB67B366?shapeType=BACKGROUND"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 444 224 C 444 263.9 434.2 300.8 414.4 334.5 C 394.7 368.2 368 394.9 334.4 414.5 C 300.79999999999995 434.1 263.9 444 224 444 C 184.10000000000002 444 147.2 434.2 113.5 414.4 C 79.8 394.7 53.1 368 33.5 334.4 C 13.899999999999999 300.79999999999995 4 263.9 4 224 C 4 184.10000000000002 13.8 147.2 33.6 113.5 C 53.400000000000006 79.80000000000001 80.1 53.1 113.6 33.5 C 147.1 13.899999999999999 184.1 4 224 4 C 263.9 4 300.8 13.8 334.5 33.6 C 368.2 53.400000000000006 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#a30000"
+ stroke="black"
+ id="_457DC13A-0AEC-4390-A860-5CCFFB67B366?shapeType=BORDER&renderType=FILL"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 224 0 C 100.3 0 0 100.3 0 224 C 0 347.7 100.3 448 224 448 C 347.7 448 448 347.7 448 224 C 448 100.30000000000001 347.7 0 224 0 Z M 0 0 M 224 400 C 126.8 400 48 321.2 48 224 C 48 126.80000000000001 126.8 48 224 48 C 321.2 48 400 126.8 400 224 C 400 321.2 321.2 400 224 400 Z"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ </g>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,28,61)" />
+ </g>
+ <g transform="matrix(1,0,0,1,1329,392.00000000000006)" />
+ <g
+ id="_6CE52250-BCEE-485C-8AE4-F6CACF2EF5A1"
+ bpmn2nodeid="_6CE52250-BCEE-485C-8AE4-F6CACF2EF5A1"
+ transform="matrix(1,0,0,1,1328.75,35.00000000000006)"
+ >
+ <g>
+ <path fill="none" stroke="none" />
+ </g>
+ <g transform="matrix(0.125,0,0,0.125,0,0)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#fce7e7"
+ stroke="black"
+ id="_6CE52250-BCEE-485C-8AE4-F6CACF2EF5A1?shapeType=BACKGROUND"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 444 224 C 444 263.9 434.2 300.8 414.4 334.5 C 394.7 368.2 368 394.9 334.4 414.5 C 300.79999999999995 434.1 263.9 444 224 444 C 184.10000000000002 444 147.2 434.2 113.5 414.4 C 79.8 394.7 53.1 368 33.5 334.4 C 13.899999999999999 300.79999999999995 4 263.9 4 224 C 4 184.10000000000002 13.8 147.2 33.6 113.5 C 53.400000000000006 79.80000000000001 80.1 53.1 113.6 33.5 C 147.1 13.899999999999999 184.1 4 224 4 C 263.9 4 300.8 13.8 334.5 33.6 C 368.2 53.400000000000006 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#a30000"
+ stroke="black"
+ id="_6CE52250-BCEE-485C-8AE4-F6CACF2EF5A1?shapeType=BORDER&renderType=FILL"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 224 0 C 100.3 0 0 100.3 0 224 C 0 347.7 100.3 448 224 448 C 347.7 448 448 347.7 448 224 C 448 100.30000000000001 347.7 0 224 0 Z M 0 0 M 224 400 C 126.8 400 48 321.2 48 224 C 48 126.80000000000001 126.8 48 224 48 C 321.2 48 400 126.8 400 224 C 400 321.2 321.2 400 224 400 Z"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ </g>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,28,61)" />
+ </g>
+ <g transform="matrix(1,0,0,1,1328.75,35.00000000000006)" />
+ <g
+ id="_57DBE42C-6850-4A08-AC73-2BB0FFDFCC8C"
+ bpmn2nodeid="_57DBE42C-6850-4A08-AC73-2BB0FFDFCC8C"
+ transform="matrix(1,0,0,1,437,12.000000000000057)"
+ >
+ <g>
+ <path fill="none" stroke="none" />
+ </g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#ffffff"
+ stroke="none"
+ id="_57DBE42C-6850-4A08-AC73-2BB0FFDFCC8C?shapeType=BACKGROUND"
+ paint-order="stroke fill markers"
+ d=" M 2 0 L 152 0 L 152 0 A 2 2 0 0 1 154 2 L 154 100 L 154 100 A 2 2 0 0 1 152 102 L 2 102 L 2 102 A 2 2 0 0 1 0 100 L 0 2 L 0 2.0000000000000004 A 2 2 0 0 1 1.9999999999999996 0 Z"
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="none"
+ stroke="#000000"
+ id="_57DBE42C-6850-4A08-AC73-2BB0FFDFCC8C?shapeType=BORDER&renderType=STROKE"
+ paint-order="fill stroke markers"
+ d=" M 2 0 L 152 0 L 152 0 A 2 2 0 0 1 154 2 L 154 100 L 154 100 A 2 2 0 0 1 152 102 L 2 102 L 2 102 A 2 2 0 0 1 0 100 L 0 2 L 0 2.0000000000000004 A 2 2 0 0 1 1.9999999999999996 0 Z"
+ stroke-miterlimit="10"
+ stroke-width="1.5"
+ stroke-dasharray=""
+ />
+ </g>
+ <g>
+ <g transform="matrix(0.06,0,0,0.06,9.4,9.4)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#393f44"
+ stroke="black"
+ id="_57DBE42C-6850-4A08-AC73-2BB0FFDFCC8C_task__2UXp__ZM2l"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 197.3 130.2 C 194.4 127.29999999999998 189.60000000000002 127.29999999999998 186.70000000000002 130.2 L 130.20000000000002 186.7 C 127.30000000000001 189.6 127.30000000000001 194.39999999999998 130.20000000000002 197.29999999999998 L 186.70000000000002 253.79999999999998 C 188.10000000000002 255.29999999999998 190.10000000000002 255.99999999999997 192.00000000000003 255.99999999999997 C 193.90000000000003 255.99999999999997 195.90000000000003 255.2999999999999 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#393f44"
+ stroke="black"
+ id="_57DBE42C-6850-4A08-AC73-2BB0FFDFCC8C_task__2UXp__RTEX"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 261.3 130.2 C 258.40000000000003 127.29999999999998 253.60000000000002 127.29999999999998 250.70000000000002 130.2 C 247.8 133.1 247.8 137.89999999999998 250.70000000000002 140.79999999999998 L 301.8 191.89999999999998 L 250.7 243 C 247.79999999999998 245.9 247.79999999999998 250.7 250.7 253.6 C 252.1 255.29999999999998 254.1 256 256 256 C 257.9 256 259.9 255.3 261.3 253.8 L 317.8 197.3 C 320.7 194.4 320.7 189.60000000000002 317.8 186.70000000000002 L 261.3 130.2 Z"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#393f44"
+ stroke="black"
+ id="_57DBE42C-6850-4A08-AC73-2BB0FFDFCC8C_task__2UXp__lCVI"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 400 32 C 400 32 152.8 32 128 32 C 62 32 64 96 64 96 L 64 288 L 1 288 C 1 288 -4 416 78 416 L 320 416 C 368 416 384 368 384 336 C 384 314.2 384 224.4 384 160 L 448 160 L 448 96 C 448 96 449 32 400 32 Z M 0 0 M 78 383.9 C 68.5 383.9 61.6 381.09999999999997 55.5 374.9 C 43.4 362.4 37.5 339.59999999999997 34.9 320 L 256.9 320 C 257.09999999999997 322.7 257.29999999999995 325.4 257.59999999999997 328.2 C 259.99999999999994 351.59999999999997 264.7 370.0999999999999 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,35,43.5)">
+ <text
+ fill="#000000"
+ stroke="none"
+ font-family="Open Sans"
+ font-size="12pt"
+ font-style="normal"
+ font-weight="normal"
+ text-decoration="normal"
+ x="45.88671875"
+ y="12"
+ text-anchor="middle"
+ dominant-baseline="alphabetic"
+ >Create Offer</text>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,437,12.000000000000057)" />
+ <g
+ id="_940F2A0C-8CC6-4ECA-B504-49363AF68B67"
+ bpmn2nodeid="_940F2A0C-8CC6-4ECA-B504-49363AF68B67"
+ transform="matrix(1,0,0,1,1134,12.000000000000057)"
+ >
+ <g>
+ <path fill="none" stroke="none" />
+ </g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#ffffff"
+ stroke="none"
+ id="_940F2A0C-8CC6-4ECA-B504-49363AF68B67?shapeType=BACKGROUND"
+ paint-order="stroke fill markers"
+ d=" M 2 0 L 152 0 L 152 0 A 2 2 0 0 1 154 2 L 154 100 L 154 100 A 2 2 0 0 1 152 102 L 2 102 L 2 102 A 2 2 0 0 1 0 100 L 0 2 L 0 2.0000000000000004 A 2 2 0 0 1 1.9999999999999996 0 Z"
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="none"
+ stroke="#000000"
+ id="_940F2A0C-8CC6-4ECA-B504-49363AF68B67?shapeType=BORDER&renderType=STROKE"
+ paint-order="fill stroke markers"
+ d=" M 2 0 L 152 0 L 152 0 A 2 2 0 0 1 154 2 L 154 100 L 154 100 A 2 2 0 0 1 152 102 L 2 102 L 2 102 A 2 2 0 0 1 0 100 L 0 2 L 0 2.0000000000000004 A 2 2 0 0 1 1.9999999999999996 0 Z"
+ stroke-miterlimit="10"
+ stroke-width="1.5"
+ stroke-dasharray=""
+ />
+ </g>
+ <g>
+ <g transform="matrix(0.06,0,0,0.06,9.4,9.4)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#393f44"
+ stroke="black"
+ id="_940F2A0C-8CC6-4ECA-B504-49363AF68B67_task__2UXp__ZM2l"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 197.3 130.2 C 194.4 127.29999999999998 189.60000000000002 127.29999999999998 186.70000000000002 130.2 L 130.20000000000002 186.7 C 127.30000000000001 189.6 127.30000000000001 194.39999999999998 130.20000000000002 197.29999999999998 L 186.70000000000002 253.79999999999998 C 188.10000000000002 255.29999999999998 190.10000000000002 255.99999999999997 192.00000000000003 255.99999999999997 C 193.90000000000003 255.99999999999997 195.90000000000003 255.2999999999999 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#393f44"
+ stroke="black"
+ id="_940F2A0C-8CC6-4ECA-B504-49363AF68B67_task__2UXp__RTEX"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 261.3 130.2 C 258.40000000000003 127.29999999999998 253.60000000000002 127.29999999999998 250.70000000000002 130.2 C 247.8 133.1 247.8 137.89999999999998 250.70000000000002 140.79999999999998 L 301.8 191.89999999999998 L 250.7 243 C 247.79999999999998 245.9 247.79999999999998 250.7 250.7 253.6 C 252.1 255.29999999999998 254.1 256 256 256 C 257.9 256 259.9 255.3 261.3 253.8 L 317.8 197.3 C 320.7 194.4 320.7 189.60000000000002 317.8 186.70000000000002 L 261.3 130.2 Z"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#393f44"
+ stroke="black"
+ id="_940F2A0C-8CC6-4ECA-B504-49363AF68B67_task__2UXp__lCVI"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 400 32 C 400 32 152.8 32 128 32 C 62 32 64 96 64 96 L 64 288 L 1 288 C 1 288 -4 416 78 416 L 320 416 C 368 416 384 368 384 336 C 384 314.2 384 224.4 384 160 L 448 160 L 448 96 C 448 96 449 32 400 32 Z M 0 0 M 78 383.9 C 68.5 383.9 61.6 381.09999999999997 55.5 374.9 C 43.4 362.4 37.5 339.59999999999997 34.9 320 L 256.9 320 C 257.09999999999997 322.7 257.29999999999995 325.4 257.59999999999997 328.2 C 259.99999999999994 351.59999999999997 264.7 370.0999999999999 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,35,36)">
+ <text
+ fill="#000000"
+ stroke="none"
+ font-family="Open Sans"
+ font-size="12pt"
+ font-style="normal"
+ font-weight="normal"
+ text-decoration="normal"
+ x="51.98828125"
+ y="12"
+ text-anchor="middle"
+ dominant-baseline="alphabetic"
+ >Send Offer to </text>
+ <text
+ fill="#000000"
+ stroke="none"
+ font-family="Open Sans"
+ font-size="12pt"
+ font-style="normal"
+ font-weight="normal"
+ text-decoration="normal"
+ x="51.98828125"
+ y="27"
+ text-anchor="middle"
+ dominant-baseline="alphabetic"
+ > Candidate </text>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,1134,12.000000000000057)" />
+ <g
+ id="_F1B20FAB-EDDC-4114-8AE8-B00E3F94975E"
+ bpmn2nodeid="_F1B20FAB-EDDC-4114-8AE8-B00E3F94975E"
+ transform="matrix(1,0,0,1,795,196)"
+ >
+ <g>
+ <path fill="none" stroke="none" />
+ </g>
+ <g transform="matrix(0.125,0,0,0.125,0,0)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#fef4ea"
+ stroke="black"
+ id="_F1B20FAB-EDDC-4114-8AE8-B00E3F94975E?shapeType=BACKGROUND"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 224.4 4.3 C 216.4 4.3 208.4 7.3 202.3 13.399999999999999 L 13.5 202.2 C 1.3000000000000007 214.39999999999998 1.3000000000000007 234.2 13.5 246.39999999999998 L 202.2 435.09999999999997 C 208.29999999999998 441.2 216.39999999999998 444.2 224.29999999999998 444.2 C 232.2 444.2 240.29999999999998 441.2 246.39999999999998 435.09999999999997 L 435.09999999999997 246.39999999999998 C 447.29999999999995 234.2 447.29999999999995 214.39999999999998 435.09999999999997 20 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#ec7a08"
+ stroke="black"
+ id="_F1B20FAB-EDDC-4114-8AE8-B00E3F94975E?shapeType=BORDER&renderType=FILL"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 20.8 212.7 L 213.3 20.2 C 219.60000000000002 13.899999999999999 229.70000000000002 13.899999999999999 235.9 20.2 L 428.4 212.7 C 434.7 219 434.7 229.1 428.4 235.29999999999998 L 235.9 427.8 C 229.6 434.1 219.5 434.1 213.3 427.8 L 20.8 235.3 C 14.5 229.1 14.5 218.9 20.8 212.7 L 20.8 212.7 Z M 0 0 M 0 224 C 0 232.1 3.1 240.3 9.3 246.5 L 201.5 438.7 C 213.9 451.09999999999997 234.1 451.09999999999997 246.5 438.7 L 438.7 246.5 C 444.9 240.3 448 232.1 448 224 C 4 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ </g>
+ </g>
+ <g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#ec7a08"
+ stroke="black"
+ id="_F1B20FAB-EDDC-4114-8AE8-B00E3F94975E_exclusive"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 298.2 269.2 C 298.2 272.59999999999997 297.09999999999997 275.3 294.7 277.7 L 277.7 294.7 C 275.3 297.09999999999997 272.59999999999997 298.2 269.2 298.2 C 265.8 298.2 263.09999999999997 297.09999999999997 260.7 294.7 L 224 258 L 187.2 294.8 C 184.79999999999998 297.2 182.1 298.3 178.7 298.3 C 175.29999999999998 298.3 172.6 297.2 170.2 294.8 L 153.2 277.8 C 150.79999999999998 275.40000000000003 149.7 272.7 149.7 269.3 C 149.7 265.90000000000003 150.799999999 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ </g>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,28,61)" />
+ </g>
+ <g transform="matrix(1,0,0,1,795,196)" />
+ <g transform="matrix(1,0,0,1,628,12.000000000000057)" />
+ <g transform="matrix(1,0,0,1,688,86.00000000000006)" />
+ <g transform="matrix(1,0,0,1,824,12.000000000000057)" />
+ <g transform="matrix(1,0,0,1,896,86.00000000000006)" />
+ <g id="_7B41F971-C74D-4036-8A5E-EFF81C37986A" bpmn2nodeid="_7B41F971-C74D-4036-8A5E-EFF81C37986A">
+ <g>
+ <path
+ fill="none"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 744 135.45794392523368 L 811.0941139006771 186.87586298930404"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,744,135.45794392523368)" />
+ <g
+ transform="matrix(-0.6082758007130626,0.7937257399548552,-0.7937257399548552,-0.6082758007130626,826.0413790035653,192.03137130022571)"
+ >
+ <path
+ fill="#000000"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 10 15 L 0 15 L 5 0 Z"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,750.0827580071307,157.7917145630683)" />
+ </g>
+ <g id="_730573E5-BCD9-42BC-9AC8-AE003784831D" bpmn2nodeid="_730573E5-BCD9-42BC-9AC8-AE003784831D">
+ <g>
+ <path
+ fill="none"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 823 252 L 823 273.00000000000006"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,823,252)" />
+ <g transform="matrix(-1,1.2246467991473532e-16,-1.2246467991473532e-16,-1,828,288.00000000000006)">
+ <path
+ fill="#000000"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 10 15 L 0 15 L 5 0 Z"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,833,270)" />
+ </g>
+ <g id="_5334FFDC-1FCB-47E6-8085-36DC9A3D17B9" bpmn2nodeid="_5334FFDC-1FCB-47E6-8085-36DC9A3D17B9">
+ <g>
+ <path
+ fill="none"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 900 368.8421052631579 L 1018.0136598682059 414.5794566953334"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,900,368.8421052631579)" />
+ <g
+ transform="matrix(-0.3613695536444415,0.9324226754529392,-0.9324226754529392,-0.3613695536444415,1033.8068477682223,415.33788662273537)"
+ >
+ <path
+ fill="#000000"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 10 15 L 0 15 L 5 0 Z"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,903.6136955364444,385.0968258770496)" />
+ </g>
+ <g id="_94172225-E124-4F14-98DA-C3D62C11254A" bpmn2nodeid="_94172225-E124-4F14-98DA-C3D62C11254A">
+ <g>
+ <path
+ fill="none"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 1088 420.00000000000006 L 1119 420.00000000000006"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,1088,420.00000000000006)" />
+ <g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,1134,415.00000000000006)">
+ <path
+ fill="#000000"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 10 15 L 0 15 L 5 0 Z"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,1088,410.00000000000006)" />
+ </g>
+ <g id="_527D3164-4989-4D2C-B80B-9BA9D4C8FB89" bpmn2nodeid="_527D3164-4989-4D2C-B80B-9BA9D4C8FB89">
+ <g>
+ <path
+ fill="none"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 1288 420.00000000000006 L 1314 420.00000000000006"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,1288,420.00000000000006)" />
+ <g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,1329,415.00000000000006)">
+ <path
+ fill="#000000"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 10 15 L 0 15 L 5 0 Z"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,1288,410.00000000000006)" />
+ </g>
+ <g id="_C500BCB4-FBE1-43A0-A7C8-5F72670CD927" bpmn2nodeid="_C500BCB4-FBE1-43A0-A7C8-5F72670CD927">
+ <g>
+ <path
+ fill="none"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 896 136.7326732673268 L 834.645235996665 186.54545196310372"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,896,136.7326732673268)" />
+ <g
+ transform="matrix(-0.6303032024597516,-0.7763490664443291,0.7763490664443291,-0.6303032024597516,826.1515160122988,199.88174533222164)"
+ >
+ <path
+ fill="#000000"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 10 15 L 0 15 L 5 0 Z"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,829.3030320245975,158.6028459692201)" />
+ </g>
+ <g id="_8863B46B-9B0F-40B9-AAB1-A7503CF9AA0A" bpmn2nodeid="_8863B46B-9B0F-40B9-AAB1-A7503CF9AA0A">
+ <g>
+ <path
+ fill="none"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 128 63.00000000000006 L 149.04035408816708 72.34103878489873"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,128,63.00000000000006)" />
+ <g
+ transform="matrix(-0.4057673606728257,0.9139763941221944,-0.9139763941221944,-0.4057673606728257,164.77883680336413,73.85766722438014)"
+ >
+ <path
+ fill="#000000"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 10 15 L 0 15 L 5 0 Z"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,132.05767360672826,61.57401065627364)" />
+ </g>
+ <g id="_5162ABF0-DD2E-4BDC-9A46-DDCFCB010287" bpmn2nodeid="_5162ABF0-DD2E-4BDC-9A46-DDCFCB010287">
+ <g>
+ <path
+ fill="none"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 316.75 63.00000000000006 L 328.75 63.00000000000006"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,316.75,63.00000000000006)" />
+ <g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,343.75,58.00000000000006)">
+ <path
+ fill="#000000"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 10 15 L 0 15 L 5 0 Z"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,316.75,53.00000000000006)" />
+ </g>
+ <g id="_59F9A0E6-7F9C-43A9-8920-5B40A91169E6" bpmn2nodeid="_59F9A0E6-7F9C-43A9-8920-5B40A91169E6">
+ <g>
+ <path
+ fill="none"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 399.75 63.00000000000006 L 422 63.00000000000006"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,399.75,63.00000000000006)" />
+ <g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,437,58.00000000000006)">
+ <path
+ fill="#000000"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 10 15 L 0 15 L 5 0 Z"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,399.75,53.00000000000006)" />
+ </g>
+ <g id="_ACEE7578-B7D2-4EDF-B104-9ECF3DD8A383" bpmn2nodeid="_ACEE7578-B7D2-4EDF-B104-9ECF3DD8A383">
+ <g>
+ <path
+ fill="none"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 591 63.00000000000006 L 613 63.00000000000006"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,591,63.00000000000006)" />
+ <g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,628,58.00000000000006)">
+ <path
+ fill="#000000"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 10 15 L 0 15 L 5 0 Z"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,591,53.00000000000006)" />
+ </g>
+ <g id="_A76C6603-0406-423C-940B-3403948DCA1F" bpmn2nodeid="_A76C6603-0406-423C-940B-3403948DCA1F">
+ <g>
+ <path
+ fill="none"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 782 63.00000000000006 L 809 63.00000000000006"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,782,63.00000000000006)" />
+ <g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,824,58.00000000000006)">
+ <path
+ fill="#000000"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 10 15 L 0 15 L 5 0 Z"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,782,53.00000000000006)" />
+ </g>
+ <g id="_C62F7EFB-A009-450A-81C7-57D36F0DF766" bpmn2nodeid="_C62F7EFB-A009-450A-81C7-57D36F0DF766">
+ <g>
+ <path
+ fill="none"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 978 63.00000000000006 L 1017 63.000000000000014"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,978,63.00000000000006)" />
+ <g transform="matrix(9.494107596574928e-16,1,-1,9.494107596574928e-16,1032,58)">
+ <path
+ fill="#000000"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 10 15 L 0 15 L 5 0 Z"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,978,53.00000000000003)" />
+ </g>
+ <g id="_B11455DE-F77A-4251-A85B-4C66636E3CD9" bpmn2nodeid="_B11455DE-F77A-4251-A85B-4C66636E3CD9">
+ <g>
+ <path
+ fill="none"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 1088 63 L 1119 63.000000000000036"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,1088,63)" />
+ <g transform="matrix(-1.2710352895928203e-15,1,-1,-1.2710352895928203e-15,1134,58.00000000000006)">
+ <path
+ fill="#000000"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 10 15 L 0 15 L 5 0 Z"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,1088,53.00000000000003)" />
+ </g>
+ <g id="_7DDA574A-C220-4FEF-9784-22EF8052EDEC" bpmn2nodeid="_7DDA574A-C220-4FEF-9784-22EF8052EDEC">
+ <g>
+ <path
+ fill="none"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 1288 63.00000000000006 L 1313.75 63.00000000000006"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,1288,63.00000000000006)" />
+ <g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,1328.75,58.00000000000006)">
+ <path
+ fill="#000000"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 10 15 L 0 15 L 5 0 Z"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,1288,53.00000000000006)" />
+ </g>
+ <g id="_B7FC63DD-C08F-4CB3-A51A-79C1B8B18E6E" bpmn2nodeid="_B7FC63DD-C08F-4CB3-A51A-79C1B8B18E6E">
+ <g>
+ <path
+ fill="none"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 1060 91 L 1060 377.00000000000006"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,1060,91)" />
+ <g transform="matrix(-1,1.2246467991473532e-16,-1.2246467991473532e-16,-1,1065,392.00000000000006)">
+ <path
+ fill="#000000"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 10 15 L 0 15 L 5 0 Z"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,1070,241.50000000000003)" />
+ </g>
+ <g id="_C6E61C53-FD35-4347-B69E-30AA93AE4404" bpmn2nodeid="_C6E61C53-FD35-4347-B69E-30AA93AE4404">
+ <g>
+ <path
+ fill="none"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 371.75 91.00000000000006 L 371.75 420.00000811728415 L 1017 420.000000507146"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,371.75,91.00000000000006)" />
+ <g
+ transform="matrix(1.1794092430631662e-8,0.9999999999999999,-0.9999999999999999,1.1794092430631662e-8,1031.9999999410295,415.0000003302346)"
+ >
+ <path
+ fill="#000000"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 10 15 L 0 15 L 5 0 Z"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,381.75,233.5000040586421)">
+ <text
+ fill="#000000"
+ stroke="none"
+ font-family="Open Sans"
+ font-size="10pt"
+ font-style="normal"
+ font-weight="normal"
+ text-decoration="normal"
+ x="0"
+ y="8.8"
+ text-anchor="start"
+ dominant-baseline="alphabetic"
+ >Candidate doesn't meet </text>
+ <text
+ fill="#000000"
+ stroke="none"
+ font-family="Open Sans"
+ font-size="10pt"
+ font-style="normal"
+ font-weight="normal"
+ text-decoration="normal"
+ x="0"
+ y="19.8"
+ text-anchor="start"
+ dominant-baseline="alphabetic"
+ >requirements </text>
+ </g>
+ </g>
+ </g>
+ </g>
+</svg>
diff --git a/packages/jbpm-quarkus-devui/dev/src/main/resources/custom-forms-dev/hiring_ITInterview.tsx b/packages/jbpm-quarkus-devui/dev/src/main/resources/custom-forms-dev/hiring_ITInterview.tsx
new file mode 100644
index 00000000000..54361de1950
--- /dev/null
+++ b/packages/jbpm-quarkus-devui/dev/src/main/resources/custom-forms-dev/hiring_ITInterview.tsx
@@ -0,0 +1,125 @@
+import React, { useCallback, useEffect, useState } from "react";
+import { Checkbox, FormGroup, TextInput } from "@patternfly/react-core";
+const Form__hiring_ITInterview: React.FC<any> = (props: any) => {
+ const [formApi, setFormApi] = useState<any>();
+ const [approve, set__approve] = useState<boolean>(false);
+ const [baseSalary, set__baseSalary] = useState<number>();
+ const [bonus, set__bonus] = useState<number>();
+ const [candidate, set__candidate] = useState<string>("");
+ const [category, set__category] = useState<string>("");
+ /* Utility function that fills the form with the data received from the kogito runtime */
+ const setFormData = (data) => {
+ if (!data) {
+ return;
+ }
+ set__approve(data?.approve ?? false);
+ set__baseSalary(data?.baseSalary);
+ set__bonus(data?.bonus);
+ set__candidate(data?.candidate ?? "");
+ set__category(data?.category ?? "");
+ };
+ /* Utility function to generate the expected form output as a json object */
+ const getFormData = useCallback(() => {
+ const formData: any = {};
+ formData.approve = approve;
+ return formData;
+ }, [approve]);
+ /* Utility function to validate the form on the 'beforeSubmit' Lifecycle Hook */
+ const validateForm = useCallback(() => {}, []);
+ /* Utility function to perform actions on the on the 'afterSubmit' Lifecycle Hook */
+ const afterSubmit = useCallback((result) => {}, []);
+ useEffect(() => {
+ if (formApi) {
+ /*
+ Form Lifecycle Hook that will be executed before the form is submitted.
+ Throwing an error will stop the form submit. Usually should be used to validate the form.
+ */
+ formApi.beforeSubmit = () => validateForm();
+ /*
+ Form Lifecycle Hook that will be executed after the form is submitted.
+ It will receive a response object containing the `type` flag indicating if the submit has been successful and `info` with extra information about the submit result.
+ */
+ formApi.afterSubmit = (result) => afterSubmit(result);
+ /* Generates the expected form output object to be posted */
+ formApi.getFormData = () => getFormData();
+ }
+ }, [getFormData, validateForm, afterSubmit]);
+ useEffect(() => {
+ /*
+ Call to the Kogito console form engine. It will establish the connection with the console embeding the form
+ and return an instance of FormAPI that will allow hook custom code into the form lifecycle.
+ The `window.Form.openForm` call expects an object with the following entries:
+ - onOpen: Callback that will be called after the connection with the console is established. The callback
+ will receive the following arguments:
+ - data: the data to be bound into the form
+ - ctx: info about the context where the form is being displayed. This will contain information such as the form JSON Schema, process/task, user...
+ */
+ const api = window.Form.openForm({
+ onOpen: (data, context) => {
+ setFormData(data);
+ },
+ });
+ setFormApi(api);
+ }, []);
+ return (
+ <div className={"pf-c-form"}>
+ <FormGroup fieldId="uniforms-000a-0001">
+ <Checkbox
+ isChecked={approve}
+ isDisabled={false}
+ id={"uniforms-000a-0001"}
+ name={"approve"}
+ label={"Approve"}
+ onChange={set__approve}
+ />
+ </FormGroup>
+ <FormGroup fieldId={"uniforms-000a-0003"} label={"Base salary"} isRequired={false}>
+ <TextInput
+ type={"number"}
+ name={"baseSalary"}
+ isDisabled={true}
+ id={"uniforms-000a-0003"}
+ placeholder={""}
+ step={1}
+ value={baseSalary}
+ onChange={(newValue) => set__baseSalary(Number(newValue))}
+ />
+ </FormGroup>
+ <FormGroup fieldId={"uniforms-000a-0005"} label={"Bonus"} isRequired={false}>
+ <TextInput
+ type={"number"}
+ name={"bonus"}
+ isDisabled={true}
+ id={"uniforms-000a-0005"}
+ placeholder={""}
+ step={1}
+ value={bonus}
+ onChange={(newValue) => set__bonus(Number(newValue))}
+ />
+ </FormGroup>
+ <FormGroup fieldId={"uniforms-000a-0006"} label={"Candidate"} isRequired={false}>
+ <TextInput
+ name={"candidate"}
+ id={"uniforms-000a-0006"}
+ isDisabled={true}
+ placeholder={""}
+ type={"text"}
+ value={candidate}
+ onChange={set__candidate}
+ />
+ </FormGroup>
+ <FormGroup fieldId={"uniforms-000a-0007"} label={"Category"} isRequired={false}>
+ <TextInput
+ name={"category"}
+ id={"uniforms-000a-0007"}
+ isDisabled={true}
+ placeholder={""}
+ type={"text"}
+ value={category}
+ onChange={set__category}
+ />
+ </FormGroup>
+ </div>
+ );
+};
+export default Form__hiring_ITInterview;
diff --git a/packages/jbpm-quarkus-devui/dev/src/main/resources/Sample.bpmn b/packages/jbpm-quarkus-devui/dev/src/main/resources/hiring.bpmn
similarity index 100%
rename from packages/jbpm-quarkus-devui/dev/src/main/resources/Sample.bpmn
rename to packages/jbpm-quarkus-devui/dev/src/main/resources/hiring.bpmn
diff --git a/packages/jbpm-quarkus-devui/dev/src/main/resources/Sample.dmn b/packages/jbpm-quarkus-devui/dev/src/main/resources/loan-pre-qualification.dmn
similarity index 100%
rename from packages/jbpm-quarkus-devui/dev/src/main/resources/Sample.dmn
rename to packages/jbpm-quarkus-devui/dev/src/main/resources/loan-pre-qualification.dmn
diff --git a/packages/runtime-tools-components/package.json b/packages/runtime-tools-components/package.json
index ace54044bf0..84f730b051c 100644
--- a/packages/runtime-tools-components/package.json
+++ b/packages/runtime-tools-components/package.json
@@ -20,7 +20,7 @@
"scripts": {
"build:dev": "rimraf dist && tsc -p tsconfig.json && pnpm copy:css",
"build:prod": "pnpm lint && rimraf dist && tsc -p tsconfig.json && pnpm copy:css",
- "copy:css": "copyfiles -u 2 \"src/**/*.{sass,scss,css,svg,png}\" dist/",
+ "copy:css": "copyfiles -u 1 \"src/**/*.{sass,scss,css,svg,png}\" dist",
"lint": "run-script-if --bool \"$(build-env linters.run)\" --then \"kie-tools--eslint ./src\""
},
"dependencies": {
diff --git a/packages/runtime-tools-components/src/common/static/avatar.svg b/packages/runtime-tools-components/src/common/static/avatar.svg
deleted file mode 100644
index 157cec2927a..00000000000
--- a/packages/runtime-tools-components/src/common/static/avatar.svg
+++ /dev/null
@@ -1,86 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<svg
- enable-background="new 0 0 36 36"
- version="1.1"
- viewBox="0 0 36 36"
- xml:space="preserve"
- xmlns="http://www.w3.org/2000/svg"
->
- <!--
- - Licensed to the Apache Software Foundation (ASF) under one
- - or more contributor license agreements. See the NOTICE file
- - distributed with this work for additional information
- - regarding copyright ownership. The ASF licenses this file
- - to you under the Apache License, Version 2.0 (the
- - "License"); you may not use this file except in compliance
- - with the License. You may obtain a copy of the License at
- -
- - http://www.apache.org/licenses/LICENSE-2.0
- -
- - Unless required by applicable law or agreed to in writing,
- - software distributed under the License is distributed on an
- - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- - KIND, either express or implied. See the License for the
- - specific language governing permissions and limitations
- - under the License.
- -->
- <style type="text/css">
-/*stylelint-disable*/
-.st0 {
- fill-rule: evenodd;
- clip-rule: evenodd;
- fill: #ffffff;
-}
-.st1 {
- filter: url(#b);
-}
-.st2 {
- mask: url(#a);
-}
-.st3 {
- fill-rule: evenodd;
- clip-rule: evenodd;
- fill: #bbbbbb;
-}
-.st4 {
- opacity: 0.1;
- fill-rule: evenodd;
- clip-rule: evenodd;
- enable-background: new;
-}
-.st5 {
- opacity: 8e-2;
- fill-rule: evenodd;
- clip-rule: evenodd;
- fill: #231f20;
- enable-background: new;
-}
-/*stylelint-enable*/
- </style>
- <circle class="st0" cx="18" cy="18.5" r="18" />
- <defs>
- <filter id="b" x="5.2" y="7.2" width="25.6" height="53.6" filterUnits="userSpaceOnUse">
- <feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0" />
- </filter>
- </defs>
- <mask id="a" x="5.2" y="7.2" width="25.6" height="53.6" maskUnits="userSpaceOnUse">
- <g class="st1">
- <circle class="st0" cx="18" cy="18.5" r="18" />
- </g>
- </mask>
- <g class="st2">
- <g transform="translate(5.04 6.88)">
- <path
- class="st3"
- d="m22.6 18.1c-1.1-1.4-2.3-2.2-3.5-2.6s-1.8-0.6-6.3-0.6-6.1 0.7-6.1 0.7 0 0 0 0c-1.2 0.4-2.4 1.2-3.4 2.6-2.3 2.8-3.2 12.3-3.2 14.8 0 3.2 0.4 12.3 0.6 15.4 0 0-0.4 5.5 4 5.5l-0.3-6.3-0.4-3.5 0.2-0.9c0.9 0.4 3.6 1.2 8.6 1.2 5.3 0 8-0.9 8.8-1.3l0.2 1-0.2 3.6-0.3 6.3c3 0.1 3.7-3 3.8-4.4s0.6-12.6 0.6-16.5c0.1-2.6-0.8-12.1-3.1-15z"
- />
- <path class="st4" d="m22.5 26c-0.1-2.1-1.5-2.8-4.8-2.8l2.2 9.6s1.8-1.7 3-1.8c0 0-0.4-4.6-0.4-5z" />
- <path class="st3" d="m12.7 13.2c-3.5 0-6.4-2.9-6.4-6.4s2.9-6.4 6.4-6.4 6.4 2.9 6.4 6.4-2.8 6.4-6.4 6.4z" />
- <path
- class="st5"
- d="m9.4 6.8c0-3 2.1-5.5 4.9-6.3-0.5-0.1-1-0.2-1.6-0.2-3.5 0-6.4 2.9-6.4 6.4s2.9 6.4 6.4 6.4c0.6 0 1.1-0.1 1.6-0.2-2.8-0.6-4.9-3.1-4.9-6.1z"
- />
- <path class="st4" d="m8.3 22.4c-2 0.4-2.9 1.4-3.1 3.5l-0.6 18.6s1.7 0.7 3.6 0.9l0.1-23z" />
- </g>
- </g>
-</svg>
diff --git a/packages/runtime-tools-components/src/common/static/kogitoAbout.png b/packages/runtime-tools-components/src/common/static/kogitoAbout.png
deleted file mode 100644
index 3a26234f581..00000000000
Binary files a/packages/runtime-tools-components/src/common/static/kogitoAbout.png and /dev/null differ
diff --git a/packages/runtime-tools-components/src/common/components/AboutModalBox/AboutModalBox.tsx b/packages/runtime-tools-components/src/components/AboutModalBox/AboutModalBox.tsx
similarity index 100%
rename from packages/runtime-tools-components/src/common/components/AboutModalBox/AboutModalBox.tsx
rename to packages/runtime-tools-components/src/components/AboutModalBox/AboutModalBox.tsx
diff --git a/packages/runtime-tools-components/src/common/components/BulkList/BulkList.tsx b/packages/runtime-tools-components/src/components/BulkList/BulkList.tsx
similarity index 100%
rename from packages/runtime-tools-components/src/common/components/BulkList/BulkList.tsx
rename to packages/runtime-tools-components/src/components/BulkList/BulkList.tsx
diff --git a/packages/runtime-tools-components/src/common/components/BulkList/index.ts b/packages/runtime-tools-components/src/components/BulkList/index.ts
similarity index 100%
copy from packages/runtime-tools-components/src/common/components/BulkList/index.ts
copy to packages/runtime-tools-components/src/components/BulkList/index.ts
diff --git a/packages/runtime-tools-components/src/common/components/DataTable/DataTable.tsx b/packages/runtime-tools-components/src/components/DataTable/DataTable.tsx
similarity index 100%
rename from packages/runtime-tools-components/src/common/components/DataTable/DataTable.tsx
rename to packages/runtime-tools-components/src/components/DataTable/DataTable.tsx
diff --git a/packages/runtime-tools-components/src/common/components/DataTable/index.ts b/packages/runtime-tools-components/src/components/DataTable/index.ts
similarity index 100%
rename from packages/runtime-tools-components/src/common/components/DataTable/index.ts
rename to packages/runtime-tools-components/src/components/DataTable/index.ts
diff --git a/packages/runtime-tools-components/src/common/components/EndpointLink/EndpointLink.tsx b/packages/runtime-tools-components/src/components/EndpointLink/EndpointLink.tsx
similarity index 100%
rename from packages/runtime-tools-components/src/common/components/EndpointLink/EndpointLink.tsx
rename to packages/runtime-tools-components/src/components/EndpointLink/EndpointLink.tsx
diff --git a/packages/runtime-tools-components/src/common/components/EndpointLink/index.ts b/packages/runtime-tools-components/src/components/EndpointLink/index.ts
similarity index 100%
rename from packages/runtime-tools-components/src/common/components/EndpointLink/index.ts
rename to packages/runtime-tools-components/src/components/EndpointLink/index.ts
diff --git a/packages/runtime-tools-components/src/common/components/FormFooter/FormFooter.tsx b/packages/runtime-tools-components/src/components/FormFooter/FormFooter.tsx
similarity index 100%
rename from packages/runtime-tools-components/src/common/components/FormFooter/FormFooter.tsx
rename to packages/runtime-tools-components/src/components/FormFooter/FormFooter.tsx
diff --git a/packages/runtime-tools-components/src/common/components/FormFooter/index.ts b/packages/runtime-tools-components/src/components/FormFooter/index.ts
similarity index 100%
rename from packages/runtime-tools-components/src/common/components/FormFooter/index.ts
rename to packages/runtime-tools-components/src/components/FormFooter/index.ts
diff --git a/packages/runtime-tools-components/src/common/components/FormNotification/FormNotification.tsx b/packages/runtime-tools-components/src/components/FormNotification/FormNotification.tsx
similarity index 96%
rename from packages/runtime-tools-components/src/common/components/FormNotification/FormNotification.tsx
rename to packages/runtime-tools-components/src/components/FormNotification/FormNotification.tsx
index 0bc5bbace39..5b73ee62cbe 100644
--- a/packages/runtime-tools-components/src/common/components/FormNotification/FormNotification.tsx
+++ b/packages/runtime-tools-components/src/components/FormNotification/FormNotification.tsx
@@ -17,14 +17,14 @@
* under the License.
*/
-import React, { useState, useMemo } from "react";
+import React, { useState, useMemo, ReactElement } from "react";
import { Alert, AlertActionCloseButton, AlertActionLink } from "@patternfly/react-core/dist/js/components/Alert";
import { componentOuiaProps, OUIAProps } from "../../ouiaTools";
export interface Notification {
type: "success" | "error";
message: string;
- details?: string;
+ details?: ReactElement | string;
customActions?: Action[];
close: () => void;
}
diff --git a/packages/runtime-tools-components/src/common/components/FormNotification/index.ts b/packages/runtime-tools-components/src/components/FormNotification/index.ts
similarity index 100%
rename from packages/runtime-tools-components/src/common/components/FormNotification/index.ts
rename to packages/runtime-tools-components/src/components/FormNotification/index.ts
diff --git a/packages/runtime-tools-components/src/common/components/FormRenderer/FormRenderer.tsx b/packages/runtime-tools-components/src/components/FormRenderer/FormRenderer.tsx
similarity index 100%
rename from packages/runtime-tools-components/src/common/components/FormRenderer/FormRenderer.tsx
rename to packages/runtime-tools-components/src/components/FormRenderer/FormRenderer.tsx
diff --git a/packages/runtime-tools-components/src/common/components/FormRenderer/index.ts b/packages/runtime-tools-components/src/components/FormRenderer/index.ts
similarity index 100%
rename from packages/runtime-tools-components/src/common/components/FormRenderer/index.ts
rename to packages/runtime-tools-components/src/components/FormRenderer/index.ts
diff --git a/packages/runtime-tools-components/src/common/components/InlineEdit/InlineEdit.tsx b/packages/runtime-tools-components/src/components/InlineEdit/InlineEdit.tsx
similarity index 100%
rename from packages/runtime-tools-components/src/common/components/InlineEdit/InlineEdit.tsx
rename to packages/runtime-tools-components/src/components/InlineEdit/InlineEdit.tsx
diff --git a/packages/runtime-tools-components/src/common/components/InlineEdit/index.ts b/packages/runtime-tools-components/src/components/InlineEdit/index.ts
similarity index 100%
rename from packages/runtime-tools-components/src/common/components/InlineEdit/index.ts
rename to packages/runtime-tools-components/src/components/InlineEdit/index.ts
diff --git a/packages/runtime-tools-components/src/common/components/ItemDescriptor/ItemDescriptor.tsx b/packages/runtime-tools-components/src/components/ItemDescriptor/ItemDescriptor.tsx
similarity index 100%
rename from packages/runtime-tools-components/src/common/components/ItemDescriptor/ItemDescriptor.tsx
rename to packages/runtime-tools-components/src/components/ItemDescriptor/ItemDescriptor.tsx
diff --git a/packages/runtime-tools-components/src/common/components/ItemDescriptor/index.ts b/packages/runtime-tools-components/src/components/ItemDescriptor/index.ts
similarity index 100%
rename from packages/runtime-tools-components/src/common/components/ItemDescriptor/index.ts
rename to packages/runtime-tools-components/src/components/ItemDescriptor/index.ts
diff --git a/packages/runtime-tools-components/src/common/components/KeycloakUnavailablePage/KeycloakUnavailablePage.tsx b/packages/runtime-tools-components/src/components/KeycloakUnavailablePage/KeycloakUnavailablePage.tsx
similarity index 100%
rename from packages/runtime-tools-components/src/common/components/KeycloakUnavailablePage/KeycloakUnavailablePage.tsx
rename to packages/runtime-tools-components/src/components/KeycloakUnavailablePage/KeycloakUnavailablePage.tsx
diff --git a/packages/runtime-tools-components/src/common/components/KeycloakUnavailablePage/index.ts b/packages/runtime-tools-components/src/components/KeycloakUnavailablePage/index.ts
similarity index 100%
copy from packages/runtime-tools-components/src/common/components/KeycloakUnavailablePage/index.ts
copy to packages/runtime-tools-components/src/components/KeycloakUnavailablePage/index.ts
diff --git a/packages/runtime-tools-components/src/common/components/KogitoEmptyState/KogitoEmptyState.tsx b/packages/runtime-tools-components/src/components/KogitoEmptyState/KogitoEmptyState.tsx
similarity index 100%
rename from packages/runtime-tools-components/src/common/components/KogitoEmptyState/KogitoEmptyState.tsx
rename to packages/runtime-tools-components/src/components/KogitoEmptyState/KogitoEmptyState.tsx
diff --git a/packages/runtime-tools-components/src/common/components/KogitoEmptyState/index.ts b/packages/runtime-tools-components/src/components/KogitoEmptyState/index.ts
similarity index 100%
rename from packages/runtime-tools-components/src/common/components/KogitoEmptyState/index.ts
rename to packages/runtime-tools-components/src/components/KogitoEmptyState/index.ts
diff --git a/packages/runtime-tools-components/src/common/components/KogitoSpinner/KogitoSpinner.tsx b/packages/runtime-tools-components/src/components/KogitoSpinner/KogitoSpinner.tsx
similarity index 100%
rename from packages/runtime-tools-components/src/common/components/KogitoSpinner/KogitoSpinner.tsx
rename to packages/runtime-tools-components/src/components/KogitoSpinner/KogitoSpinner.tsx
diff --git a/packages/runtime-tools-components/src/common/components/KogitoSpinner/index.ts b/packages/runtime-tools-components/src/components/KogitoSpinner/index.ts
similarity index 100%
rename from packages/runtime-tools-components/src/common/components/KogitoSpinner/index.ts
rename to packages/runtime-tools-components/src/components/KogitoSpinner/index.ts
diff --git a/packages/runtime-tools-components/src/common/components/LoadMore/LoadMore.tsx b/packages/runtime-tools-components/src/components/LoadMore/LoadMore.tsx
similarity index 100%
rename from packages/runtime-tools-components/src/common/components/LoadMore/LoadMore.tsx
rename to packages/runtime-tools-components/src/components/LoadMore/LoadMore.tsx
diff --git a/packages/runtime-tools-components/src/common/components/LoadMore/index.ts b/packages/runtime-tools-components/src/components/LoadMore/index.ts
similarity index 100%
rename from packages/runtime-tools-components/src/common/components/LoadMore/index.ts
rename to packages/runtime-tools-components/src/components/LoadMore/index.ts
diff --git a/packages/runtime-tools-components/src/common/components/PageLayout/PageLayout.tsx b/packages/runtime-tools-components/src/components/PageLayout/PageLayout.tsx
similarity index 100%
rename from packages/runtime-tools-components/src/common/components/PageLayout/PageLayout.tsx
rename to packages/runtime-tools-components/src/components/PageLayout/PageLayout.tsx
diff --git a/packages/runtime-tools-components/src/common/components/PageLayout/index.ts b/packages/runtime-tools-components/src/components/PageLayout/index.ts
similarity index 100%
rename from packages/runtime-tools-components/src/common/components/PageLayout/index.ts
rename to packages/runtime-tools-components/src/components/PageLayout/index.ts
diff --git a/packages/runtime-tools-components/src/common/components/PageSectionHeader/PageSectionHeader.tsx b/packages/runtime-tools-components/src/components/PageSectionHeader/PageSectionHeader.tsx
similarity index 94%
rename from packages/runtime-tools-components/src/common/components/PageSectionHeader/PageSectionHeader.tsx
rename to packages/runtime-tools-components/src/components/PageSectionHeader/PageSectionHeader.tsx
index 0b228b677ad..7080a0c4dbf 100644
--- a/packages/runtime-tools-components/src/common/components/PageSectionHeader/PageSectionHeader.tsx
+++ b/packages/runtime-tools-components/src/components/PageSectionHeader/PageSectionHeader.tsx
@@ -17,7 +17,7 @@
* under the License.
*/
import * as React from "react";
-import { useMemo } from "react";
+import { useMemo, ReactElement } from "react";
import { Link } from "react-router-dom";
import { PageSection } from "@patternfly/react-core/dist/js/components/Page";
import { Breadcrumb, BreadcrumbItem } from "@patternfly/react-core/dist/js/components/Breadcrumb";
@@ -27,8 +27,8 @@ import * as H from "history";
type pathType = Pick<H.Location, "pathname" | "state"> | H.LocationDescriptor;
interface PageSectionHeaderProps {
- titleText: string;
- breadcrumbText?: string[];
+ titleText: string | ReactElement;
+ breadcrumbText?: (string | ReactElement)[];
breadcrumbPath?: Array<pathType | string>;
}
export const PageSectionHeader: React.FC<PageSectionHeaderProps & OUIAProps> = ({
diff --git a/packages/runtime-tools-components/src/common/components/PageSectionHeader/index.ts b/packages/runtime-tools-components/src/components/PageSectionHeader/index.ts
similarity index 100%
rename from packages/runtime-tools-components/src/common/components/PageSectionHeader/index.ts
rename to packages/runtime-tools-components/src/components/PageSectionHeader/index.ts
diff --git a/packages/runtime-tools-components/src/common/components/PageTitle/PageTitle.tsx b/packages/runtime-tools-components/src/components/PageTitle/PageTitle.tsx
similarity index 97%
rename from packages/runtime-tools-components/src/common/components/PageTitle/PageTitle.tsx
rename to packages/runtime-tools-components/src/components/PageTitle/PageTitle.tsx
index 62a1b5f750c..bf2fb411c8f 100644
--- a/packages/runtime-tools-components/src/common/components/PageTitle/PageTitle.tsx
+++ b/packages/runtime-tools-components/src/components/PageTitle/PageTitle.tsx
@@ -29,7 +29,7 @@ export interface IOwnProps {
export const PageTitle: React.FC<IOwnProps & OUIAProps> = ({ title, extra, ouiaId, ouiaSafe }) => {
return (
- <Flex {...componentOuiaProps(ouiaId, "page-title", ouiaSafe)}>
+ <Flex {...componentOuiaProps(ouiaId, "page-title", ouiaSafe)} style={{ marginTop: "8px" }}>
<FlexItem spacer={{ default: "spacerSm" }}>
<Title headingLevel="h1" size="4xl">
{title}
diff --git a/packages/runtime-tools-components/src/common/components/PageTitle/index.ts b/packages/runtime-tools-components/src/components/PageTitle/index.ts
similarity index 100%
rename from packages/runtime-tools-components/src/common/components/PageTitle/index.ts
rename to packages/runtime-tools-components/src/components/PageTitle/index.ts
diff --git a/packages/runtime-tools-components/src/common/components/PageToolbar/PageToolbar.tsx b/packages/runtime-tools-components/src/components/PageToolbar/PageToolbar.tsx
similarity index 100%
rename from packages/runtime-tools-components/src/common/components/PageToolbar/PageToolbar.tsx
rename to packages/runtime-tools-components/src/components/PageToolbar/PageToolbar.tsx
diff --git a/packages/runtime-tools-components/src/common/components/ProcessInfoModal/ProcessInfoModal.tsx b/packages/runtime-tools-components/src/components/ProcessInfoModal/ProcessInfoModal.tsx
similarity index 100%
rename from packages/runtime-tools-components/src/common/components/ProcessInfoModal/ProcessInfoModal.tsx
rename to packages/runtime-tools-components/src/components/ProcessInfoModal/ProcessInfoModal.tsx
diff --git a/packages/runtime-tools-components/src/common/components/ProcessInfoModal/index.ts b/packages/runtime-tools-components/src/components/ProcessInfoModal/index.ts
similarity index 100%
rename from packages/runtime-tools-components/src/common/components/ProcessInfoModal/index.ts
rename to packages/runtime-tools-components/src/components/ProcessInfoModal/index.ts
diff --git a/packages/runtime-tools-components/src/common/components/RequestDataEditor/RequestDataEditor.tsx b/packages/runtime-tools-components/src/components/RequestDataEditor/RequestDataEditor.tsx
similarity index 100%
rename from packages/runtime-tools-components/src/common/components/RequestDataEditor/RequestDataEditor.tsx
rename to packages/runtime-tools-components/src/components/RequestDataEditor/RequestDataEditor.tsx
diff --git a/packages/runtime-tools-components/src/common/components/RequestDataEditor/RequestDataEditorController.ts b/packages/runtime-tools-components/src/components/RequestDataEditor/RequestDataEditorController.ts
similarity index 100%
copy from packages/runtime-tools-components/src/common/components/RequestDataEditor/RequestDataEditorController.ts
copy to packages/runtime-tools-components/src/components/RequestDataEditor/RequestDataEditorController.ts
diff --git a/packages/runtime-tools-components/src/common/components/RequestDataEditor/index.ts b/packages/runtime-tools-components/src/components/RequestDataEditor/index.ts
similarity index 100%
rename from packages/runtime-tools-components/src/common/components/RequestDataEditor/index.ts
rename to packages/runtime-tools-components/src/components/RequestDataEditor/index.ts
diff --git a/packages/runtime-tools-components/src/common/components/ServerErrors/ServerErrors.tsx b/packages/runtime-tools-components/src/components/ServerErrors/ServerErrors.tsx
similarity index 90%
rename from packages/runtime-tools-components/src/common/components/ServerErrors/ServerErrors.tsx
rename to packages/runtime-tools-components/src/components/ServerErrors/ServerErrors.tsx
index 59cf252ef48..b3a7c6131c1 100644
--- a/packages/runtime-tools-components/src/common/components/ServerErrors/ServerErrors.tsx
+++ b/packages/runtime-tools-components/src/components/ServerErrors/ServerErrors.tsx
@@ -26,21 +26,22 @@ import {
EmptyStateBody,
EmptyStateHeader,
EmptyStateFooter,
-} from "@patternfly/react-core/components";
+ EmptyStateActions,
+} from "@patternfly/react-core/dist/js/components/EmptyState";
import { ClipboardCopy, ClipboardCopyVariant } from "@patternfly/react-core/dist/js/components/ClipboardCopy";
import { PageSection } from "@patternfly/react-core/dist/js/components/Page";
import { Button } from "@patternfly/react-core/dist/js/components/Button";
import { Bullseye } from "@patternfly/react-core/dist/js/layouts/Bullseye";
import { ExclamationCircleIcon } from "@patternfly/react-icons/dist/js/icons/exclamation-circle-icon";
-import { componentOuiaProps, OUIAProps } from "../../ouiaTools";
-interface IOwnProps {
+interface Props {
error: any;
variant: string;
children?: React.ReactElement;
+ onGoBack?: () => void;
}
-export const ServerErrors: React.FC<IOwnProps & OUIAProps> = ({ ouiaId, ouiaSafe, ...props }) => {
+export const ServerErrors: React.FC<Props> = (props) => {
const [displayError, setDisplayError] = useState(false);
const getErrorSubTitle = () => {
@@ -79,7 +80,7 @@ export const ServerErrors: React.FC<IOwnProps & OUIAProps> = ({ ouiaId, ouiaSafe
};
const renderContent = () => (
- <Bullseye {...componentOuiaProps(ouiaId, "server-errors", ouiaSafe)}>
+ <Bullseye>
<EmptyState variant={EmptyStateVariant.full}>
<EmptyStateHeader
titleText="Error fetching data"
@@ -105,6 +106,13 @@ export const ServerErrors: React.FC<IOwnProps & OUIAProps> = ({ ouiaId, ouiaSafe
</ClipboardCopy>
</EmptyStateBody>
)}
+ {props.onGoBack && (
+ <EmptyStateActions>
+ <Button variant="link" onClick={props.onGoBack}>
+ Go back
+ </Button>
+ </EmptyStateActions>
+ )}
{props.children}
</EmptyStateFooter>
</EmptyState>
diff --git a/packages/runtime-tools-components/src/common/components/ServerErrors/index.ts b/packages/runtime-tools-components/src/components/ServerErrors/index.ts
similarity index 100%
rename from packages/runtime-tools-components/src/common/components/ServerErrors/index.ts
rename to packages/runtime-tools-components/src/components/ServerErrors/index.ts
diff --git a/packages/runtime-tools-components/src/common/components/WorkflowInfoModal/WorkflowInfoModal.tsx b/packages/runtime-tools-components/src/components/WorkflowInfoModal/WorkflowInfoModal.tsx
similarity index 100%
rename from packages/runtime-tools-components/src/common/components/WorkflowInfoModal/WorkflowInfoModal.tsx
rename to packages/runtime-tools-components/src/components/WorkflowInfoModal/WorkflowInfoModal.tsx
diff --git a/packages/runtime-tools-components/src/common/components/WorkflowInfoModal/index.ts b/packages/runtime-tools-components/src/components/WorkflowInfoModal/index.ts
similarity index 100%
rename from packages/runtime-tools-components/src/common/components/WorkflowInfoModal/index.ts
rename to packages/runtime-tools-components/src/components/WorkflowInfoModal/index.ts
diff --git a/packages/runtime-tools-components/src/common/components/styles.css b/packages/runtime-tools-components/src/components/styles.css
similarity index 100%
rename from packages/runtime-tools-components/src/common/components/styles.css
rename to packages/runtime-tools-components/src/components/styles.css
diff --git a/packages/runtime-tools-components/src/common/contexts/BrandContext/BrandContext.ts b/packages/runtime-tools-components/src/contexts/BrandContext/BrandContext.ts
similarity index 100%
copy from packages/runtime-tools-components/src/common/contexts/BrandContext/BrandContext.ts
copy to packages/runtime-tools-components/src/contexts/BrandContext/BrandContext.ts
diff --git a/packages/runtime-tools-components/src/common/contexts/KogitoAppContext/KogitoAppContext.ts b/packages/runtime-tools-components/src/contexts/KogitoAppContext/KogitoAppContext.ts
similarity index 92%
rename from packages/runtime-tools-components/src/common/contexts/KogitoAppContext/KogitoAppContext.ts
rename to packages/runtime-tools-components/src/contexts/KogitoAppContext/KogitoAppContext.ts
index 57acae01325..031d20dbc2f 100644
--- a/packages/runtime-tools-components/src/common/contexts/KogitoAppContext/KogitoAppContext.ts
+++ b/packages/runtime-tools-components/src/contexts/KogitoAppContext/KogitoAppContext.ts
@@ -36,8 +36,6 @@ export class AppContextImpl implements AppContext {
}
}
-const KogitoAppContext = React.createContext<AppContext>({} as AppContext);
-
-export default KogitoAppContext;
+export const KogitoAppContext = React.createContext<AppContext>({} as AppContext);
export const useKogitoAppContext = () => useContext<AppContext>(KogitoAppContext);
diff --git a/packages/runtime-tools-components/src/common/contexts/KogitoAppContext/KogitoAppContextProvider.tsx b/packages/runtime-tools-components/src/contexts/KogitoAppContext/KogitoAppContextProvider.tsx
similarity index 84%
rename from packages/runtime-tools-components/src/common/contexts/KogitoAppContext/KogitoAppContextProvider.tsx
rename to packages/runtime-tools-components/src/contexts/KogitoAppContext/KogitoAppContextProvider.tsx
index 6f733f4337d..3d626d32e68 100644
--- a/packages/runtime-tools-components/src/common/contexts/KogitoAppContext/KogitoAppContextProvider.tsx
+++ b/packages/runtime-tools-components/src/contexts/KogitoAppContext/KogitoAppContextProvider.tsx
@@ -18,14 +18,12 @@
*/
import React from "react";
import { UserContext } from "./auth/Auth";
-import KogitoAppContext, { AppContextImpl } from "./KogitoAppContext";
+import { KogitoAppContext, AppContextImpl } from "./KogitoAppContext";
interface IOwnProps {
userContext: UserContext;
}
-const KogitoAppContextProvider: React.FC<IOwnProps> = ({ userContext, children }) => {
+export const KogitoAppContextProvider: React.FC<IOwnProps> = ({ userContext, children }) => {
return <KogitoAppContext.Provider value={new AppContextImpl(userContext)}>{children}</KogitoAppContext.Provider>;
};
-
-export default KogitoAppContextProvider;
diff --git a/packages/runtime-tools-components/src/common/contexts/KogitoAppContext/TestUserContext.ts b/packages/runtime-tools-components/src/contexts/KogitoAppContext/TestUserContext.ts
similarity index 100%
copy from packages/runtime-tools-components/src/common/contexts/KogitoAppContext/TestUserContext.ts
copy to packages/runtime-tools-components/src/contexts/KogitoAppContext/TestUserContext.ts
diff --git a/packages/runtime-tools-components/src/common/contexts/KogitoAppContext/auth/Auth.ts b/packages/runtime-tools-components/src/contexts/KogitoAppContext/auth/Auth.ts
similarity index 100%
rename from packages/runtime-tools-components/src/common/contexts/KogitoAppContext/auth/Auth.ts
rename to packages/runtime-tools-components/src/contexts/KogitoAppContext/auth/Auth.ts
diff --git a/packages/runtime-tools-components/src/common/contexts/KogitoAppContext/auth/KeycloakUserContext.ts b/packages/runtime-tools-components/src/contexts/KogitoAppContext/auth/KeycloakUserContext.ts
similarity index 100%
rename from packages/runtime-tools-components/src/common/contexts/KogitoAppContext/auth/KeycloakUserContext.ts
rename to packages/runtime-tools-components/src/contexts/KogitoAppContext/auth/KeycloakUserContext.ts
diff --git a/packages/runtime-tools-components/src/common/contexts/KogitoAppContext/auth/index.ts b/packages/runtime-tools-components/src/contexts/KogitoAppContext/auth/index.ts
similarity index 100%
rename from packages/runtime-tools-components/src/common/contexts/KogitoAppContext/auth/index.ts
rename to packages/runtime-tools-components/src/contexts/KogitoAppContext/auth/index.ts
diff --git a/packages/runtime-tools-components/src/common/contexts/KogitoAppContext/index.ts b/packages/runtime-tools-components/src/contexts/KogitoAppContext/index.ts
similarity index 82%
rename from packages/runtime-tools-components/src/common/contexts/KogitoAppContext/index.ts
rename to packages/runtime-tools-components/src/contexts/KogitoAppContext/index.ts
index 2600adc3797..de14104df2d 100644
--- a/packages/runtime-tools-components/src/common/contexts/KogitoAppContext/index.ts
+++ b/packages/runtime-tools-components/src/contexts/KogitoAppContext/index.ts
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-export { default as KogitoAppContext, AppContext, useKogitoAppContext } from "./KogitoAppContext";
-export { default as KogitoAppContextProvider } from "./KogitoAppContextProvider";
+export { KogitoAppContext, AppContext, useKogitoAppContext } from "./KogitoAppContext";
+export { KogitoAppContextProvider } from "./KogitoAppContextProvider";
export * from "./TestUserContext";
export * from "./auth";
diff --git a/packages/runtime-tools-components/config/declare.d.ts b/packages/runtime-tools-components/src/declare.d.ts
similarity index 100%
rename from packages/runtime-tools-components/config/declare.d.ts
rename to packages/runtime-tools-components/src/declare.d.ts
diff --git a/packages/runtime-tools-components/src/common/ouiaTools/OuiaUtils.ts b/packages/runtime-tools-components/src/ouiaTools/OuiaUtils.ts
similarity index 100%
rename from packages/runtime-tools-components/src/common/ouiaTools/OuiaUtils.ts
rename to packages/runtime-tools-components/src/ouiaTools/OuiaUtils.ts
diff --git a/packages/runtime-tools-components/src/common/ouiaTools/index.ts b/packages/runtime-tools-components/src/ouiaTools/index.ts
similarity index 100%
rename from packages/runtime-tools-components/src/common/ouiaTools/index.ts
rename to packages/runtime-tools-components/src/ouiaTools/index.ts
diff --git a/packages/runtime-tools-components/src/common/utils/FormActionsUtils.tsx b/packages/runtime-tools-components/src/utils/FormActionsUtils.tsx
similarity index 100%
rename from packages/runtime-tools-components/src/common/utils/FormActionsUtils.tsx
rename to packages/runtime-tools-components/src/utils/FormActionsUtils.tsx
diff --git a/packages/runtime-tools-components/src/common/utils/FormValidator.ts b/packages/runtime-tools-components/src/utils/FormValidator.ts
similarity index 100%
rename from packages/runtime-tools-components/src/common/utils/FormValidator.ts
rename to packages/runtime-tools-components/src/utils/FormValidator.ts
diff --git a/packages/runtime-tools-components/src/common/utils/KeycloakClient.ts b/packages/runtime-tools-components/src/utils/KeycloakClient.ts
similarity index 100%
rename from packages/runtime-tools-components/src/common/utils/KeycloakClient.ts
rename to packages/runtime-tools-components/src/utils/KeycloakClient.ts
diff --git a/packages/runtime-tools-components/src/common/utils/ModelConversionTool.ts b/packages/runtime-tools-components/src/utils/ModelConversionTool.ts
similarity index 100%
rename from packages/runtime-tools-components/src/common/utils/ModelConversionTool.ts
rename to packages/runtime-tools-components/src/utils/ModelConversionTool.ts
diff --git a/packages/runtime-tools-components/src/common/utils/Utils.tsx b/packages/runtime-tools-components/src/utils/Utils.tsx
similarity index 100%
rename from packages/runtime-tools-components/src/common/utils/Utils.tsx
rename to packages/runtime-tools-components/src/utils/Utils.tsx
diff --git a/packages/runtime-tools-components/src/common/utils/index.ts b/packages/runtime-tools-components/src/utils/index.ts
similarity index 100%
rename from packages/runtime-tools-components/src/common/utils/index.ts
rename to packages/runtime-tools-components/src/utils/index.ts
diff --git a/packages/runtime-tools-components/tsconfig.json b/packages/runtime-tools-components/tsconfig.json
index 42fa486794b..61c36328677 100644
--- a/packages/runtime-tools-components/tsconfig.json
+++ b/packages/runtime-tools-components/tsconfig.json
@@ -5,5 +5,5 @@
"jsx": "react-jsx",
"noImplicitAny": false
},
- "include": ["src", "./config/declare.d.ts"]
+ "include": ["src", "src/declare.d.ts"]
}
diff --git a/packages/runtime-tools-management-console-webapp/dev-webapp/secured-runtime/pom.xml b/packages/runtime-tools-management-console-webapp/dev-webapp/secured-runtime/pom.xml
index dfaaa047a6f..7b58bf640be 100644
--- a/packages/runtime-tools-management-console-webapp/dev-webapp/secured-runtime/pom.xml
+++ b/packages/runtime-tools-management-console-webapp/dev-webapp/secured-runtime/pom.xml
@@ -32,6 +32,7 @@
<!-- This is a development app. It's better that we use an arbitrary string to not make this more complicated than it has to be. -->
<artifactId>management-console-dev-webapp-runtime</artifactId>
+ <name>KIE Tools :: Management Console Web App :: Secured Runtime</name>
<version>999-dev</version>
<dependencies>
diff --git a/packages/runtime-tools-management-console-webapp/dev-webapp/unsecured-runtime/pom.xml b/packages/runtime-tools-management-console-webapp/dev-webapp/unsecured-runtime/pom.xml
index 8e5da1edfad..8ba0285dba8 100644
--- a/packages/runtime-tools-management-console-webapp/dev-webapp/unsecured-runtime/pom.xml
+++ b/packages/runtime-tools-management-console-webapp/dev-webapp/unsecured-runtime/pom.xml
@@ -32,8 +32,21 @@
<!-- This is a development app. It's better that we use an arbitrary string to not make this more complicated than it has to be. -->
<artifactId>management-console-dev-webapp-runtime</artifactId>
+ <name>KIE Tools :: Management Console Web App :: Unsecured Runtime</name>
<version>999-dev</version>
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.jbpm</groupId>
+ <artifactId>jbpm-quarkus-devui-bom</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
@@ -113,6 +126,22 @@
<groupId>org.kie</groupId>
<artifactId>kogito-addons-quarkus-data-audit</artifactId>
</dependency>
+
+ <!-- DevUI -->
+ <dependency>
+ <groupId>org.jbpm</groupId>
+ <artifactId>jbpm-quarkus-devui</artifactId>
+ </dependency>
+
+ <!-- Messaging -->
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-smallrye-reactive-messaging-kafka</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.kie</groupId>
+ <artifactId>kie-addons-quarkus-messaging</artifactId>
+ </dependency>
</dependencies>
<build>
diff --git a/packages/runtime-tools-components/src/common/contexts/KogitoAppContext/TestUserContext.ts b/packages/runtime-tools-management-console-webapp/dev-webapp/unsecured-runtime/src/main/java/org/acme/message/Message.java
similarity index 53%
rename from packages/runtime-tools-components/src/common/contexts/KogitoAppContext/TestUserContext.ts
rename to packages/runtime-tools-management-console-webapp/dev-webapp/unsecured-runtime/src/main/java/org/acme/message/Message.java
index 854b345db98..b8ae897e192 100644
--- a/packages/runtime-tools-components/src/common/contexts/KogitoAppContext/TestUserContext.ts
+++ b/packages/runtime-tools-management-console-webapp/dev-webapp/unsecured-runtime/src/main/java/org/acme/message/Message.java
@@ -1,4 +1,4 @@
-/**
+/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -16,15 +16,44 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { ANONYMOUS_USER, User, UserContext } from "./auth";
-export class TestUserContext implements UserContext {
- public readonly user: User;
- constructor() {
- this.user = ANONYMOUS_USER;
- }
+ package org.acme.message;
- getCurrentUser(): User {
- return this.user;
- }
-}
+ public class Message {
+
+ private String id;
+ private String content;
+
+ public Message() {
+
+ }
+
+ public Message(String id, String content) {
+ super();
+ this.id = id;
+ this.content = content;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getContent() {
+ return content;
+ }
+
+ public void setContent(String content) {
+ this.content = content;
+ }
+
+ @Override
+ public String toString() {
+ return "{ 'id': '" + id + "', 'content': '" + content + "'" + "}";
+ }
+ }
+
+
\ No newline at end of file
diff --git a/packages/runtime-tools-management-console-webapp/dev-webapp/unsecured-runtime/src/main/java/org/acme/travel/Traveler.java b/packages/runtime-tools-management-console-webapp/dev-webapp/unsecured-runtime/src/main/java/org/acme/travel/Traveler.java
new file mode 100644
index 00000000000..e90241b7ad4
--- /dev/null
+++ b/packages/runtime-tools-management-console-webapp/dev-webapp/unsecured-runtime/src/main/java/org/acme/travel/Traveler.java
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.acme.travel;
+
+public class Traveler {
+
+ private String firstName;
+ private String lastName;
+ private String email;
+ private String nationality;
+ private String hotelId;
+
+ private boolean processed;
+
+ public Traveler() {
+
+ }
+
+ public Traveler(String firstName, String lastName, String email, String nationality, String hotelId) {
+ super();
+ this.firstName = firstName;
+ this.lastName = lastName;
+ this.email = email;
+ this.nationality = nationality;
+ this.hotelId = hotelId;
+ }
+
+ public String getFirstName() {
+ return firstName;
+ }
+
+ public void setFirstName(String firstName) {
+ this.firstName = firstName;
+ }
+
+ public String getLastName() {
+ return lastName;
+ }
+
+ public void setLastName(String lastName) {
+ this.lastName = lastName;
+ }
+
+ public String getEmail() {
+ return email;
+ }
+
+ public void setEmail(String email) {
+ this.email = email;
+ }
+
+ public String getNationality() {
+ return nationality;
+ }
+
+ public void setNationality(String nationality) {
+ this.nationality = nationality;
+ }
+
+ public String getHotelId() {
+ return hotelId;
+ }
+
+ public void setHotelId(String hotelId) {
+ this.hotelId = hotelId;
+ }
+
+ public boolean isProcessed() {
+ return processed;
+ }
+
+ public void setProcessed(boolean processed) {
+ this.processed = processed;
+ }
+
+ @Override
+ public String toString() {
+ return "Traveler [firstName=" + firstName + ", lastName=" + lastName + ", email=" + email + ", nationality="
+ + nationality + ", processed=" + processed + ", hotelId=" + hotelId + "]";
+ }
+
+}
diff --git a/packages/runtime-tools-process-enveloped-components/src/taskInbox/api/TaskInboxApi.ts b/packages/runtime-tools-management-console-webapp/dev-webapp/unsecured-runtime/src/main/java/org/acme/travel/TravelerValidationService.java
similarity index 73%
rename from packages/runtime-tools-process-enveloped-components/src/taskInbox/api/TaskInboxApi.ts
rename to packages/runtime-tools-management-console-webapp/dev-webapp/unsecured-runtime/src/main/java/org/acme/travel/TravelerValidationService.java
index d8ddd132e96..afcf744fdac 100644
--- a/packages/runtime-tools-process-enveloped-components/src/taskInbox/api/TaskInboxApi.ts
+++ b/packages/runtime-tools-management-console-webapp/dev-webapp/unsecured-runtime/src/main/java/org/acme/travel/TravelerValidationService.java
@@ -1,4 +1,4 @@
-/**
+/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -16,6 +16,14 @@
* specific language governing permissions and limitations
* under the License.
*/
-export interface TaskInboxApi {
- taskInbox__notify: (userName: string) => Promise<void>;
+package org.acme.travel;
+
+import org.drools.ruleunits.api.*;
+
+public class TravelerValidationService implements RuleUnitData {
+ private final SingletonStore<Traveler> traveler = DataSource.createSingleton();
+
+ public SingletonStore<Traveler> getTraveler() {
+ return traveler;
+ }
}
diff --git a/packages/runtime-tools-management-console-webapp/dev-webapp/unsecured-runtime/src/main/resources/META-INF/processSVG/travelers.svg b/packages/runtime-tools-management-console-webapp/dev-webapp/unsecured-runtime/src/main/resources/META-INF/processSVG/travelers.svg
new file mode 100644
index 00000000000..d9f6ce07723
--- /dev/null
+++ b/packages/runtime-tools-management-console-webapp/dev-webapp/unsecured-runtime/src/main/resources/META-INF/processSVG/travelers.svg
@@ -0,0 +1,936 @@
+<svg
+ version="1.1"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ width="1356"
+ height="432"
+ viewBox="0 0 1356 432"
+>
+ <!--
+ - Licensed to the Apache Software Foundation (ASF) under one
+ - or more contributor license agreements. See the NOTICE file
+ - distributed with this work for additional information
+ - regarding copyright ownership. The ASF licenses this file
+ - to you under the Apache License, Version 2.0 (the
+ - "License"); you may not use this file except in compliance
+ - with the License. You may obtain a copy of the License at
+ -
+ - http://www.apache.org/licenses/LICENSE-2.0
+ -
+ - Unless required by applicable law or agreed to in writing,
+ - software distributed under the License is distributed on an
+ - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ - KIND, either express or implied. See the License for the
+ - specific language governing permissions and limitations
+ - under the License.
+ -->
+ <defs />
+ <g transform="matrix(1,0,0,1,0,0)">
+ <g>
+ <g>
+ <g>
+ <path
+ fill="none"
+ stroke="#d3d3d3"
+ paint-order="fill stroke markers"
+ d=" M 0 0 L 1200 0"
+ stroke-miterlimit="10"
+ stroke-opacity="0.8"
+ stroke-dasharray="5"
+ />
+ </g>
+ <g>
+ <path
+ fill="none"
+ stroke="#d3d3d3"
+ paint-order="fill stroke markers"
+ d=" M 0 0 L 0 800"
+ stroke-miterlimit="10"
+ stroke-opacity="0.8"
+ stroke-dasharray="5"
+ />
+ </g>
+ </g>
+ <g
+ id="_0E0784C3-1BEC-4A51-A5E6-D7E5DA3A4402"
+ bpmn2nodeid="_0E0784C3-1BEC-4A51-A5E6-D7E5DA3A4402"
+ transform="matrix(1,0,0,1,1250,112)"
+ >
+ <g>
+ <path fill="none" stroke="none" />
+ </g>
+ <g transform="matrix(0.125,0,0,0.125,0,0)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#fce7e7"
+ stroke="black"
+ id="_0E0784C3-1BEC-4A51-A5E6-D7E5DA3A4402?shapeType=BACKGROUND"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 444 224 C 444 263.9 434.2 300.8 414.4 334.5 C 394.7 368.2 368 394.9 334.4 414.5 C 300.79999999999995 434.1 263.9 444 224 444 C 184.10000000000002 444 147.2 434.2 113.5 414.4 C 79.8 394.7 53.1 368 33.5 334.4 C 13.899999999999999 300.79999999999995 4 263.9 4 224 C 4 184.10000000000002 13.8 147.2 33.6 113.5 C 53.400000000000006 79.80000000000001 80.1 53.1 113.6 33.5 C 147.1 13.899999999999999 184.1 4 224 4 C 263.9 4 300.8 13.8 334.5 33.6 C 368.2 53.400000000000006 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#a30000"
+ stroke="black"
+ id="_0E0784C3-1BEC-4A51-A5E6-D7E5DA3A4402?shapeType=BORDER&renderType=FILL"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 224 0 C 100.3 0 0 100.3 0 224 C 0 347.7 100.3 448 224 448 C 347.7 448 448 347.7 448 224 C 448 100.30000000000001 347.7 0 224 0 Z M 0 0 M 224 400 C 126.8 400 48 321.2 48 224 C 48 126.80000000000001 126.8 48 224 48 C 321.2 48 400 126.8 400 224 C 400 321.2 321.2 400 224 400 Z"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ </g>
+ </g>
+ <g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#a30000"
+ stroke="black"
+ id="_0E0784C3-1BEC-4A51-A5E6-D7E5DA3A4402_message-throwing"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 336.2 189.4 L 336.2 288.7 C 336.2 294.2 334.3 298.9 330.3 302.8 C 326.40000000000003 306.7 321.7 308.7 316.2 308.7 L 132.2 308.7 C 126.69999999999999 308.7 121.99999999999999 306.7 118.1 302.8 C 114.19999999999999 298.90000000000003 112.19999999999999 294.2 112.19999999999999 288.7 L 112.19999999999999 189.39999999999998 C 115.89999999999999 193.49999999999997 120.1 197.09999999999997 124.79999999999998 200.29999999999998 C 154.99999999999997 220.79999999999 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ </g>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,-40.890625,61)">
+ <text
+ fill="#000000"
+ stroke="none"
+ font-family="Open Sans"
+ font-size="12pt"
+ font-style="normal"
+ font-weight="normal"
+ text-decoration="normal"
+ x="68.890625"
+ y="12"
+ text-anchor="middle"
+ dominant-baseline="alphabetic"
+ >processed traveler</text>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,1250,112)" />
+ <g
+ id="_58FF9DA5-06C6-4D71-91CD-6EAE4E999CF9"
+ bpmn2nodeid="_58FF9DA5-06C6-4D71-91CD-6EAE4E999CF9"
+ transform="matrix(1,0,0,1,511,112)"
+ >
+ <g>
+ <path fill="none" stroke="none" />
+ </g>
+ <g transform="matrix(0.125,0,0,0.125,0,0)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#fef4ea"
+ stroke="black"
+ id="_58FF9DA5-06C6-4D71-91CD-6EAE4E999CF9?shapeType=BACKGROUND"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 224.4 4.3 C 216.4 4.3 208.4 7.3 202.3 13.399999999999999 L 13.5 202.2 C 1.3000000000000007 214.39999999999998 1.3000000000000007 234.2 13.5 246.39999999999998 L 202.2 435.09999999999997 C 208.29999999999998 441.2 216.39999999999998 444.2 224.29999999999998 444.2 C 232.2 444.2 240.29999999999998 441.2 246.39999999999998 435.09999999999997 L 435.09999999999997 246.39999999999998 C 447.29999999999995 234.2 447.29999999999995 214.39999999999998 435.09999999999997 20 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#ec7a08"
+ stroke="black"
+ id="_58FF9DA5-06C6-4D71-91CD-6EAE4E999CF9?shapeType=BORDER&renderType=FILL"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 20.8 212.7 L 213.3 20.2 C 219.60000000000002 13.899999999999999 229.70000000000002 13.899999999999999 235.9 20.2 L 428.4 212.7 C 434.7 219 434.7 229.1 428.4 235.29999999999998 L 235.9 427.8 C 229.6 434.1 219.5 434.1 213.3 427.8 L 20.8 235.3 C 14.5 229.1 14.5 218.9 20.8 212.7 L 20.8 212.7 Z M 0 0 M 0 224 C 0 232.1 3.1 240.3 9.3 246.5 L 201.5 438.7 C 213.9 451.09999999999997 234.1 451.09999999999997 246.5 438.7 L 438.7 246.5 C 444.9 240.3 448 232.1 448 224 C 4 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ </g>
+ </g>
+ <g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#ec7a08"
+ stroke="black"
+ id="_58FF9DA5-06C6-4D71-91CD-6EAE4E999CF9_exclusive"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 298.2 269.2 C 298.2 272.59999999999997 297.09999999999997 275.3 294.7 277.7 L 277.7 294.7 C 275.3 297.09999999999997 272.59999999999997 298.2 269.2 298.2 C 265.8 298.2 263.09999999999997 297.09999999999997 260.7 294.7 L 224 258 L 187.2 294.8 C 184.79999999999998 297.2 182.1 298.3 178.7 298.3 C 175.29999999999998 298.3 172.6 297.2 170.2 294.8 L 153.2 277.8 C 150.79999999999998 275.40000000000003 149.7 272.7 149.7 269.3 C 149.7 265.90000000000003 150.799999999 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ </g>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,-45.44140625,61)">
+ <text
+ fill="#000000"
+ stroke="none"
+ font-family="Open Sans"
+ font-size="12pt"
+ font-style="normal"
+ font-weight="normal"
+ text-decoration="normal"
+ x="73.44140625"
+ y="12"
+ text-anchor="middle"
+ dominant-baseline="alphabetic"
+ >Processed Traveler?</text>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,511,112)" />
+ <g
+ id="_60FA6326-76DC-4DB2-AB06-DB8AC8EE8DC8"
+ bpmn2nodeid="_60FA6326-76DC-4DB2-AB06-DB8AC8EE8DC8"
+ transform="matrix(1,0,0,1,277,89)"
+ >
+ <g>
+ <path fill="none" stroke="none" />
+ </g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#ffffff"
+ stroke="none"
+ id="_60FA6326-76DC-4DB2-AB06-DB8AC8EE8DC8?shapeType=BACKGROUND"
+ paint-order="stroke fill markers"
+ d=" M 2 0 L 152 0 L 152 0 A 2 2 0 0 1 154 2 L 154 100 L 154 100 A 2 2 0 0 1 152 102 L 2 102 L 2 102 A 2 2 0 0 1 0 100 L 0 2 L 0 2.0000000000000004 A 2 2 0 0 1 1.9999999999999996 0 Z"
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="none"
+ stroke="#000000"
+ id="_60FA6326-76DC-4DB2-AB06-DB8AC8EE8DC8?shapeType=BORDER&renderType=STROKE"
+ paint-order="fill stroke markers"
+ d=" M 2 0 L 152 0 L 152 0 A 2 2 0 0 1 154 2 L 154 100 L 154 100 A 2 2 0 0 1 152 102 L 2 102 L 2 102 A 2 2 0 0 1 0 100 L 0 2 L 0 2.0000000000000004 A 2 2 0 0 1 1.9999999999999996 0 Z"
+ stroke-miterlimit="10"
+ stroke-width="1.5"
+ stroke-dasharray=""
+ />
+ </g>
+ <g>
+ <g transform="matrix(0.06,0,0,0.06,9.4,9.4)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#393f44"
+ stroke="black"
+ id="_60FA6326-76DC-4DB2-AB06-DB8AC8EE8DC8_task__ZpeA__sKvt"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 128 344 L 128 296 C 128 293.7 127.2 291.8 125.8 290.2 C 124.39999999999999 288.59999999999997 122.39999999999999 288 120 288 L 40 288 C 37.7 288 35.8 288.8 34.2 290.2 C 32.60000000000001 291.59999999999997 32 293.7 32 296 L 32 344 C 32 346.3 32.8 348.2 34.2 349.8 C 35.60000000000001 351.40000000000003 37.6 352 40 352 L 120 352 C 122.3 352 124.2 351.2 125.8 349.8 C 127.39999999999999 348.40000000000003 128 346.3 128 344 Z M 0 0 M 128 248 L 128 200 C 128 197.7 1 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,46.23828125,36)">
+ <text
+ fill="#000000"
+ stroke="none"
+ font-family="Open Sans"
+ font-size="12pt"
+ font-style="normal"
+ font-weight="normal"
+ text-decoration="normal"
+ x="30.76171875"
+ y="12"
+ text-anchor="middle"
+ dominant-baseline="alphabetic"
+ >Process </text>
+ <text
+ fill="#000000"
+ stroke="none"
+ font-family="Open Sans"
+ font-size="12pt"
+ font-style="normal"
+ font-weight="normal"
+ text-decoration="normal"
+ x="30.76171875"
+ y="27"
+ text-anchor="middle"
+ dominant-baseline="alphabetic"
+ >Traveler</text>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,277,89)" />
+ <g
+ id="_8BEA9396-93DE-4D44-8CE2-4A146464264E"
+ bpmn2nodeid="_8BEA9396-93DE-4D44-8CE2-4A146464264E"
+ transform="matrix(1,0,0,1,149,112)"
+ >
+ <g>
+ <path fill="none" stroke="none" />
+ </g>
+ <g transform="matrix(0.125,0,0,0.125,0,0)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#e8fae6"
+ stroke="black"
+ id="_8BEA9396-93DE-4D44-8CE2-4A146464264E?shapeType=BACKGROUND"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 444 224 C 444 263.9 434.2 300.8 414.4 334.5 C 394.7 368.2 368 394.9 334.4 414.5 C 300.79999999999995 434.1 263.9 444 224 444 C 184.10000000000002 444 147.2 434.2 113.5 414.4 C 79.8 394.7 53.1 368 33.5 334.4 C 13.899999999999999 300.79999999999995 4 263.9 4 224 C 4 184.10000000000002 13.8 147.2 33.6 113.5 C 53.400000000000006 79.80000000000001 80.1 53.1 113.6 33.5 C 147.1 13.899999999999999 184.1 4 224 4 C 263.9 4 300.8 13.8 334.5 33.6 C 368.2 53.400000000000006 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#4aa241"
+ stroke="none"
+ id="_8BEA9396-93DE-4D44-8CE2-4A146464264E?shapeType=BORDER&renderType=FILL"
+ paint-order="stroke fill markers"
+ d=" M 0 0 M 224 0 C 100.3 0 0 100.3 0 224 C 0 347.7 100.3 448 224 448 C 347.7 448 448 347.7 448 224 C 448 100.30000000000001 347.7 0 224 0 Z M 0 0 M 224 432 C 109.1 432 16 338.9 16 224 C 16 109.10000000000002 109.1 16 224 16 C 338.9 16 432 109.1 432 224 C 432 338.9 338.9 432 224 432 Z"
+ />
+ </g>
+ </g>
+ </g>
+ <g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#4aa241"
+ stroke="black"
+ id="_8BEA9396-93DE-4D44-8CE2-4A146464264E_message-catching"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 320.2 288.7 L 320.2 192.7 C 317.59999999999997 195.7 314.7 198.5 311.59999999999997 200.89999999999998 C 289.2 218.09999999999997 271.49999999999994 232.09999999999997 258.4 243.09999999999997 C 254.2 246.69999999999996 250.7 249.49999999999997 247.99999999999997 251.49999999999997 C 245.29999999999995 253.49999999999997 241.79999999999998 255.49999999999997 237.19999999999996 257.59999999999997 C 232.59999999999997 259.7 228.39999999999995 260.7 224.3999999 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ </g>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,-54.5,61)">
+ <text
+ fill="#000000"
+ stroke="none"
+ font-family="Open Sans"
+ font-size="12pt"
+ font-style="normal"
+ font-weight="normal"
+ text-decoration="normal"
+ x="82.5"
+ y="12"
+ text-anchor="middle"
+ dominant-baseline="alphabetic"
+ >start traveler handling</text>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,149,112)" />
+ <g
+ id="_B7417363-C542-4A4A-A314-2AF370DE2515"
+ bpmn2nodeid="_B7417363-C542-4A4A-A314-2AF370DE2515"
+ transform="matrix(1,0,0,1,1017,89)"
+ >
+ <g>
+ <path fill="none" stroke="none" />
+ </g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#ffffff"
+ stroke="none"
+ id="_B7417363-C542-4A4A-A314-2AF370DE2515?shapeType=BACKGROUND"
+ paint-order="stroke fill markers"
+ d=" M 2 0 L 152 0 L 152 0 A 2 2 0 0 1 154 2 L 154 100 L 154 100 A 2 2 0 0 1 152 102 L 2 102 L 2 102 A 2 2 0 0 1 0 100 L 0 2 L 0 2.0000000000000004 A 2 2 0 0 1 1.9999999999999996 0 Z"
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="none"
+ stroke="#000000"
+ id="_B7417363-C542-4A4A-A314-2AF370DE2515?shapeType=BORDER&renderType=STROKE"
+ paint-order="fill stroke markers"
+ d=" M 2 0 L 152 0 L 152 0 A 2 2 0 0 1 154 2 L 154 100 L 154 100 A 2 2 0 0 1 152 102 L 2 102 L 2 102 A 2 2 0 0 1 0 100 L 0 2 L 0 2.0000000000000004 A 2 2 0 0 1 1.9999999999999996 0 Z"
+ stroke-miterlimit="10"
+ stroke-width="1.5"
+ stroke-dasharray=""
+ />
+ </g>
+ <g>
+ <g transform="matrix(0.06,0,0,0.06,9.4,9.4)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#393f44"
+ stroke="black"
+ id="_B7417363-C542-4A4A-A314-2AF370DE2515_task__2UXp__ZM2l"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 197.3 130.2 C 194.4 127.29999999999998 189.60000000000002 127.29999999999998 186.70000000000002 130.2 L 130.20000000000002 186.7 C 127.30000000000001 189.6 127.30000000000001 194.39999999999998 130.20000000000002 197.29999999999998 L 186.70000000000002 253.79999999999998 C 188.10000000000002 255.29999999999998 190.10000000000002 255.99999999999997 192.00000000000003 255.99999999999997 C 193.90000000000003 255.99999999999997 195.90000000000003 255.2999999999999 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#393f44"
+ stroke="black"
+ id="_B7417363-C542-4A4A-A314-2AF370DE2515_task__2UXp__RTEX"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 261.3 130.2 C 258.40000000000003 127.29999999999998 253.60000000000002 127.29999999999998 250.70000000000002 130.2 C 247.8 133.1 247.8 137.89999999999998 250.70000000000002 140.79999999999998 L 301.8 191.89999999999998 L 250.7 243 C 247.79999999999998 245.9 247.79999999999998 250.7 250.7 253.6 C 252.1 255.29999999999998 254.1 256 256 256 C 257.9 256 259.9 255.3 261.3 253.8 L 317.8 197.3 C 320.7 194.4 320.7 189.60000000000002 317.8 186.70000000000002 L 261.3 130.2 Z"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#393f44"
+ stroke="black"
+ id="_B7417363-C542-4A4A-A314-2AF370DE2515_task__2UXp__lCVI"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 400 32 C 400 32 152.8 32 128 32 C 62 32 64 96 64 96 L 64 288 L 1 288 C 1 288 -4 416 78 416 L 320 416 C 368 416 384 368 384 336 C 384 314.2 384 224.4 384 160 L 448 160 L 448 96 C 448 96 449 32 400 32 Z M 0 0 M 78 383.9 C 68.5 383.9 61.6 381.09999999999997 55.5 374.9 C 43.4 362.4 37.5 339.59999999999997 34.9 320 L 256.9 320 C 257.09999999999997 322.7 257.29999999999995 325.4 257.59999999999997 328.2 C 259.99999999999994 351.59999999999997 264.7 370.0999999999999 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,35,43.5)">
+ <text
+ fill="#000000"
+ stroke="none"
+ font-family="Open Sans"
+ font-size="12pt"
+ font-style="normal"
+ font-weight="normal"
+ text-decoration="normal"
+ x="45.30078125"
+ y="12"
+ text-anchor="middle"
+ dominant-baseline="alphabetic"
+ >Log Traveler</text>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,1017,89)" />
+ <g
+ id="_0C615323-1520-40BF-8A41-46C2BBC6819C"
+ bpmn2nodeid="_0C615323-1520-40BF-8A41-46C2BBC6819C"
+ transform="matrix(1,0,0,1,647,280)"
+ >
+ <g>
+ <path fill="none" stroke="none" />
+ </g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#ffffff"
+ stroke="none"
+ id="_0C615323-1520-40BF-8A41-46C2BBC6819C?shapeType=BACKGROUND"
+ paint-order="stroke fill markers"
+ d=" M 2 0 L 152 0 L 152 0 A 2 2 0 0 1 154 2 L 154 100 L 154 100 A 2 2 0 0 1 152 102 L 2 102 L 2 102 A 2 2 0 0 1 0 100 L 0 2 L 0 2.0000000000000004 A 2 2 0 0 1 1.9999999999999996 0 Z"
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="none"
+ stroke="#000000"
+ id="_0C615323-1520-40BF-8A41-46C2BBC6819C?shapeType=BORDER&renderType=STROKE"
+ paint-order="fill stroke markers"
+ d=" M 2 0 L 152 0 L 152 0 A 2 2 0 0 1 154 2 L 154 100 L 154 100 A 2 2 0 0 1 152 102 L 2 102 L 2 102 A 2 2 0 0 1 0 100 L 0 2 L 0 2.0000000000000004 A 2 2 0 0 1 1.9999999999999996 0 Z"
+ stroke-miterlimit="10"
+ stroke-width="1.5"
+ stroke-dasharray=""
+ />
+ </g>
+ <g>
+ <g transform="matrix(0.06,0,0,0.06,9.4,9.4)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#393f44"
+ stroke="black"
+ id="_0C615323-1520-40BF-8A41-46C2BBC6819C_task__2UXp__ZM2l"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 197.3 130.2 C 194.4 127.29999999999998 189.60000000000002 127.29999999999998 186.70000000000002 130.2 L 130.20000000000002 186.7 C 127.30000000000001 189.6 127.30000000000001 194.39999999999998 130.20000000000002 197.29999999999998 L 186.70000000000002 253.79999999999998 C 188.10000000000002 255.29999999999998 190.10000000000002 255.99999999999997 192.00000000000003 255.99999999999997 C 193.90000000000003 255.99999999999997 195.90000000000003 255.2999999999999 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#393f44"
+ stroke="black"
+ id="_0C615323-1520-40BF-8A41-46C2BBC6819C_task__2UXp__RTEX"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 261.3 130.2 C 258.40000000000003 127.29999999999998 253.60000000000002 127.29999999999998 250.70000000000002 130.2 C 247.8 133.1 247.8 137.89999999999998 250.70000000000002 140.79999999999998 L 301.8 191.89999999999998 L 250.7 243 C 247.79999999999998 245.9 247.79999999999998 250.7 250.7 253.6 C 252.1 255.29999999999998 254.1 256 256 256 C 257.9 256 259.9 255.3 261.3 253.8 L 317.8 197.3 C 320.7 194.4 320.7 189.60000000000002 317.8 186.70000000000002 L 261.3 130.2 Z"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#393f44"
+ stroke="black"
+ id="_0C615323-1520-40BF-8A41-46C2BBC6819C_task__2UXp__lCVI"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 400 32 C 400 32 152.8 32 128 32 C 62 32 64 96 64 96 L 64 288 L 1 288 C 1 288 -4 416 78 416 L 320 416 C 368 416 384 368 384 336 C 384 314.2 384 224.4 384 160 L 448 160 L 448 96 C 448 96 449 32 400 32 Z M 0 0 M 78 383.9 C 68.5 383.9 61.6 381.09999999999997 55.5 374.9 C 43.4 362.4 37.5 339.59999999999997 34.9 320 L 256.9 320 C 257.09999999999997 322.7 257.29999999999995 325.4 257.59999999999997 328.2 C 259.99999999999994 351.59999999999997 264.7 370.0999999999999 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,35,43.5)">
+ <text
+ fill="#000000"
+ stroke="none"
+ font-family="Open Sans"
+ font-size="12pt"
+ font-style="normal"
+ font-weight="normal"
+ text-decoration="normal"
+ x="47.44921875"
+ y="12"
+ text-anchor="middle"
+ dominant-baseline="alphabetic"
+ >Skip Traveler</text>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,647,280)" />
+ <g
+ id="_048DFBEC-837E-4F9B-9EAC-F0B5C731C563"
+ bpmn2nodeid="_048DFBEC-837E-4F9B-9EAC-F0B5C731C563"
+ transform="matrix(1,0,0,1,873,303)"
+ >
+ <g>
+ <path fill="none" stroke="none" />
+ </g>
+ <g transform="matrix(0.125,0,0,0.125,0,0)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#fce7e7"
+ stroke="black"
+ id="_048DFBEC-837E-4F9B-9EAC-F0B5C731C563?shapeType=BACKGROUND"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 444 224 C 444 263.9 434.2 300.8 414.4 334.5 C 394.7 368.2 368 394.9 334.4 414.5 C 300.79999999999995 434.1 263.9 444 224 444 C 184.10000000000002 444 147.2 434.2 113.5 414.4 C 79.8 394.7 53.1 368 33.5 334.4 C 13.899999999999999 300.79999999999995 4 263.9 4 224 C 4 184.10000000000002 13.8 147.2 33.6 113.5 C 53.400000000000006 79.80000000000001 80.1 53.1 113.6 33.5 C 147.1 13.899999999999999 184.1 4 224 4 C 263.9 4 300.8 13.8 334.5 33.6 C 368.2 53.400000000000006 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#a30000"
+ stroke="black"
+ id="_048DFBEC-837E-4F9B-9EAC-F0B5C731C563?shapeType=BORDER&renderType=FILL"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 224 0 C 100.3 0 0 100.3 0 224 C 0 347.7 100.3 448 224 448 C 347.7 448 448 347.7 448 224 C 448 100.30000000000001 347.7 0 224 0 Z M 0 0 M 224 400 C 126.8 400 48 321.2 48 224 C 48 126.80000000000001 126.8 48 224 48 C 321.2 48 400 126.8 400 224 C 400 321.2 321.2 400 224 400 Z"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ </g>
+ </g>
+ <g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#a30000"
+ stroke="black"
+ id="_048DFBEC-837E-4F9B-9EAC-F0B5C731C563_end_1_"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 320.2 220.7 C 320.2 238.1 315.9 254.2 307.3 268.9 C 298.7 283.59999999999997 287.1 295.29999999999995 272.40000000000003 303.79999999999995 C 257.70000000000005 312.4 241.60000000000002 316.69999999999993 224.20000000000005 316.69999999999993 C 206.80000000000007 316.69999999999993 190.70000000000005 312.3999999999999 176.00000000000006 303.79999999999995 C 161.30000000000007 295.19999999999993 149.70000000000005 283.59999999999997 141.10000000000005 268.9 C [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ </g>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,-17.671875,61)">
+ <text
+ fill="#000000"
+ stroke="none"
+ font-family="Open Sans"
+ font-size="12pt"
+ font-style="normal"
+ font-weight="normal"
+ text-decoration="normal"
+ x="45.671875"
+ y="12"
+ text-anchor="middle"
+ dominant-baseline="alphabetic"
+ >skip traveler</text>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,873,303)" />
+ <g
+ id="_EA3FE07B-3F8C-43E1-BD74-14708401EF88"
+ bpmn2nodeid="_EA3FE07B-3F8C-43E1-BD74-14708401EF88"
+ transform="matrix(1,0,0,1,651,89)"
+ >
+ <g>
+ <path fill="none" stroke="none" />
+ </g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#ffffff"
+ stroke="none"
+ id="_EA3FE07B-3F8C-43E1-BD74-14708401EF88?shapeType=BACKGROUND"
+ paint-order="stroke fill markers"
+ d=" M 2 0 L 152 0 L 152 0 A 2 2 0 0 1 154 2 L 154 100 L 154 100 A 2 2 0 0 1 152 102 L 2 102 L 2 102 A 2 2 0 0 1 0 100 L 0 2 L 0 2.0000000000000004 A 2 2 0 0 1 1.9999999999999996 0 Z"
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="none"
+ stroke="#000000"
+ id="_EA3FE07B-3F8C-43E1-BD74-14708401EF88?shapeType=BORDER&renderType=STROKE"
+ paint-order="fill stroke markers"
+ d=" M 2 0 L 152 0 L 152 0 A 2 2 0 0 1 154 2 L 154 100 L 154 100 A 2 2 0 0 1 152 102 L 2 102 L 2 102 A 2 2 0 0 1 0 100 L 0 2 L 0 2.0000000000000004 A 2 2 0 0 1 1.9999999999999996 0 Z"
+ stroke-miterlimit="10"
+ stroke-width="1.5"
+ stroke-dasharray=""
+ />
+ </g>
+ <g>
+ <g transform="matrix(0.06,0,0,0.06,9.4,9.4)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#393f44"
+ stroke="black"
+ id="_EA3FE07B-3F8C-43E1-BD74-14708401EF88_task__2UXp__ZM2l"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 197.3 130.2 C 194.4 127.29999999999998 189.60000000000002 127.29999999999998 186.70000000000002 130.2 L 130.20000000000002 186.7 C 127.30000000000001 189.6 127.30000000000001 194.39999999999998 130.20000000000002 197.29999999999998 L 186.70000000000002 253.79999999999998 C 188.10000000000002 255.29999999999998 190.10000000000002 255.99999999999997 192.00000000000003 255.99999999999997 C 193.90000000000003 255.99999999999997 195.90000000000003 255.2999999999999 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#393f44"
+ stroke="black"
+ id="_EA3FE07B-3F8C-43E1-BD74-14708401EF88_task__2UXp__RTEX"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 261.3 130.2 C 258.40000000000003 127.29999999999998 253.60000000000002 127.29999999999998 250.70000000000002 130.2 C 247.8 133.1 247.8 137.89999999999998 250.70000000000002 140.79999999999998 L 301.8 191.89999999999998 L 250.7 243 C 247.79999999999998 245.9 247.79999999999998 250.7 250.7 253.6 C 252.1 255.29999999999998 254.1 256 256 256 C 257.9 256 259.9 255.3 261.3 253.8 L 317.8 197.3 C 320.7 194.4 320.7 189.60000000000002 317.8 186.70000000000002 L 261.3 130.2 Z"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#393f44"
+ stroke="black"
+ id="_EA3FE07B-3F8C-43E1-BD74-14708401EF88_task__2UXp__lCVI"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 400 32 C 400 32 152.8 32 128 32 C 62 32 64 96 64 96 L 64 288 L 1 288 C 1 288 -4 416 78 416 L 320 416 C 368 416 384 368 384 336 C 384 314.2 384 224.4 384 160 L 448 160 L 448 96 C 448 96 449 32 400 32 Z M 0 0 M 78 383.9 C 68.5 383.9 61.6 381.09999999999997 55.5 374.9 C 43.4 362.4 37.5 339.59999999999997 34.9 320 L 256.9 320 C 257.09999999999997 322.7 257.29999999999995 325.4 257.59999999999997 328.2 C 259.99999999999994 351.59999999999997 264.7 370.0999999999999 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,35,36)">
+ <text
+ fill="#000000"
+ stroke="none"
+ font-family="Open Sans"
+ font-size="12pt"
+ font-style="normal"
+ font-weight="normal"
+ text-decoration="normal"
+ x="48.62890625"
+ y="12"
+ text-anchor="middle"
+ dominant-baseline="alphabetic"
+ >Create Hotel </text>
+ <text
+ fill="#000000"
+ stroke="none"
+ font-family="Open Sans"
+ font-size="12pt"
+ font-style="normal"
+ font-weight="normal"
+ text-decoration="normal"
+ x="48.62890625"
+ y="27"
+ text-anchor="middle"
+ dominant-baseline="alphabetic"
+ > Message </text>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,651,89)" />
+ <g
+ id="_CD55543F-AC93-497D-98C1-57814C90546F"
+ bpmn2nodeid="_CD55543F-AC93-497D-98C1-57814C90546F"
+ transform="matrix(1,0,0,1,885,112)"
+ >
+ <g>
+ <path fill="none" stroke="none" />
+ </g>
+ <g transform="matrix(0.125,0,0,0.125,0,0)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#bedee1"
+ stroke="black"
+ id="_CD55543F-AC93-497D-98C1-57814C90546F?shapeType=BACKGROUND"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 444 224 C 444 263.9 434.2 300.8 414.4 334.5 C 394.7 368.2 368 394.9 334.4 414.5 C 300.79999999999995 434.1 263.9 444 224 444 C 184.10000000000002 444 147.2 434.2 113.5 414.4 C 79.8 394.7 53.1 368 33.5 334.4 C 13.899999999999999 300.79999999999995 4 263.9 4 224 C 4 184.10000000000002 13.8 147.2 33.6 113.5 C 53.400000000000006 79.80000000000001 80.1 53.1 113.6 33.5 C 147.1 13.899999999999999 184.1 4 224 4 C 263.9 4 300.8 13.8 334.5 33.6 C 368.2 53.400000000000006 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#007a87"
+ stroke="black"
+ id="_CD55543F-AC93-497D-98C1-57814C90546F?shapeType=BORDER&renderType=FILL"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 224 408 C 122.5 408 40 325.5 40 224 C 40 122.5 122.5 40 224 40 C 325.5 40 408 122.5 408 224 C 408 325.5 325.5 408 224 408 Z M 0 0 M 224 56 C 131.4 56 56 131.4 56 224 C 56 316.6 131.4 392 224 392 C 316.6 392 392 316.6 392 224 C 392 131.39999999999998 316.6 56 224 56 Z M 0 0 M 224 16 C 252.1 16 279.3 21.5 305 32.3 C 329.8 42.8 352 57.8 371.1 76.9 C 390.20000000000005 96.00000000000001 405.20000000000005 118.30000000000001 415.70000000000005 143 C 426.500000000 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ </g>
+ </g>
+ <g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path
+ fill="#007a87"
+ stroke="black"
+ id="_CD55543F-AC93-497D-98C1-57814C90546F_message-throwing"
+ paint-order="fill stroke markers"
+ d=" M 0 0 M 336.2 189.4 L 336.2 288.7 C 336.2 294.2 334.3 298.9 330.3 302.8 C 326.40000000000003 306.7 321.7 308.7 316.2 308.7 L 132.2 308.7 C 126.69999999999999 308.7 121.99999999999999 306.7 118.1 302.8 C 114.19999999999999 298.90000000000003 112.19999999999999 294.2 112.19999999999999 288.7 L 112.19999999999999 189.39999999999998 C 115.89999999999999 193.49999999999997 120.1 197.09999999999997 124.79999999999998 200.29999999999998 C 154.99999999999997 220.79999999999 [...]
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ </g>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,-14.48828125,61)">
+ <text
+ fill="#000000"
+ stroke="none"
+ font-family="Open Sans"
+ font-size="12pt"
+ font-style="normal"
+ font-weight="normal"
+ text-decoration="normal"
+ x="42.48828125"
+ y="12"
+ text-anchor="middle"
+ dominant-baseline="alphabetic"
+ >notify hotel</text>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,885,112)" />
+ <g id="_D15CD483-D31D-42F8-A93A-AAAF44292D84" bpmn2nodeid="_D15CD483-D31D-42F8-A93A-AAAF44292D84">
+ <g>
+ <path
+ fill="none"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 205 140 L 262 140"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,205,140)" />
+ <g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,277,135)">
+ <path
+ fill="#000000"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 10 15 L 0 15 L 5 0 Z"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,205,130)" />
+ </g>
+ <g id="_96F8E118-C58C-4369-89DC-2C881614FF73" bpmn2nodeid="_96F8E118-C58C-4369-89DC-2C881614FF73">
+ <g>
+ <path
+ fill="none"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 431 140 L 496 140"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,431,140)" />
+ <g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,511,135)">
+ <path
+ fill="#000000"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 10 15 L 0 15 L 5 0 Z"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,431,130)" />
+ </g>
+ <g id="_69EB6EC5-C9B3-4E2A-AC08-39F46CC5D106" bpmn2nodeid="_69EB6EC5-C9B3-4E2A-AC08-39F46CC5D106">
+ <g>
+ <path
+ fill="none"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 567 140 L 636 140"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,567,140)" />
+ <g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,651,135)">
+ <path
+ fill="#000000"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 10 15 L 0 15 L 5 0 Z"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,567,130)" />
+ </g>
+ <g id="_76508F11-8B19-4BBF-89DB-2B424D6605CB" bpmn2nodeid="_76508F11-8B19-4BBF-89DB-2B424D6605CB">
+ <g>
+ <path
+ fill="none"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 805 140 L 870 140"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,805,140)" />
+ <g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,885,135)">
+ <path
+ fill="#000000"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 10 15 L 0 15 L 5 0 Z"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,805,130)" />
+ </g>
+ <g id="_A4DE8657-E8D5-4750-B0D5-11D6BA11A3CE" bpmn2nodeid="_A4DE8657-E8D5-4750-B0D5-11D6BA11A3CE">
+ <g>
+ <path
+ fill="none"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 941 140 L 1002 140"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,941,140)" />
+ <g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,1017,135)">
+ <path
+ fill="#000000"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 10 15 L 0 15 L 5 0 Z"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,941,130)" />
+ </g>
+ <g id="_6ED9B3DA-9FD9-49F3-A70E-A6AB6712A628" bpmn2nodeid="_6ED9B3DA-9FD9-49F3-A70E-A6AB6712A628">
+ <g>
+ <path
+ fill="none"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 1171 140 L 1235 140"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,1171,140)" />
+ <g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,1250,135)">
+ <path
+ fill="#000000"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 10 15 L 0 15 L 5 0 Z"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,1171,130)" />
+ </g>
+ <g id="_EDFD7D46-79EC-4C49-B6D8-5873E9301AC7" bpmn2nodeid="_EDFD7D46-79EC-4C49-B6D8-5873E9301AC7">
+ <g>
+ <path
+ fill="none"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 539 168 L 539 331 L 632 331"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,539,168)" />
+ <g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,647,326)">
+ <path
+ fill="#000000"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 10 15 L 0 15 L 5 0 Z"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,549,238.5)">
+ <text
+ fill="#000000"
+ stroke="none"
+ font-family="Open Sans"
+ font-size="10pt"
+ font-style="normal"
+ font-weight="normal"
+ text-decoration="normal"
+ x="0"
+ y="8.8"
+ text-anchor="start"
+ dominant-baseline="alphabetic"
+ >No </text>
+ </g>
+ </g>
+ <g id="_61646087-8A4A-44C0-8077-6D05E69CCB46" bpmn2nodeid="_61646087-8A4A-44C0-8077-6D05E69CCB46">
+ <g>
+ <path
+ fill="none"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 801 331 L 858 331"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,801,331)" />
+ <g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,873,326)">
+ <path
+ fill="#000000"
+ stroke="#000000"
+ paint-order="fill stroke markers"
+ d=" M 10 15 L 0 15 L 5 0 Z"
+ stroke-miterlimit="10"
+ stroke-dasharray=""
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,801,321)" />
+ </g>
+ </g>
+ </g>
+</svg>
diff --git a/packages/runtime-tools-management-console-webapp/dev-webapp/unsecured-runtime/src/main/resources/application.properties b/packages/runtime-tools-management-console-webapp/dev-webapp/unsecured-runtime/src/main/resources/application.properties
index bd06e365c87..8db42291318 100644
--- a/packages/runtime-tools-management-console-webapp/dev-webapp/unsecured-runtime/src/main/resources/application.properties
+++ b/packages/runtime-tools-management-console-webapp/dev-webapp/unsecured-runtime/src/main/resources/application.properties
@@ -42,4 +42,21 @@ quarkus.dev-ui.cors.enabled=false
quarkus.smallrye-openapi.path=/docs/openapi.json
quarkus.swagger-ui.always-include=true
quarkus.kogito.data-index.graphql.ui.always-include=true
-quarkus.http.test-port=0
\ No newline at end of file
+quarkus.http.test-port=0
+
+###############
+# Messaging #
+###############
+
+kafka.bootstrap.servers=localhost:9092
+
+# handle travelers messaging
+mp.messaging.incoming.travelers.connector=smallrye-kafka
+mp.messaging.incoming.travelers.value.deserializer=org.apache.kafka.common.serialization.StringDeserializer
+mp.messaging.incoming.travelers.auto.offset.reset=earliest
+
+mp.messaging.outgoing.correlation.connector=smallrye-kafka
+mp.messaging.outgoing.correlation.value.serializer=org.apache.kafka.common.serialization.StringSerializer
+
+mp.messaging.outgoing.processedtravelers.connector=smallrye-kafka
+mp.messaging.outgoing.processedtravelers.value.serializer=org.apache.kafka.common.serialization.StringSerializer
\ No newline at end of file
diff --git a/packages/runtime-tools-management-console-webapp/dev-webapp/unsecured-runtime/src/main/resources/custom-forms-dev/hiring.config b/packages/runtime-tools-management-console-webapp/dev-webapp/unsecured-runtime/src/main/resources/custom-forms-dev/hiring.config
new file mode 100644
index 00000000000..ebb9a331716
--- /dev/null
+++ b/packages/runtime-tools-management-console-webapp/dev-webapp/unsecured-runtime/src/main/resources/custom-forms-dev/hiring.config
@@ -0,0 +1,7 @@
+{
+ "schema": "{\"$schema\":\"https://json-schema.org/draft/2019-09/schema\",\"$defs\":{\"CandidateData\":{\"type\":\"object\",\"properties\":{\"email\":{\"type\":\"string\"},\"experience\":{\"type\":\"integer\"},\"lastName\":{\"type\":\"string\"},\"name\":{\"type\":\"string\"},\"skills\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}}}},\"type\":\"object\",\"properties\":{\"candidateData\":{\"$ref\":\"#/$defs/CandidateData\"}}}",
+ "resources": {
+ "styles": {},
+ "scripts": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/runtime-tools-management-console-webapp/dev-webapp/unsecured-runtime/src/main/resources/custom-forms-dev/hiring.tsx b/packages/runtime-tools-management-console-webapp/dev-webapp/unsecured-runtime/src/main/resources/custom-forms-dev/hiring.tsx
new file mode 100644
index 00000000000..0edf4f24fa6
--- /dev/null
+++ b/packages/runtime-tools-management-console-webapp/dev-webapp/unsecured-runtime/src/main/resources/custom-forms-dev/hiring.tsx
@@ -0,0 +1,204 @@
+import React, { useCallback, useEffect, useState } from "react";
+import { Card, CardBody, TextInput, FormGroup, Split, SplitItem, Button } from "@patternfly/react-core";
+import { PlusCircleIcon, MinusCircleIcon } from "@patternfly/react-icons";
+const Form__hiring: React.FC<any> = (props: any) => {
+ const [formApi, setFormApi] = useState<any>();
+ const [candidateData__email, set__candidateData__email] = useState<string>("");
+ const [candidateData__experience, set__candidateData__experience] = useState<number>();
+ const [candidateData__lastName, set__candidateData__lastName] = useState<string>("");
+ const [candidateData__name, set__candidateData__name] = useState<string>("");
+ const [candidateData__skills, set__candidateData__skills] = useState<string[]>([]);
+ /* Utility function that fills the form with the data received from the kogito runtime */
+ const setFormData = (data) => {
+ if (!data) {
+ return;
+ }
+ set__candidateData__email(data?.candidateData?.email ?? "");
+ set__candidateData__experience(data?.candidateData?.experience);
+ set__candidateData__lastName(data?.candidateData?.lastName ?? "");
+ set__candidateData__name(data?.candidateData?.name ?? "");
+ set__candidateData__skills(data?.candidateData?.skills ?? []);
+ };
+ /* Utility function to generate the expected form output as a json object */
+ const getFormData = useCallback(() => {
+ const formData: any = {};
+ formData.candidateData = {};
+ formData.candidateData.email = candidateData__email;
+ formData.candidateData.experience = candidateData__experience;
+ formData.candidateData.lastName = candidateData__lastName;
+ formData.candidateData.name = candidateData__name;
+ formData.candidateData.skills = candidateData__skills;
+ return formData;
+ }, [
+ candidateData__email,
+ candidateData__experience,
+ candidateData__lastName,
+ candidateData__name,
+ candidateData__skills,
+ ]);
+ /* Utility function to validate the form on the 'beforeSubmit' Lifecycle Hook */
+ const validateForm = useCallback(() => {}, []);
+ /* Utility function to perform actions on the on the 'afterSubmit' Lifecycle Hook */
+ const afterSubmit = useCallback((result) => {}, []);
+ useEffect(() => {
+ if (formApi) {
+ /*
+ Form Lifecycle Hook that will be executed before the form is submitted.
+ Throwing an error will stop the form submit. Usually should be used to validate the form.
+ */
+ formApi.beforeSubmit = () => validateForm();
+ /*
+ Form Lifecycle Hook that will be executed after the form is submitted.
+ It will receive a response object containing the `type` flag indicating if the submit has been successful and `info` with extra information about the submit result.
+ */
+ formApi.afterSubmit = (result) => afterSubmit(result);
+ /* Generates the expected form output object to be posted */
+ formApi.getFormData = () => getFormData();
+ }
+ }, [getFormData, validateForm, afterSubmit]);
+ useEffect(() => {
+ /*
+ Call to the Kogito console form engine. It will establish the connection with the console embeding the form
+ and return an instance of FormAPI that will allow hook custom code into the form lifecycle.
+ The `window.Form.openForm` call expects an object with the following entries:
+ - onOpen: Callback that will be called after the connection with the console is established. The callback
+ will receive the following arguments:
+ - data: the data to be bound into the form
+ - ctx: info about the context where the form is being displayed. This will contain information such as the form JSON Schema, process/task, user...
+ */
+ const api = window.Form.openForm({
+ onOpen: (data, context) => {
+ setFormData(data);
+ },
+ });
+ setFormApi(api);
+ }, []);
+ return (
+ <div className={"pf-c-form"}>
+ <Card>
+ <CardBody className="pf-c-form">
+ <label>
+ <b>Candidate data</b>
+ </label>
+ <FormGroup fieldId={"uniforms-0000-0002"} label={"Email"} isRequired={false}>
+ <TextInput
+ name={"candidateData.email"}
+ id={"uniforms-0000-0002"}
+ isDisabled={false}
+ placeholder={""}
+ type={"text"}
+ value={candidateData__email}
+ onChange={set__candidateData__email}
+ />
+ </FormGroup>
+ <FormGroup fieldId={"uniforms-0000-0004"} label={"Experience"} isRequired={false}>
+ <TextInput
+ type={"number"}
+ name={"candidateData.experience"}
+ isDisabled={false}
+ id={"uniforms-0000-0004"}
+ placeholder={""}
+ step={1}
+ value={candidateData__experience}
+ onChange={(newValue) => set__candidateData__experience(Number(newValue))}
+ />
+ </FormGroup>
+ <FormGroup fieldId={"uniforms-0000-0005"} label={"Last name"} isRequired={false}>
+ <TextInput
+ name={"candidateData.lastName"}
+ id={"uniforms-0000-0005"}
+ isDisabled={false}
+ placeholder={""}
+ type={"text"}
+ value={candidateData__lastName}
+ onChange={set__candidateData__lastName}
+ />
+ </FormGroup>
+ <FormGroup fieldId={"uniforms-0000-0006"} label={"Name"} isRequired={false}>
+ <TextInput
+ name={"candidateData.name"}
+ id={"uniforms-0000-0006"}
+ isDisabled={false}
+ placeholder={""}
+ type={"text"}
+ value={candidateData__name}
+ onChange={set__candidateData__name}
+ />
+ </FormGroup>
+ <div>
+ <Split hasGutter>
+ <SplitItem>
+ {"Skills" && (
+ <label className={"pf-c-form__label"}>
+ <span className={"pf-c-form__label-text"}>Skills</span>
+ </label>
+ )}
+ </SplitItem>
+ <SplitItem isFilled />
+ <SplitItem>
+ <Button
+ name="$"
+ variant="plain"
+ style={{ paddingLeft: "0", paddingRight: "0" }}
+ disabled={false}
+ onClick={() => {
+ !false && set__candidateData__skills((candidateData__skills ?? []).concat([""]));
+ }}
+ >
+ <PlusCircleIcon color="#0088ce" />
+ </Button>
+ </SplitItem>
+ </Split>
+ <div>
+ {candidateData__skills?.map((_, itemIndex) => (
+ <div
+ key={itemIndex}
+ style={{
+ marginBottom: "1rem",
+ display: "flex",
+ justifyContent: "space-between",
+ }}
+ >
+ <div style={{ width: "100%", marginRight: "10px" }}>
+ <FormGroup fieldId={"uniforms-0000-0009"} label={""} isRequired={false}>
+ <TextInput
+ name={`candidateData__skills.${itemIndex}`}
+ id={"uniforms-0000-0009"}
+ isDisabled={false}
+ placeholder={""}
+ type={"text"}
+ value={candidateData__skills?.[itemIndex]}
+ onChange={(newValue) => {
+ set__candidateData__skills((s) => {
+ const newState = [...s];
+ newState[itemIndex] = newValue;
+ return newState;
+ });
+ }}
+ />
+ </FormGroup>
+ </div>
+ <div>
+ <Button
+ disabled={false}
+ variant="plain"
+ style={{ paddingLeft: "0", paddingRight: "0" }}
+ onClick={() => {
+ const value = [...candidateData__skills];
+ value.splice(itemIndex, 1);
+ !false && set__candidateData__skills(value);
+ }}
+ >
+ <MinusCircleIcon color="#cc0000" />
+ </Button>
+ </div>
+ </div>
+ ))}
+ </div>
+ </div>
+ </CardBody>
+ </Card>
+ </div>
+ );
+};
+export default Form__hiring;
diff --git a/packages/runtime-tools-management-console-webapp/dev-webapp/unsecured-runtime/src/main/resources/custom-forms-dev/hiring_ITInterview.config b/packages/runtime-tools-management-console-webapp/dev-webapp/unsecured-runtime/src/main/resources/custom-forms-dev/hiring_ITInterview.config
new file mode 100644
index 00000000000..ddbc10aaf7c
--- /dev/null
+++ b/packages/runtime-tools-management-console-webapp/dev-webapp/unsecured-runtime/src/main/resources/custom-forms-dev/hiring_ITInterview.config
@@ -0,0 +1,12 @@
+{
+ "schema": "{\"$schema\":\"https://json-schema.org/draft/2019-09/schema\",\"type\":\"object\",\"properties\":{\"approve\":{\"type\":\"boolean\",\"input\":true,\"output\":true},\"baseSalary\":{\"type\":\"integer\",\"input\":true},\"bonus\":{\"type\":\"integer\",\"input\":true},\"candidate\":{\"type\":\"string\",\"input\":true},\"category\":{\"type\":\"string\",\"input\":true}}}",
+ "resources": {
+ "styles": {
+ "bootstrap.min.css": "https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css"
+ },
+ "scripts": {
+ "jquery.js": "https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js",
+ "bootstrap.bundle.min.js": "https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.min.js"
+ }
+ }
+}
\ No newline at end of file
diff --git a/packages/runtime-tools-management-console-webapp/dev-webapp/unsecured-runtime/src/main/resources/custom-forms-dev/hiring_ITInterview.html b/packages/runtime-tools-management-console-webapp/dev-webapp/unsecured-runtime/src/main/resources/custom-forms-dev/hiring_ITInterview.html
new file mode 100644
index 00000000000..246f41c2ff3
--- /dev/null
+++ b/packages/runtime-tools-management-console-webapp/dev-webapp/unsecured-runtime/src/main/resources/custom-forms-dev/hiring_ITInterview.html
@@ -0,0 +1,71 @@
+<div>
+ <div class="form-check">
+ <input type="checkbox" id="approve" name="approve" class="form-check-input" />
+ <label class="form-check-label" for="approve">I approve this candidate!</label>
+ </div>
+ <div class="form-group">
+ <label for="baseSalary">Base salary</label>
+ <input type="number" class="form-control" id="baseSalary" name="baseSalary" disabled step="1" value="" />
+ </div>
+ <div class="form-group">
+ <label for="bonus">Bonus</label>
+ <input type="number" class="form-control" id="bonus" name="bonus" disabled step="1" value="" />
+ </div>
+ <div class="form-group">
+ <label for="candidate">Candidate</label>
+ <input type="text" id="candidate" name="candidate" class="form-control" disabled value="" />
+ </div>
+ <div class="form-group">
+ <label for="category">Area</label>
+ <input type="text" id="category" name="category" class="form-control" disabled value="" />
+ </div>
+ <script>
+ /* Utility function that fills the form with the data received from the kogito runtime */
+ function setFormData(data) {
+ if (!data) {
+ return;
+ }
+ document.getElementById("approve").checked = data?.approve;
+ document.getElementById("baseSalary").value = data?.baseSalary ?? "";
+ document.getElementById("bonus").value = data?.bonus ?? "";
+ document.getElementById("candidate").value = data?.candidate ?? "";
+ document.getElementById("category").value = data?.category ?? "";
+ }
+ /* Utility function to generate the expected form output as a json object */
+ function getFormData() {
+ const formData = {};
+ formData.approve = document.getElementById("approve").checked;
+ return formData;
+ }
+ /* Utility function to validate the form on the 'beforeSubmit' Lifecycle Hook */
+ function validateForm() {}
+ /*
+ Call to the Kogito console form engine. It will establish the connection with the console embeding the form
+ and return an instance of FormAPI that will allow hook custom code into the form lifecycle.
+ The `window.Form.openForm` call expects an object with the following entries:
+ - onOpen: Callback that will be called after the connection with the console is established. The callback
+ will receive the following arguments:
+ - data: the data to be bound into the form
+ - ctx: info about the context where the form is being displayed. This will contain information such as the form JSON Schema, process/task, user...
+ */
+ const formApi = window.Form.openForm({
+ onOpen: (data, context) => {
+ setFormData(data);
+ },
+ });
+ /*
+ Form Lifecycle Hook that will be executed before the form is submitted.
+ Throwing an error will stop the form submit. Usually should be used to validate the form.
+ */
+ formApi.beforeSubmit = () => {
+ validateForm();
+ };
+ /*
+ Form Lifecycle Hook that will be executed after the form is submitted.
+ It will receive a response object containing the `type` flag indicating if the submit has been successful and `info` with extra information about the submit result.
+ */
+ formApi.afterSubmit = (response) => {};
+ /* Generates the expected form output object to be posted */
+ formApi.getFormData = () => getFormData();
+ </script>
+</div>
diff --git a/packages/runtime-tools-management-console-webapp/dev-webapp/unsecured-runtime/src/main/resources/travelers.bpmn b/packages/runtime-tools-management-console-webapp/dev-webapp/unsecured-runtime/src/main/resources/travelers.bpmn
new file mode 100644
index 00000000000..bea737bb986
--- /dev/null
+++ b/packages/runtime-tools-management-console-webapp/dev-webapp/unsecured-runtime/src/main/resources/travelers.bpmn
@@ -0,0 +1,515 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<bpmn2:definitions
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL"
+ xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
+ xmlns:bpsim="http://www.bpsim.org/schemas/1.0"
+ xmlns:dc="http://www.omg.org/spec/DD/20100524/DC"
+ xmlns:di="http://www.omg.org/spec/DD/20100524/DI"
+ xmlns:drools="http://www.jboss.org/drools"
+ id="_WHYAcIpdED21K7Ic5Tq1IA"
+ xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd http://www.jboss.org/drools drools.xsd http://www.bpsim.org/schemas/1.0 bpsim.xsd http://www.omg.org/spec/DD/20100524/DC DC.xsd http://www.omg.org/spec/DD/20100524/DI DI.xsd "
+ exporter="jBPM Process Modeler"
+ exporterVersion="2.0"
+ targetNamespace="http://www.omg.org/bpmn20"
+>
+ <bpmn2:itemDefinition id="_travelerItem" structureRef="org.acme.travel.Traveler" />
+ <bpmn2:itemDefinition id="_messageItem" structureRef="org.acme.message.Message" />
+ <bpmn2:itemDefinition
+ id="__0E0784C3-1BEC-4A51-A5E6-D7E5DA3A4402_eventInputXItem"
+ structureRef="org.acme.travel.Traveler"
+ />
+ <bpmn2:itemDefinition id="processedtravelersType" structureRef="org.acme.travel.Traveler" />
+ <bpmn2:itemDefinition
+ id="__60FA6326-76DC-4DB2-AB06-DB8AC8EE8DC8_fileNameInputXItem"
+ structureRef="java.lang.String"
+ />
+ <bpmn2:itemDefinition
+ id="__60FA6326-76DC-4DB2-AB06-DB8AC8EE8DC8_namespaceInputXItem"
+ structureRef="java.lang.String"
+ />
+ <bpmn2:itemDefinition id="__60FA6326-76DC-4DB2-AB06-DB8AC8EE8DC8_modelInputXItem" structureRef="java.lang.String" />
+ <bpmn2:itemDefinition
+ id="__60FA6326-76DC-4DB2-AB06-DB8AC8EE8DC8_decisionInputXItem"
+ structureRef="java.lang.String"
+ />
+ <bpmn2:itemDefinition
+ id="__60FA6326-76DC-4DB2-AB06-DB8AC8EE8DC8_travelerInputXItem"
+ structureRef="org.acme.travel.Traveler"
+ />
+ <bpmn2:itemDefinition
+ id="__60FA6326-76DC-4DB2-AB06-DB8AC8EE8DC8_travelerOutputXItem"
+ structureRef="org.acme.travel.Traveler"
+ />
+ <bpmn2:itemDefinition
+ id="__8BEA9396-93DE-4D44-8CE2-4A146464264E_eventOutputXItem"
+ structureRef="org.acme.travel.Traveler"
+ />
+ <bpmn2:itemDefinition id="travelersType" structureRef="org.acme.travel.Traveler" />
+ <bpmn2:itemDefinition id="_669FD56B-5410-4CAE-8E72-E6576708D94E" structureRef="" />
+ <bpmn2:itemDefinition id="_8F4BDC44-3797-48C6-88BF-8C4FF750F3D9" structureRef="" />
+ <bpmn2:itemDefinition
+ id="__CD55543F-AC93-497D-98C1-57814C90546F_eventInputXItem"
+ structureRef="org.acme.message.Message"
+ />
+ <bpmn2:itemDefinition id="correlationType" structureRef="org.acme.message.Message" />
+ <bpmn2:message id="_WHZOkIpdED21K7Ic5Tq1IA" itemRef="processedtravelersType" name="processedtravelers" />
+ <bpmn2:message id="_WHZOkYpdED21K7Ic5Tq1IA" itemRef="travelersType" name="travelers" />
+ <bpmn2:message id="_WHZOkopdED21K7Ic5Tq1IA" itemRef="correlationType" name="correlation" />
+ <bpmn2:collaboration id="_8B9DE7A8-9D7A-4EB2-A61C-6A130BD677FC" name="Default Collaboration">
+ <bpmn2:participant id="_AB0C13A1-3EFA-4C6A-9185-F6E586C43E7D" name="Pool Participant" processRef="travelers" />
+ </bpmn2:collaboration>
+ <bpmn2:process
+ id="travelers"
+ drools:packageName="org.acme.travel"
+ drools:version="1.0"
+ drools:adHoc="false"
+ name="Process Travelers"
+ isExecutable="true"
+ processType="Public"
+ >
+ <bpmn2:extensionElements>
+ <drools:import name="org.acme.message.Message" />
+ <drools:import name="org.acme.travel.Traveler" />
+ </bpmn2:extensionElements>
+ <bpmn2:property id="traveler" itemSubjectRef="_travelerItem" name="traveler" />
+ <bpmn2:property id="message" itemSubjectRef="_messageItem" name="message" />
+ <bpmn2:sequenceFlow
+ id="_76508F11-8B19-4BBF-89DB-2B424D6605CB"
+ sourceRef="_EA3FE07B-3F8C-43E1-BD74-14708401EF88"
+ targetRef="_CD55543F-AC93-497D-98C1-57814C90546F"
+ />
+ <bpmn2:sequenceFlow
+ id="_61646087-8A4A-44C0-8077-6D05E69CCB46"
+ sourceRef="_0C615323-1520-40BF-8A41-46C2BBC6819C"
+ targetRef="_048DFBEC-837E-4F9B-9EAC-F0B5C731C563"
+ />
+ <bpmn2:sequenceFlow
+ id="_A4DE8657-E8D5-4750-B0D5-11D6BA11A3CE"
+ sourceRef="_CD55543F-AC93-497D-98C1-57814C90546F"
+ targetRef="_B7417363-C542-4A4A-A314-2AF370DE2515"
+ />
+ <bpmn2:sequenceFlow
+ id="_D15CD483-D31D-42F8-A93A-AAAF44292D84"
+ sourceRef="_8BEA9396-93DE-4D44-8CE2-4A146464264E"
+ targetRef="_60FA6326-76DC-4DB2-AB06-DB8AC8EE8DC8"
+ />
+ <bpmn2:sequenceFlow
+ id="_69EB6EC5-C9B3-4E2A-AC08-39F46CC5D106"
+ sourceRef="_58FF9DA5-06C6-4D71-91CD-6EAE4E999CF9"
+ targetRef="_EA3FE07B-3F8C-43E1-BD74-14708401EF88"
+ >
+ <bpmn2:conditionExpression
+ xsi:type="bpmn2:tFormalExpression"
+ language="http://www.java.com/java"
+ ><![CDATA[return traveler.isProcessed();]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow
+ id="_EDFD7D46-79EC-4C49-B6D8-5873E9301AC7"
+ name="No"
+ sourceRef="_58FF9DA5-06C6-4D71-91CD-6EAE4E999CF9"
+ targetRef="_0C615323-1520-40BF-8A41-46C2BBC6819C"
+ >
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue><![CDATA[No]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:conditionExpression
+ xsi:type="bpmn2:tFormalExpression"
+ language="http://www.java.com/java"
+ ><![CDATA[return !traveler.isProcessed();]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow
+ id="_96F8E118-C58C-4369-89DC-2C881614FF73"
+ sourceRef="_60FA6326-76DC-4DB2-AB06-DB8AC8EE8DC8"
+ targetRef="_58FF9DA5-06C6-4D71-91CD-6EAE4E999CF9"
+ />
+ <bpmn2:sequenceFlow
+ id="_6ED9B3DA-9FD9-49F3-A70E-A6AB6712A628"
+ sourceRef="_B7417363-C542-4A4A-A314-2AF370DE2515"
+ targetRef="_0E0784C3-1BEC-4A51-A5E6-D7E5DA3A4402"
+ />
+ <bpmn2:intermediateThrowEvent id="_CD55543F-AC93-497D-98C1-57814C90546F" name="notify hotel">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue><![CDATA[notify hotel]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_76508F11-8B19-4BBF-89DB-2B424D6605CB</bpmn2:incoming>
+ <bpmn2:outgoing>_A4DE8657-E8D5-4750-B0D5-11D6BA11A3CE</bpmn2:outgoing>
+ <bpmn2:dataInput
+ id="_CD55543F-AC93-497D-98C1-57814C90546F_eventInputX"
+ drools:dtype="org.acme.message.Message"
+ itemSubjectRef="__CD55543F-AC93-497D-98C1-57814C90546F_eventInputXItem"
+ name="event"
+ />
+ <bpmn2:dataInputAssociation>
+ <bpmn2:sourceRef>message</bpmn2:sourceRef>
+ <bpmn2:targetRef>_CD55543F-AC93-497D-98C1-57814C90546F_eventInputX</bpmn2:targetRef>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:inputSet>
+ <bpmn2:dataInputRefs>_CD55543F-AC93-497D-98C1-57814C90546F_eventInputX</bpmn2:dataInputRefs>
+ </bpmn2:inputSet>
+ <bpmn2:messageEventDefinition drools:msgref="correlation" messageRef="_WHZOkopdED21K7Ic5Tq1IA" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:scriptTask
+ id="_EA3FE07B-3F8C-43E1-BD74-14708401EF88"
+ name="Create Hotel Message"
+ scriptFormat="http://www.java.com/java"
+ >
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue><![CDATA[Create Hotel Message]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_69EB6EC5-C9B3-4E2A-AC08-39F46CC5D106</bpmn2:incoming>
+ <bpmn2:outgoing>_76508F11-8B19-4BBF-89DB-2B424D6605CB</bpmn2:outgoing>
+ <bpmn2:script
+ >kcontext.setVariable("message", new org.acme.message.Message(traveler.getHotelId(), "Ibis"));</bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:endEvent id="_048DFBEC-837E-4F9B-9EAC-F0B5C731C563" name="skip traveler">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue><![CDATA[skip traveler]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_61646087-8A4A-44C0-8077-6D05E69CCB46</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition />
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask
+ id="_0C615323-1520-40BF-8A41-46C2BBC6819C"
+ name="Skip Traveler"
+ scriptFormat="http://www.java.com/java"
+ >
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue><![CDATA[Skip Traveler]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_EDFD7D46-79EC-4C49-B6D8-5873E9301AC7</bpmn2:incoming>
+ <bpmn2:outgoing>_61646087-8A4A-44C0-8077-6D05E69CCB46</bpmn2:outgoing>
+ <bpmn2:script>System.out.println("Skipping traveller " + traveler);</bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask
+ id="_B7417363-C542-4A4A-A314-2AF370DE2515"
+ name="Log Traveler"
+ scriptFormat="http://www.java.com/java"
+ >
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue><![CDATA[Log Traveler]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_A4DE8657-E8D5-4750-B0D5-11D6BA11A3CE</bpmn2:incoming>
+ <bpmn2:outgoing>_6ED9B3DA-9FD9-49F3-A70E-A6AB6712A628</bpmn2:outgoing>
+ <bpmn2:script>System.out.println("Processing traveller " + traveler);</bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:startEvent id="_8BEA9396-93DE-4D44-8CE2-4A146464264E" name="start traveler handling">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue><![CDATA[start traveler handling]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:outgoing>_D15CD483-D31D-42F8-A93A-AAAF44292D84</bpmn2:outgoing>
+ <bpmn2:dataOutput
+ id="_8BEA9396-93DE-4D44-8CE2-4A146464264E_eventOutputX"
+ drools:dtype="org.acme.travel.Traveler"
+ itemSubjectRef="__8BEA9396-93DE-4D44-8CE2-4A146464264E_eventOutputXItem"
+ name="event"
+ />
+ <bpmn2:dataOutputAssociation>
+ <bpmn2:sourceRef>_8BEA9396-93DE-4D44-8CE2-4A146464264E_eventOutputX</bpmn2:sourceRef>
+ <bpmn2:targetRef>traveler</bpmn2:targetRef>
+ </bpmn2:dataOutputAssociation>
+ <bpmn2:outputSet>
+ <bpmn2:dataOutputRefs>_8BEA9396-93DE-4D44-8CE2-4A146464264E_eventOutputX</bpmn2:dataOutputRefs>
+ </bpmn2:outputSet>
+ <bpmn2:messageEventDefinition drools:msgref="travelers" messageRef="_WHZOkYpdED21K7Ic5Tq1IA" />
+ </bpmn2:startEvent>
+ <bpmn2:businessRuleTask
+ id="_60FA6326-76DC-4DB2-AB06-DB8AC8EE8DC8"
+ drools:ruleFlowGroup="unit:org.acme.travel.TravelerValidationService"
+ name="Process Traveler"
+ implementation="http://www.jboss.org/drools/rule"
+ >
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue><![CDATA[Process Traveler]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_D15CD483-D31D-42F8-A93A-AAAF44292D84</bpmn2:incoming>
+ <bpmn2:outgoing>_96F8E118-C58C-4369-89DC-2C881614FF73</bpmn2:outgoing>
+ <bpmn2:ioSpecification>
+ <bpmn2:dataInput
+ id="_60FA6326-76DC-4DB2-AB06-DB8AC8EE8DC8_travelerInputX"
+ drools:dtype="org.acme.travel.Traveler"
+ itemSubjectRef="__60FA6326-76DC-4DB2-AB06-DB8AC8EE8DC8_travelerInputXItem"
+ name="traveler"
+ />
+ <bpmn2:dataOutput
+ id="_60FA6326-76DC-4DB2-AB06-DB8AC8EE8DC8_travelerOutputX"
+ drools:dtype="org.acme.travel.Traveler"
+ itemSubjectRef="__60FA6326-76DC-4DB2-AB06-DB8AC8EE8DC8_travelerOutputXItem"
+ name="traveler"
+ />
+ <bpmn2:inputSet>
+ <bpmn2:dataInputRefs>_60FA6326-76DC-4DB2-AB06-DB8AC8EE8DC8_travelerInputX</bpmn2:dataInputRefs>
+ </bpmn2:inputSet>
+ <bpmn2:outputSet>
+ <bpmn2:dataOutputRefs>_60FA6326-76DC-4DB2-AB06-DB8AC8EE8DC8_travelerOutputX</bpmn2:dataOutputRefs>
+ </bpmn2:outputSet>
+ </bpmn2:ioSpecification>
+ <bpmn2:dataInputAssociation>
+ <bpmn2:sourceRef>traveler</bpmn2:sourceRef>
+ <bpmn2:targetRef>_60FA6326-76DC-4DB2-AB06-DB8AC8EE8DC8_travelerInputX</bpmn2:targetRef>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataOutputAssociation>
+ <bpmn2:sourceRef>_60FA6326-76DC-4DB2-AB06-DB8AC8EE8DC8_travelerOutputX</bpmn2:sourceRef>
+ <bpmn2:targetRef>traveler</bpmn2:targetRef>
+ </bpmn2:dataOutputAssociation>
+ </bpmn2:businessRuleTask>
+ <bpmn2:exclusiveGateway
+ id="_58FF9DA5-06C6-4D71-91CD-6EAE4E999CF9"
+ name="Processed Traveler?"
+ gatewayDirection="Diverging"
+ >
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue><![CDATA[Processed Traveler?]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_96F8E118-C58C-4369-89DC-2C881614FF73</bpmn2:incoming>
+ <bpmn2:outgoing>_EDFD7D46-79EC-4C49-B6D8-5873E9301AC7</bpmn2:outgoing>
+ <bpmn2:outgoing>_69EB6EC5-C9B3-4E2A-AC08-39F46CC5D106</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:endEvent id="_0E0784C3-1BEC-4A51-A5E6-D7E5DA3A4402" name="processed traveler">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue><![CDATA[processed traveler]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_6ED9B3DA-9FD9-49F3-A70E-A6AB6712A628</bpmn2:incoming>
+ <bpmn2:dataInput
+ id="_0E0784C3-1BEC-4A51-A5E6-D7E5DA3A4402_eventInputX"
+ drools:dtype="org.acme.travel.Traveler"
+ itemSubjectRef="__0E0784C3-1BEC-4A51-A5E6-D7E5DA3A4402_eventInputXItem"
+ name="event"
+ />
+ <bpmn2:dataInputAssociation>
+ <bpmn2:sourceRef>traveler</bpmn2:sourceRef>
+ <bpmn2:targetRef>_0E0784C3-1BEC-4A51-A5E6-D7E5DA3A4402_eventInputX</bpmn2:targetRef>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:inputSet>
+ <bpmn2:dataInputRefs>_0E0784C3-1BEC-4A51-A5E6-D7E5DA3A4402_eventInputX</bpmn2:dataInputRefs>
+ </bpmn2:inputSet>
+ <bpmn2:messageEventDefinition drools:msgref="processedtravelers" messageRef="_WHZOkIpdED21K7Ic5Tq1IA" />
+ </bpmn2:endEvent>
+ </bpmn2:process>
+ <bpmndi:BPMNDiagram>
+ <bpmndi:BPMNPlane bpmnElement="travelers">
+ <bpmndi:BPMNShape
+ id="shape__0E0784C3-1BEC-4A51-A5E6-D7E5DA3A4402"
+ bpmnElement="_0E0784C3-1BEC-4A51-A5E6-D7E5DA3A4402"
+ >
+ <dc:Bounds height="56" width="56" x="1250" y="112" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape
+ id="shape__58FF9DA5-06C6-4D71-91CD-6EAE4E999CF9"
+ bpmnElement="_58FF9DA5-06C6-4D71-91CD-6EAE4E999CF9"
+ >
+ <dc:Bounds height="56" width="56" x="511" y="112" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape
+ id="shape__60FA6326-76DC-4DB2-AB06-DB8AC8EE8DC8"
+ bpmnElement="_60FA6326-76DC-4DB2-AB06-DB8AC8EE8DC8"
+ >
+ <dc:Bounds height="102" width="154" x="277" y="89" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape
+ id="shape__8BEA9396-93DE-4D44-8CE2-4A146464264E"
+ bpmnElement="_8BEA9396-93DE-4D44-8CE2-4A146464264E"
+ >
+ <dc:Bounds height="56" width="56" x="149" y="112" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape
+ id="shape__B7417363-C542-4A4A-A314-2AF370DE2515"
+ bpmnElement="_B7417363-C542-4A4A-A314-2AF370DE2515"
+ >
+ <dc:Bounds height="102" width="154" x="1017" y="89" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape
+ id="shape__0C615323-1520-40BF-8A41-46C2BBC6819C"
+ bpmnElement="_0C615323-1520-40BF-8A41-46C2BBC6819C"
+ >
+ <dc:Bounds height="102" width="154" x="647" y="280" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape
+ id="shape__048DFBEC-837E-4F9B-9EAC-F0B5C731C563"
+ bpmnElement="_048DFBEC-837E-4F9B-9EAC-F0B5C731C563"
+ >
+ <dc:Bounds height="56" width="56" x="873" y="303" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape
+ id="shape__EA3FE07B-3F8C-43E1-BD74-14708401EF88"
+ bpmnElement="_EA3FE07B-3F8C-43E1-BD74-14708401EF88"
+ >
+ <dc:Bounds height="102" width="154" x="651" y="89" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape
+ id="shape__CD55543F-AC93-497D-98C1-57814C90546F"
+ bpmnElement="_CD55543F-AC93-497D-98C1-57814C90546F"
+ >
+ <dc:Bounds height="56" width="56" x="885" y="112" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge
+ id="edge_shape__B7417363-C542-4A4A-A314-2AF370DE2515_to_shape__0E0784C3-1BEC-4A51-A5E6-D7E5DA3A4402"
+ bpmnElement="_6ED9B3DA-9FD9-49F3-A70E-A6AB6712A628"
+ >
+ <di:waypoint x="1171" y="140" />
+ <di:waypoint x="1250" y="140" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge
+ id="edge_shape__60FA6326-76DC-4DB2-AB06-DB8AC8EE8DC8_to_shape__58FF9DA5-06C6-4D71-91CD-6EAE4E999CF9"
+ bpmnElement="_96F8E118-C58C-4369-89DC-2C881614FF73"
+ >
+ <di:waypoint x="431" y="140" />
+ <di:waypoint x="511" y="140" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge
+ id="edge_shape__58FF9DA5-06C6-4D71-91CD-6EAE4E999CF9_to_shape__0C615323-1520-40BF-8A41-46C2BBC6819C"
+ bpmnElement="_EDFD7D46-79EC-4C49-B6D8-5873E9301AC7"
+ >
+ <di:waypoint x="539" y="168" />
+ <di:waypoint x="539" y="331" />
+ <di:waypoint x="647" y="331" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge
+ id="edge_shape__58FF9DA5-06C6-4D71-91CD-6EAE4E999CF9_to_shape__EA3FE07B-3F8C-43E1-BD74-14708401EF88"
+ bpmnElement="_69EB6EC5-C9B3-4E2A-AC08-39F46CC5D106"
+ >
+ <di:waypoint x="539" y="140" />
+ <di:waypoint x="651" y="140" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge
+ id="edge_shape__8BEA9396-93DE-4D44-8CE2-4A146464264E_to_shape__60FA6326-76DC-4DB2-AB06-DB8AC8EE8DC8"
+ bpmnElement="_D15CD483-D31D-42F8-A93A-AAAF44292D84"
+ >
+ <di:waypoint x="205" y="140" />
+ <di:waypoint x="277" y="140" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge
+ id="edge_shape__CD55543F-AC93-497D-98C1-57814C90546F_to_shape__B7417363-C542-4A4A-A314-2AF370DE2515"
+ bpmnElement="_A4DE8657-E8D5-4750-B0D5-11D6BA11A3CE"
+ >
+ <di:waypoint x="913" y="140" />
+ <di:waypoint x="1017" y="140" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge
+ id="edge_shape__0C615323-1520-40BF-8A41-46C2BBC6819C_to_shape__048DFBEC-837E-4F9B-9EAC-F0B5C731C563"
+ bpmnElement="_61646087-8A4A-44C0-8077-6D05E69CCB46"
+ >
+ <di:waypoint x="724" y="331" />
+ <di:waypoint x="901" y="331" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge
+ id="edge_shape__EA3FE07B-3F8C-43E1-BD74-14708401EF88_to_shape__CD55543F-AC93-497D-98C1-57814C90546F"
+ bpmnElement="_76508F11-8B19-4BBF-89DB-2B424D6605CB"
+ >
+ <di:waypoint x="728" y="140" />
+ <di:waypoint x="913" y="140" />
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+ <bpmn2:relationship type="BPSimData">
+ <bpmn2:extensionElements>
+ <bpsim:BPSimData>
+ <bpsim:Scenario id="default" name="Simulationscenario">
+ <bpsim:ScenarioParameters />
+ <bpsim:ElementParameters elementRef="_60FA6326-76DC-4DB2-AB06-DB8AC8EE8DC8">
+ <bpsim:TimeParameters>
+ <bpsim:ProcessingTime>
+ <bpsim:NormalDistribution mean="0" standardDeviation="0" />
+ </bpsim:ProcessingTime>
+ </bpsim:TimeParameters>
+ <bpsim:ResourceParameters>
+ <bpsim:Availability>
+ <bpsim:FloatingParameter value="0" />
+ </bpsim:Availability>
+ <bpsim:Quantity>
+ <bpsim:FloatingParameter value="0" />
+ </bpsim:Quantity>
+ </bpsim:ResourceParameters>
+ <bpsim:CostParameters>
+ <bpsim:UnitCost>
+ <bpsim:FloatingParameter value="0" />
+ </bpsim:UnitCost>
+ </bpsim:CostParameters>
+ </bpsim:ElementParameters>
+ <bpsim:ElementParameters elementRef="_B7417363-C542-4A4A-A314-2AF370DE2515">
+ <bpsim:TimeParameters>
+ <bpsim:ProcessingTime>
+ <bpsim:NormalDistribution mean="0" standardDeviation="0" />
+ </bpsim:ProcessingTime>
+ </bpsim:TimeParameters>
+ <bpsim:ResourceParameters>
+ <bpsim:Availability>
+ <bpsim:FloatingParameter value="0" />
+ </bpsim:Availability>
+ <bpsim:Quantity>
+ <bpsim:FloatingParameter value="0" />
+ </bpsim:Quantity>
+ </bpsim:ResourceParameters>
+ <bpsim:CostParameters>
+ <bpsim:UnitCost>
+ <bpsim:FloatingParameter value="0" />
+ </bpsim:UnitCost>
+ </bpsim:CostParameters>
+ </bpsim:ElementParameters>
+ <bpsim:ElementParameters elementRef="_0C615323-1520-40BF-8A41-46C2BBC6819C">
+ <bpsim:TimeParameters>
+ <bpsim:ProcessingTime>
+ <bpsim:NormalDistribution mean="0" standardDeviation="0" />
+ </bpsim:ProcessingTime>
+ </bpsim:TimeParameters>
+ <bpsim:ResourceParameters>
+ <bpsim:Availability>
+ <bpsim:FloatingParameter value="0" />
+ </bpsim:Availability>
+ <bpsim:Quantity>
+ <bpsim:FloatingParameter value="0" />
+ </bpsim:Quantity>
+ </bpsim:ResourceParameters>
+ <bpsim:CostParameters>
+ <bpsim:UnitCost>
+ <bpsim:FloatingParameter value="0" />
+ </bpsim:UnitCost>
+ </bpsim:CostParameters>
+ </bpsim:ElementParameters>
+ <bpsim:ElementParameters elementRef="_EA3FE07B-3F8C-43E1-BD74-14708401EF88">
+ <bpsim:TimeParameters>
+ <bpsim:ProcessingTime>
+ <bpsim:NormalDistribution mean="0" standardDeviation="0" />
+ </bpsim:ProcessingTime>
+ </bpsim:TimeParameters>
+ <bpsim:ResourceParameters>
+ <bpsim:Availability>
+ <bpsim:FloatingParameter value="0" />
+ </bpsim:Availability>
+ <bpsim:Quantity>
+ <bpsim:FloatingParameter value="0" />
+ </bpsim:Quantity>
+ </bpsim:ResourceParameters>
+ <bpsim:CostParameters>
+ <bpsim:UnitCost>
+ <bpsim:FloatingParameter value="0" />
+ </bpsim:UnitCost>
+ </bpsim:CostParameters>
+ </bpsim:ElementParameters>
+ </bpsim:Scenario>
+ </bpsim:BPSimData>
+ </bpmn2:extensionElements>
+ <bpmn2:source>_WHYAcIpdED21K7Ic5Tq1IA</bpmn2:source>
+ <bpmn2:target>_WHYAcIpdED21K7Ic5Tq1IA</bpmn2:target>
+ </bpmn2:relationship>
+</bpmn2:definitions>
diff --git a/packages/runtime-tools-process-enveloped-components/src/processList/api/ProcessListEnvelopeApi.ts b/packages/runtime-tools-management-console-webapp/dev-webapp/unsecured-runtime/src/main/resources/travelers.drl
similarity index 60%
copy from packages/runtime-tools-process-enveloped-components/src/processList/api/ProcessListEnvelopeApi.ts
copy to packages/runtime-tools-management-console-webapp/dev-webapp/unsecured-runtime/src/main/resources/travelers.drl
index b8b8b9a6f12..d522eaea6c4 100644
--- a/packages/runtime-tools-process-enveloped-components/src/processList/api/ProcessListEnvelopeApi.ts
+++ b/packages/runtime-tools-management-console-webapp/dev-webapp/unsecured-runtime/src/main/resources/travelers.drl
@@ -16,25 +16,27 @@
* specific language governing permissions and limitations
* under the License.
*/
+package org.acme.travel
+unit TravelerValidationService
-import { ProcessListState } from "@kie-tools/runtime-tools-process-gateway-api/dist/types";
+import org.acme.travel.Traveler;
-export interface ProcessListEnvelopeApi {
- processList__init(association: Association, initArgs: ProcessListInitArgs): Promise<void>;
-}
+rule "Process travelers"
-export interface Association {
- origin: string;
- envelopeServerId: string;
-}
+when
+ $traveler: /traveler[processed == false, nationality != 'American']
+then
+ System.out.println("Hello traveler " + $traveler);
+ $traveler.setProcessed( true );
+
+end
-export interface QueryPage {
- offset: number;
- limit: number;
-}
+rule "Don't process travelers from US"
-export interface ProcessListInitArgs {
- initialState: ProcessListState;
- singularProcessLabel: string;
- pluralProcessLabel: string;
-}
+when
+ $traveler: /traveler[processed == false, nationality == 'American']
+then
+ System.out.println("This system can't deal with " + $traveler.getNationality());
+ $traveler.setProcessed( false );
+
+end
diff --git a/packages/runtime-tools-management-console-webapp/package.json b/packages/runtime-tools-management-console-webapp/package.json
index 99544c41d6d..9a1a800a5d7 100644
--- a/packages/runtime-tools-management-console-webapp/package.json
+++ b/packages/runtime-tools-management-console-webapp/package.json
@@ -31,7 +31,6 @@
"@kie-tools/runtime-tools-process-enveloped-components": "workspace:*",
"@kie-tools/runtime-tools-process-gateway-api": "workspace:*",
"@kie-tools/runtime-tools-process-webapp-components": "workspace:*",
- "@kie-tools/runtime-tools-shared-enveloped-components": "workspace:*",
"@kie-tools/runtime-tools-shared-gateway-api": "workspace:*",
"@kie-tools/runtime-tools-shared-webapp-components": "workspace:*",
"@patternfly/patternfly": "^5.4.1",
@@ -69,6 +68,7 @@
"@kie-tools-core/patternfly-base": "workspace:*",
"@kie-tools-core/webpack-base": "workspace:*",
"@kie-tools/eslint": "workspace:*",
+ "@kie-tools/jbpm-quarkus-devui": "workspace:*",
"@kie-tools/maven-base": "workspace:*",
"@kie-tools/root-env": "workspace:*",
"@kie-tools/tsconfig": "workspace:*",
diff --git a/packages/runtime-tools-management-console-webapp/src/authSessions/AuthSessionsService.ts b/packages/runtime-tools-management-console-webapp/src/authSessions/AuthSessionsService.ts
index 1fef790f188..d6bb3e5e2f4 100644
--- a/packages/runtime-tools-management-console-webapp/src/authSessions/AuthSessionsService.ts
+++ b/packages/runtime-tools-management-console-webapp/src/authSessions/AuthSessionsService.ts
@@ -296,6 +296,8 @@ export class AuthSessionsService {
throw new Error("Failed to extract claims from token.");
}
+ console.log({ claims });
+
const authSession: OpenIDConnectAuthSession = {
id: uuid(),
type: AuthSessionType.OPENID_CONNECT,
diff --git a/packages/runtime-tools-management-console-webapp/src/forms/form-displayer-envelope.ts b/packages/runtime-tools-management-console-webapp/src/forms/form-displayer-envelope.ts
index 0bc6e9b6b81..a56f46a73d5 100644
--- a/packages/runtime-tools-management-console-webapp/src/forms/form-displayer-envelope.ts
+++ b/packages/runtime-tools-management-console-webapp/src/forms/form-displayer-envelope.ts
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-import * as FormDisplayerEnvelope from "@kie-tools/runtime-tools-shared-enveloped-components/dist/formDisplayer";
+import * as FormDisplayerEnvelope from "@kie-tools/runtime-tools-process-enveloped-components/dist/formDisplayer";
import type { EnvelopeBusMessage } from "@kie-tools-core/envelope-bus/dist/api";
import { ContainerType } from "@kie-tools-core/envelope/dist/api";
diff --git a/packages/runtime-tools-management-console-webapp/src/jobs/Jobs.tsx b/packages/runtime-tools-management-console-webapp/src/jobs/Jobs.tsx
index 1e3a0c8d16b..6dcf4644402 100644
--- a/packages/runtime-tools-management-console-webapp/src/jobs/Jobs.tsx
+++ b/packages/runtime-tools-management-console-webapp/src/jobs/Jobs.tsx
@@ -17,16 +17,16 @@
* under the License.
*/
import React, { useMemo, useEffect } from "react";
-import { EmbeddedJobsManagement } from "@kie-tools/runtime-tools-process-enveloped-components/dist/jobsManagement";
import {
- JobsManagementGatewayApi,
- useJobsManagementGatewayApi,
-} from "@kie-tools/runtime-tools-process-webapp-components/dist/JobsManagement";
+ EmbeddedJobsManagement,
+ JobsManagementState,
+} from "@kie-tools/runtime-tools-process-enveloped-components/dist/jobsManagement";
+import { useJobsManagementChannelApi } from "@kie-tools/runtime-tools-process-webapp-components/dist/JobsManagement";
import { useHistory } from "react-router";
import { useQueryParam, useQueryParams } from "../navigation/queryParams/QueryParamsContext";
import { RuntimePathSearchParamsRoutes, useRuntimeDispatch } from "../runtime/RuntimeContext";
import { QueryParams } from "../navigation/Routes";
-import { JobsManagementState, JobStatus } from "@kie-tools/runtime-tools-process-gateway-api/dist/types";
+import { JobStatus } from "@kie-tools/runtime-tools-process-gateway-api/dist/types";
import { OrderBy } from "@kie-tools/runtime-tools-shared-gateway-api/dist/types";
const defaultStatus = [JobStatus.Scheduled];
@@ -36,7 +36,7 @@ const defaultOrderBy = {
};
export const Jobs: React.FC = () => {
- const gatewayApi: JobsManagementGatewayApi = useJobsManagementGatewayApi();
+ const channelApi = useJobsManagementChannelApi();
const history = useHistory();
const filters = useQueryParam(QueryParams.FILTERS);
const orderBy = useQueryParam(QueryParams.ORDER_BY);
@@ -61,7 +61,7 @@ export const Jobs: React.FC = () => {
}, [initialState, setRuntimePathSearchParams]);
useEffect(() => {
- const unsubscriber = gatewayApi.onUpdateJobsManagementState({
+ const unsubscriber = channelApi.jobList__onUpdateJobsManagementState({
onUpdate(jobsManagementState: JobsManagementState) {
const newSearchParams = {
[QueryParams.FILTERS]: JSON.stringify(jobsManagementState.filters),
@@ -78,12 +78,12 @@ export const Jobs: React.FC = () => {
});
return () => {
- unsubscriber.unSubscribe();
+ unsubscriber.then((unsubscribeHandler) => unsubscribeHandler.unSubscribe());
};
- }, [gatewayApi, history, queryParams, setRuntimePathSearchParams]);
+ }, [channelApi, history, queryParams, setRuntimePathSearchParams]);
- return gatewayApi && initialState ? (
- <EmbeddedJobsManagement driver={gatewayApi} targetOrigin={window.location.origin} initialState={initialState} />
+ return channelApi && initialState ? (
+ <EmbeddedJobsManagement channelApi={channelApi} targetOrigin={window.location.origin} initialState={initialState} />
) : (
<></>
);
diff --git a/packages/runtime-tools-management-console-webapp/src/managementConsole/ManagementConsoleHome.tsx b/packages/runtime-tools-management-console-webapp/src/managementConsole/ManagementConsoleHome.tsx
index c123f0e9268..ca8551adebb 100644
--- a/packages/runtime-tools-management-console-webapp/src/managementConsole/ManagementConsoleHome.tsx
+++ b/packages/runtime-tools-management-console-webapp/src/managementConsole/ManagementConsoleHome.tsx
@@ -17,7 +17,7 @@
* under the License.
*/
-import React, { useCallback, useEffect, useLayoutEffect } from "react";
+import React, { useCallback, useEffect } from "react";
import { Button, ButtonVariant } from "@patternfly/react-core/dist/js/components/Button";
import { useAuthSessions, useAuthSessionsDispatch } from "../authSessions/AuthSessionsContext";
import { PageSection } from "@patternfly/react-core/dist/js/components/Page";
diff --git a/packages/runtime-tools-management-console-webapp/src/managementConsole/ManagementConsolePageLayout.tsx b/packages/runtime-tools-management-console-webapp/src/managementConsole/ManagementConsolePageLayout.tsx
index 177b6422fe6..21928a99ed2 100644
--- a/packages/runtime-tools-management-console-webapp/src/managementConsole/ManagementConsolePageLayout.tsx
+++ b/packages/runtime-tools-management-console-webapp/src/managementConsole/ManagementConsolePageLayout.tsx
@@ -17,10 +17,9 @@
* under the License.
*/
+import React, { useState, useMemo, useCallback, ReactElement } from "react";
import { Page, PageSection, PageSidebar, PageSidebarBody } from "@patternfly/react-core/dist/js/components/Page";
import { PageHeader, PageHeaderTools } from "@patternfly/react-core/deprecated";
-import React, { useState, useMemo, useCallback, useEffect } from "react";
-
import { useEnv } from "../env/hooks/EnvContext";
import { useRoutes } from "../navigation/Hooks";
import { useHistory } from "react-router";
@@ -33,8 +32,8 @@ import { MastheadBrand } from "@patternfly/react-core/dist/js/components/Masthea
type Props = {
children: React.ReactNode;
disabledHeader?: boolean;
- currentPageTile?: string;
- breadcrumbText?: string[];
+ currentPageTile?: string | ReactElement;
+ breadcrumbText?: (string | ReactElement)[];
breadcrumbPath?: BreadcrumbPathType;
nav?: React.ReactNode;
};
diff --git a/packages/runtime-tools-management-console-webapp/src/managementConsole/ManagementConsoleRoutes.tsx b/packages/runtime-tools-management-console-webapp/src/managementConsole/ManagementConsoleRoutes.tsx
index f8658ad2495..f7e9e8e9f22 100644
--- a/packages/runtime-tools-management-console-webapp/src/managementConsole/ManagementConsoleRoutes.tsx
+++ b/packages/runtime-tools-management-console-webapp/src/managementConsole/ManagementConsoleRoutes.tsx
@@ -18,7 +18,7 @@
*/
import React, { FC, useCallback } from "react";
import { Route } from "react-router-dom";
-import { ProcessListPage } from "../process";
+import { ProcessListPage, ProcessDefinitionsListPage } from "../process";
import { Switch, useHistory } from "react-router";
import { ManagementConsoleHome } from "./ManagementConsoleHome";
import { NewAuthSessionLoginSuccessPage, NewAuthSessionModal } from "../authSessions/components";
@@ -29,6 +29,7 @@ import { ProcessDetailsPage } from "../process/details/ProcessDetailsPage";
import { JobsPage } from "../jobs";
import { TaskDetailsPage, TasksPage } from "../tasks";
import { RuntimePageLayoutContextProvider } from "../runtime/RuntimePageLayoutContext";
+import { ProcessDefinitionFormPage } from "../process/form/ProcessDefinitionFormPage";
export const ManagementConsoleRoutes: FC = () => {
const routes = useRoutes();
@@ -83,6 +84,24 @@ export const ManagementConsoleRoutes: FC = () => {
return <ProcessDetailsPage processInstanceId={match?.params.processInstanceId} />;
}}
</Route>
+ <Route
+ path={routes.runtime.processDefinitions.path({
+ runtimeUrl: ":runtimeUrl",
+ })}
+ exact={true}
+ >
+ <ProcessDefinitionsListPage />
+ </Route>
+ <Route
+ path={routes.runtime.processDefinitionForm.path({
+ runtimeUrl: ":runtimeUrl",
+ processName: ":processName",
+ })}
+ >
+ {({ match }) => {
+ return <ProcessDefinitionFormPage processName={match?.params.processName} />;
+ }}
+ </Route>
<Route
path={routes.runtime.jobs.path({
runtimeUrl: ":runtimeUrl",
diff --git a/packages/runtime-tools-management-console-webapp/src/navigation/Routes.ts b/packages/runtime-tools-management-console-webapp/src/navigation/Routes.ts
index 2f7c56f882f..a61e2472f92 100644
--- a/packages/runtime-tools-management-console-webapp/src/navigation/Routes.ts
+++ b/packages/runtime-tools-management-console-webapp/src/navigation/Routes.ts
@@ -38,6 +38,7 @@ export enum PathParams {
RUNTIME_URL = "runtimeUrl",
PROCESS_INSTANCE_ID = "processInstanceId",
TASK_ID = "taskId",
+ PROCESS_NAME = "processName",
}
export class Route<
@@ -141,6 +142,16 @@ export const routes = {
queryParams: QueryParams.USER;
}>(({ runtimeUrl, processInstanceId }) => `/${runtimeUrl}/process/${processInstanceId}`),
+ processDefinitions: new Route<{
+ pathParams: PathParams.RUNTIME_URL;
+ queryParams: QueryParams.USER | QueryParams.FILTERS;
+ }>(({ runtimeUrl }) => `/${runtimeUrl}/process-definitions`),
+
+ processDefinitionForm: new Route<{
+ pathParams: PathParams.RUNTIME_URL | PathParams.PROCESS_NAME;
+ queryParams: QueryParams.USER;
+ }>(({ runtimeUrl, processName }) => `/${runtimeUrl}/process-definitions/${processName}`),
+
jobs: new Route<{
pathParams: PathParams.RUNTIME_URL;
queryParams: QueryParams.USER | QueryParams.FILTERS | QueryParams.ORDER_BY;
diff --git a/packages/runtime-tools-management-console-webapp/src/process/list/ProcessList.tsx b/packages/runtime-tools-management-console-webapp/src/process/definitions/ProcessDefinitionsList.tsx
similarity index 50%
copy from packages/runtime-tools-management-console-webapp/src/process/list/ProcessList.tsx
copy to packages/runtime-tools-management-console-webapp/src/process/definitions/ProcessDefinitionsList.tsx
index ebb4643a2ab..c909a392659 100644
--- a/packages/runtime-tools-management-console-webapp/src/process/list/ProcessList.tsx
+++ b/packages/runtime-tools-management-console-webapp/src/process/definitions/ProcessDefinitionsList.tsx
@@ -18,102 +18,84 @@
*/
import React, { useEffect, useMemo } from "react";
import {
- ProcessListState,
- ProcessInstance,
- ProcessInstanceState,
- ProcessInstanceFilter,
- ProcessListSortBy,
-} from "@kie-tools/runtime-tools-process-gateway-api/dist/types";
-import {
- ProcessListGatewayApi,
- useProcessListGatewayApi,
-} from "@kie-tools/runtime-tools-process-webapp-components/dist/ProcessList";
-import { EmbeddedProcessList } from "@kie-tools/runtime-tools-process-enveloped-components/dist/processList";
+ EmbeddedProcessDefinitionsList,
+ ProcessDefinitionsFilter,
+ ProcessDefinitionsListState,
+} from "@kie-tools/runtime-tools-process-enveloped-components/dist/processDefinitionsList";
import { useHistory } from "react-router";
-import { OrderBy } from "@kie-tools/runtime-tools-shared-gateway-api/dist/types";
import { useQueryParam, useQueryParams } from "../../navigation/queryParams/QueryParamsContext";
import { QueryParams } from "../../navigation/Routes";
import { RuntimePathSearchParamsRoutes, useRuntimeDispatch } from "../../runtime/RuntimeContext";
-const defaultFilters = {
- status: [ProcessInstanceState.Active],
- businessKey: [],
-};
+import { ProcessDefinition } from "@kie-tools/runtime-tools-process-gateway-api/dist/types";
+import { useProcessDefinitionsListChannelApi } from "@kie-tools/runtime-tools-process-webapp-components/dist/ProcessDefinitionsList";
-const defaultSortBy = {
- lastUpdate: OrderBy.DESC,
+const defaultFilters = {
+ processNames: [],
};
interface Props {
- onNavigateToProcessDetails: (processInstanceId: string) => void;
+ onNavigateToProcessDefinitionForm: (processName: string) => void;
}
-export const ProcessList: React.FC<Props> = ({ onNavigateToProcessDetails }) => {
- const gatewayApi: ProcessListGatewayApi = useProcessListGatewayApi();
+export const ProcessDefinitionsList: React.FC<Props> = ({ onNavigateToProcessDefinitionForm }) => {
+ const channelApi = useProcessDefinitionsListChannelApi();
const history = useHistory();
const filters = useQueryParam(QueryParams.FILTERS);
- const sortBy = useQueryParam(QueryParams.SORT_BY);
const queryParams = useQueryParams();
const { setRuntimePathSearchParams } = useRuntimeDispatch();
- const initialState: ProcessListState = useMemo(() => {
+ const initialState: ProcessDefinitionsListState = useMemo(() => {
return {
- filters: filters ? (JSON.parse(filters) as ProcessInstanceFilter) : defaultFilters,
- sortBy: sortBy ? (JSON.parse(sortBy) as ProcessListSortBy) : defaultSortBy,
+ filters: filters ? (JSON.parse(filters) as ProcessDefinitionsFilter) : defaultFilters,
};
- }, [filters, sortBy]);
+ }, [filters]);
useEffect(() => {
const newSearchParams = {
[QueryParams.FILTERS]: JSON.stringify(initialState.filters),
- [QueryParams.SORT_BY]: JSON.stringify(initialState.sortBy),
};
setRuntimePathSearchParams((currentRuntimePathSearchParams) => {
- return currentRuntimePathSearchParams.set(RuntimePathSearchParamsRoutes.PROCESSES, newSearchParams);
+ return currentRuntimePathSearchParams.set(RuntimePathSearchParamsRoutes.PROCESS_DEFINITIONS, newSearchParams);
});
}, [initialState, setRuntimePathSearchParams]);
useEffect(() => {
- const unsubscriber = gatewayApi.onOpenProcessListen({
- onOpen(process: ProcessInstance) {
- onNavigateToProcessDetails(process.id);
+ const onOpenInstanceUnsubscriber = channelApi.processDefinitionsList__onOpenProcessDefinitionListen({
+ onOpen(processDefinition: ProcessDefinition) {
+ onNavigateToProcessDefinitionForm(processDefinition.processName);
},
});
return () => {
- unsubscriber.unSubscribe();
+ onOpenInstanceUnsubscriber.then((unsubscribeHandler) => unsubscribeHandler.unSubscribe());
};
- }, [gatewayApi, onNavigateToProcessDetails]);
+ }, [channelApi, onNavigateToProcessDefinitionForm]);
useEffect(() => {
- const unsubscriber = gatewayApi.onUpdateProcessListState({
- onUpdate(processListState: ProcessListState) {
+ const unsubscriber = channelApi.processDefinitionsList__onUpdateProcessDefinitionsListState({
+ onUpdate(processDefinitionsListState: ProcessDefinitionsListState) {
const newSearchParams = {
- [QueryParams.FILTERS]: JSON.stringify(processListState.filters),
- [QueryParams.SORT_BY]: JSON.stringify(processListState.sortBy),
+ [QueryParams.FILTERS]: JSON.stringify(processDefinitionsListState.filters),
};
setRuntimePathSearchParams((currentRuntimePathSearchParams) => {
- return currentRuntimePathSearchParams.set(RuntimePathSearchParamsRoutes.PROCESSES, newSearchParams);
+ return currentRuntimePathSearchParams.set(RuntimePathSearchParamsRoutes.PROCESS_DEFINITIONS, newSearchParams);
});
- const newQueryParams = queryParams
- .with(QueryParams.FILTERS, newSearchParams[QueryParams.FILTERS])
- .with(QueryParams.SORT_BY, newSearchParams[QueryParams.SORT_BY]);
+ const newQueryParams = queryParams.with(QueryParams.FILTERS, newSearchParams[QueryParams.FILTERS]);
history.replace({ pathname: history.location.pathname, search: newQueryParams.toString() });
},
});
return () => {
- unsubscriber.unSubscribe();
+ unsubscriber.then((unsubscribeHandler) => unsubscribeHandler.unSubscribe());
};
- }, [gatewayApi, history, queryParams, setRuntimePathSearchParams]);
+ }, [channelApi, history, queryParams, setRuntimePathSearchParams]);
return (
- <EmbeddedProcessList
- driver={gatewayApi}
+ <EmbeddedProcessDefinitionsList
+ channelApi={channelApi}
targetOrigin={window.location.origin}
initialState={initialState}
- singularProcessLabel={"Process"}
- pluralProcessLabel={"Processes"}
/>
);
};
diff --git a/packages/runtime-tools-management-console-webapp/src/tasks/TasksPage.tsx b/packages/runtime-tools-management-console-webapp/src/process/definitions/ProcessDefinitionsListPage.tsx
similarity index 67%
copy from packages/runtime-tools-management-console-webapp/src/tasks/TasksPage.tsx
copy to packages/runtime-tools-management-console-webapp/src/process/definitions/ProcessDefinitionsListPage.tsx
index 1268f1fc892..82ff9e4b7ee 100644
--- a/packages/runtime-tools-management-console-webapp/src/tasks/TasksPage.tsx
+++ b/packages/runtime-tools-management-console-webapp/src/process/definitions/ProcessDefinitionsListPage.tsx
@@ -18,16 +18,15 @@
*/
import React, { useCallback, useEffect } from "react";
import { Card } from "@patternfly/react-core/dist/js/components/Card";
-import { Tasks } from "./Tasks";
-import { useEnv } from "../env/hooks/EnvContext";
-import { useRuntimeInfo, useRuntimeSpecificRoutes } from "../runtime/RuntimeContext";
+import { ProcessDefinitionsList } from "./ProcessDefinitionsList";
+import { useRuntimeInfo, useRuntimeSpecificRoutes } from "../../runtime/RuntimeContext";
+import { AuthSession, useAuthSessionsDispatch } from "../../authSessions";
import { useHistory } from "react-router";
-import { useRoutes } from "../navigation/Hooks";
-import { AuthSession, useAuthSessionsDispatch } from "../authSessions";
-import { useRuntimePageLayoutDispatch } from "../runtime/RuntimePageLayoutContext";
-import { ImpersonationPageSection } from "./components/ImpersonationPageSection";
+import { useRoutes } from "../../navigation/Hooks";
+import { useEnv } from "../../env/hooks/EnvContext";
+import { useRuntimePageLayoutDispatch } from "../../runtime/RuntimePageLayoutContext";
-export const TasksPage: React.FC = (ouiaId, ouiaSafe) => {
+export const ProcessDefinitionsListPage: React.FC = () => {
const { env } = useEnv();
const history = useHistory();
const runtimeRoutes = useRuntimeSpecificRoutes();
@@ -36,13 +35,9 @@ export const TasksPage: React.FC = (ouiaId, ouiaSafe) => {
const { setOnSelectAuthSession } = useAuthSessionsDispatch();
const { setCurrentPageTitle, setBreadcrumbText, setBreadcrumbPath } = useRuntimePageLayoutDispatch();
- useEffect(() => {
- document.title = `${env.RUNTIME_TOOLS_MANAGEMENT_CONSOLE_APP_NAME} :: Tasks`;
- }, [env.RUNTIME_TOOLS_MANAGEMENT_CONSOLE_APP_NAME]);
-
useEffect(() => {
setOnSelectAuthSession(() => (authSession: AuthSession) => {
- history.push(runtimeRoutes.tasks(authSession));
+ history.push(runtimeRoutes.processDefinitions(authSession));
});
return () => {
@@ -51,9 +46,9 @@ export const TasksPage: React.FC = (ouiaId, ouiaSafe) => {
}, [history, runtimeRoutes, setOnSelectAuthSession]);
useEffect(() => {
- setCurrentPageTitle("Tasks");
- setBreadcrumbText(["Home", runtimeDisplayInfo?.fullDisplayName ?? "Runtime", "Tasks"]);
- setBreadcrumbPath([routes.home.path({}), runtimeRoutes.processes(), runtimeRoutes.tasks()]);
+ setCurrentPageTitle("Process Definitions");
+ setBreadcrumbText(["Home", runtimeDisplayInfo?.fullDisplayName ?? "Runtime", "Process Definitions"]);
+ setBreadcrumbPath([routes.home.path({}), runtimeRoutes.processes(), runtimeRoutes.processDefinitions()]);
return () => {
setCurrentPageTitle("");
@@ -69,19 +64,20 @@ export const TasksPage: React.FC = (ouiaId, ouiaSafe) => {
setCurrentPageTitle,
]);
- const onNavigateToTaskDetails = useCallback(
- (taskId: string) => {
- history.push(runtimeRoutes.taskDetails(taskId));
+ const onNavigateToProcessDefinitionForm = useCallback(
+ (processName: string) => {
+ history.push(runtimeRoutes.processDefinitionForm(processName));
},
[history, runtimeRoutes]
);
+ useEffect(() => {
+ document.title = `${env.RUNTIME_TOOLS_MANAGEMENT_CONSOLE_APP_NAME} :: Process Definitions`;
+ }, [env.RUNTIME_TOOLS_MANAGEMENT_CONSOLE_APP_NAME]);
+
return (
- <>
- <ImpersonationPageSection />
- <Card className="kogito-management-console__card-size">
- <Tasks onNavigateToTaskDetails={onNavigateToTaskDetails} />
- </Card>
- </>
+ <Card className="kogito-management-console__card-size">
+ <ProcessDefinitionsList onNavigateToProcessDefinitionForm={onNavigateToProcessDefinitionForm} />
+ </Card>
);
};
diff --git a/packages/runtime-tools-management-console-webapp/src/process/details/ProcessDetails.tsx b/packages/runtime-tools-management-console-webapp/src/process/details/ProcessDetails.tsx
index 6a9705bb4bd..6739131d1f0 100644
--- a/packages/runtime-tools-management-console-webapp/src/process/details/ProcessDetails.tsx
+++ b/packages/runtime-tools-management-console-webapp/src/process/details/ProcessDetails.tsx
@@ -23,10 +23,6 @@ import { Bullseye } from "@patternfly/react-core/dist/js/layouts/Bullseye";
import { ProcessInstance } from "@kie-tools/runtime-tools-process-gateway-api/dist/types";
import { ServerErrors } from "@kie-tools/runtime-tools-components/dist/components/ServerErrors";
import { KogitoSpinner } from "@kie-tools/runtime-tools-components/dist/components/KogitoSpinner";
-import {
- useProcessDetailsGatewayApi,
- ProcessDetailsGatewayApi,
-} from "@kie-tools/runtime-tools-process-webapp-components/dist/ProcessDetails";
import {
EmptyState,
EmptyStateBody,
@@ -39,6 +35,7 @@ import { SearchIcon } from "@patternfly/react-icons/dist/js/icons/search-icon";
import { Button } from "@patternfly/react-core/dist/js/components/Button";
import { useCancelableEffect } from "@kie-tools-core/react-hooks/dist/useCancelableEffect";
import { EmbeddedProcessDetails } from "@kie-tools/runtime-tools-process-enveloped-components/dist/processDetails";
+import { useProcessDetailsChannelApi } from "@kie-tools/runtime-tools-process-webapp-components/dist/ProcessDetails";
import { useRuntimeSpecificRoutes } from "../../runtime/RuntimeContext";
import { useHistory } from "react-router";
@@ -48,7 +45,7 @@ interface Props {
}
export const ProcessDetails: React.FC<Props> = ({ processInstanceId, onReturnToProcessList }) => {
- const gatewayApi: ProcessDetailsGatewayApi = useProcessDetailsGatewayApi();
+ const channelApi = useProcessDetailsChannelApi();
const runtimeRoutes = useRuntimeSpecificRoutes();
const history = useHistory();
const [processInstance, setProcessInstance] = useState<ProcessInstance>();
@@ -62,8 +59,8 @@ export const ProcessDetails: React.FC<Props> = ({ processInstanceId, onReturnToP
return;
}
setIsLoading(true);
- gatewayApi
- .processDetailsQuery(processInstanceId)
+ channelApi
+ .processDetails__getProcessDetails(processInstanceId)
.then((response) => {
if (canceled.get()) {
return;
@@ -71,28 +68,27 @@ export const ProcessDetails: React.FC<Props> = ({ processInstanceId, onReturnToP
setProcessInstance(response);
})
.catch((error) => {
- console.log("DEU ERROR!");
setError(error);
})
.finally(() => {
setIsLoading(false);
});
},
- [gatewayApi, processInstanceId]
+ [channelApi, processInstanceId]
)
);
useEffect(() => {
- const unSubscribeHandler = gatewayApi.onOpenProcessInstanceDetailsListener({
+ const unsubscriber = channelApi.processDetails__onOpenProcessInstanceDetailsListener({
onOpen(id: string) {
history.push(runtimeRoutes.processDetails(id));
},
});
return () => {
- unSubscribeHandler.unSubscribe();
+ unsubscriber.then((unsubscribeHandler) => unsubscribeHandler.unSubscribe());
};
- }, [gatewayApi, history, runtimeRoutes]);
+ }, [channelApi, history, runtimeRoutes]);
// Loading State
if (isLoading) {
@@ -105,18 +101,14 @@ export const ProcessDetails: React.FC<Props> = ({ processInstanceId, onReturnToP
// Error State
if (error) {
- return (
- <Bullseye>
- <ServerErrors error={error} variant="large" />
- </Bullseye>
- );
+ return <ServerErrors error={error} variant="large" onGoBack={() => history.push(runtimeRoutes.processes())} />;
}
// Process Instance Details
if (processInstance) {
return (
<EmbeddedProcessDetails
- driver={gatewayApi}
+ channelApi={channelApi}
targetOrigin={window.location.origin}
processInstance={processInstance}
singularProcessLabel={"process"}
diff --git a/packages/runtime-tools-management-console-webapp/src/process/form/ProcessDefinitionForm.tsx b/packages/runtime-tools-management-console-webapp/src/process/form/ProcessDefinitionForm.tsx
new file mode 100644
index 00000000000..51342f0c52c
--- /dev/null
+++ b/packages/runtime-tools-management-console-webapp/src/process/form/ProcessDefinitionForm.tsx
@@ -0,0 +1,197 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import * as React from "react";
+import { useState, useEffect, useCallback, ReactElement } from "react";
+import { Card } from "@patternfly/react-core/dist/js/components/Card";
+import { Bullseye } from "@patternfly/react-core/dist/js/layouts/Bullseye";
+import { ProcessDefinition } from "@kie-tools/runtime-tools-process-gateway-api/dist/types";
+import { ServerErrors } from "@kie-tools/runtime-tools-components/dist/components/ServerErrors";
+import { KogitoSpinner } from "@kie-tools/runtime-tools-components/dist/components/KogitoSpinner";
+import { useProcessFormChannelApi } from "@kie-tools/runtime-tools-process-webapp-components/dist/ProcessForm";
+import {
+ EmptyState,
+ EmptyStateBody,
+ EmptyStateIcon,
+ EmptyStateVariant,
+} from "@patternfly/react-core/dist/js/components/EmptyState";
+import { SearchIcon } from "@patternfly/react-icons/dist/js/icons/search-icon";
+import { Title } from "@patternfly/react-core/dist/js/components/Title";
+import { Button } from "@patternfly/react-core/dist/js/components/Button";
+import { useCancelableEffect } from "@kie-tools-core/react-hooks/dist/useCancelableEffect";
+import { EmbeddedProcessForm } from "@kie-tools/runtime-tools-process-enveloped-components/dist/processForm";
+import { useProcessDefinitionsListChannelApi } from "@kie-tools/runtime-tools-process-webapp-components/dist/ProcessDefinitionsList";
+import {
+ Action,
+ FormNotification,
+ Notification,
+} from "@kie-tools/runtime-tools-components/dist/components/FormNotification";
+
+interface Props {
+ processName: string;
+ onReturnToProcessDefinitionsList: () => void;
+ onNavigateToProcessInstanceDetails?: (processInstanceId: string) => void;
+}
+
+export const ProcessDefinitionForm: React.FC<Props> = ({
+ processName,
+ onReturnToProcessDefinitionsList,
+ onNavigateToProcessInstanceDetails,
+}) => {
+ const processFormChannelApi = useProcessFormChannelApi();
+ const processDefinitionChannelApi = useProcessDefinitionsListChannelApi();
+ const [processDefinition, setProcessDefinition] = useState<ProcessDefinition>();
+ const [isLoading, setIsLoading] = useState<boolean>(true);
+ const [error, setError] = useState<ReactElement | string>();
+ const [notification, setNotification] = useState<Notification>();
+
+ const showNotification = useCallback(
+ (
+ notificationType: "error" | "success",
+ submitMessage: string,
+ notificationDetails?: ReactElement | string,
+ customActions?: Action[]
+ ) => {
+ setNotification({
+ type: notificationType,
+ message: submitMessage,
+ details: notificationDetails,
+ customActions,
+ close: () => {
+ setNotification(undefined);
+ },
+ });
+ },
+ []
+ );
+
+ useEffect(() => {
+ const unsubscriber = processFormChannelApi.processForm__onStartProcessListen({
+ onSuccess(processInstanceId) {
+ processFormChannelApi.processForm__setBusinessKey("");
+ const message = `The process with id: ${processInstanceId} has started successfully`;
+ showNotification("success", message, undefined, [
+ {
+ label: "Go to Process Instance",
+ onClick: () => {
+ setNotification(undefined);
+ onNavigateToProcessInstanceDetails?.(processInstanceId);
+ },
+ },
+ ]);
+ },
+ onError(error) {
+ const message = "Failed to start the process.";
+ const details = error.response ? (
+ <>
+ <b>
+ {error.response.statusText}: {error.message}
+ </b>
+ {error.response.data?.message && (
+ <>
+ <br />
+ {error.response.data.message}
+ </>
+ )}
+ </>
+ ) : (
+ error.message
+ );
+ showNotification("error", message, details);
+ },
+ });
+
+ return () => {
+ unsubscriber.then((unsubscribeHandler) => unsubscribeHandler.unSubscribe());
+ };
+ }, [onNavigateToProcessInstanceDetails, processFormChannelApi, showNotification]);
+
+ useCancelableEffect(
+ useCallback(
+ ({ canceled }) => {
+ if (canceled.get()) {
+ return;
+ }
+ setIsLoading(true);
+ processDefinitionChannelApi
+ .processDefinitionsList__getProcessDefinitionByName(processName)
+ .then((response) => {
+ if (canceled.get()) {
+ return;
+ }
+ setProcessDefinition(response);
+ })
+ .catch((error) => {
+ setError(error);
+ })
+ .finally(() => {
+ setIsLoading(false);
+ });
+ },
+ [processDefinitionChannelApi, processName]
+ )
+ );
+
+ // Loading State
+ if (isLoading) {
+ return (
+ <Card>
+ <KogitoSpinner spinnerText="Loading Process Definition..." />
+ </Card>
+ );
+ }
+
+ // Error State
+ if (error) {
+ return <ServerErrors error={error} variant="large" onGoBack={() => setError(undefined)} />;
+ }
+
+ if (processDefinition) {
+ return (
+ <>
+ {notification && (
+ <div style={{ marginBottom: "16px" }}>
+ <FormNotification notification={notification} />
+ </div>
+ )}
+ <EmbeddedProcessForm
+ channelApi={processFormChannelApi}
+ targetOrigin={window.location.origin}
+ processDefinition={processDefinition}
+ customFormDisplayerEnvelopePath="/resources/form-displayer.html"
+ shouldLoadCustomForms={false}
+ />
+ </>
+ );
+ }
+
+ return (
+ <Bullseye>
+ <EmptyState variant={EmptyStateVariant.full}>
+ <EmptyStateIcon icon={SearchIcon} />
+ <Title headingLevel="h1" size="4xl">
+ Process Definition not found
+ </Title>
+ <EmptyStateBody>{`Process Definition with the name ${processName} not found`}</EmptyStateBody>
+ <Button variant="primary" onClick={onReturnToProcessDefinitionsList} data-testid="redirect-button">
+ Back to Process Definitions
+ </Button>
+ </EmptyState>
+ </Bullseye>
+ );
+};
diff --git a/packages/runtime-tools-management-console-webapp/src/process/form/ProcessDefinitionFormPage.tsx b/packages/runtime-tools-management-console-webapp/src/process/form/ProcessDefinitionFormPage.tsx
new file mode 100644
index 00000000000..fff5b6c2b31
--- /dev/null
+++ b/packages/runtime-tools-management-console-webapp/src/process/form/ProcessDefinitionFormPage.tsx
@@ -0,0 +1,119 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import React, { useCallback, useEffect } from "react";
+import { ProcessDefinitionForm } from "./ProcessDefinitionForm";
+import { useRuntimeInfo, useRuntimeSpecificRoutes } from "../../runtime/RuntimeContext";
+import { AuthSession, useAuthSessionsDispatch } from "../../authSessions";
+import { useHistory } from "react-router";
+import { KogitoSpinner } from "@kie-tools/runtime-tools-components/dist/components/KogitoSpinner";
+import { useEnv } from "../../env/hooks/EnvContext";
+import { useRoutes } from "../../navigation/Hooks";
+import { useRuntimePageLayoutDispatch } from "../../runtime/RuntimePageLayoutContext";
+
+export const ProcessDefinitionFormPage: React.FC<{ processName?: string }> = ({ processName }) => {
+ const history = useHistory();
+ const runtimeRoutes = useRuntimeSpecificRoutes();
+ const routes = useRoutes();
+ const { runtimeDisplayInfo } = useRuntimeInfo();
+ const { setOnSelectAuthSession } = useAuthSessionsDispatch();
+ const { setCurrentPageTitle, setBreadcrumbPath, setBreadcrumbText } = useRuntimePageLayoutDispatch();
+ const { env } = useEnv();
+
+ const onNavigateToProcessDefinitionForm = useCallback(
+ (authSession?: AuthSession) => {
+ if (processName) {
+ history.push(runtimeRoutes.processDefinitionForm(processName, authSession));
+ } else {
+ history.push(runtimeRoutes.processDefinitions(authSession));
+ }
+ },
+ [history, processName, runtimeRoutes]
+ );
+
+ const onNavigateToProcessDefinitionsList = useCallback(() => {
+ history.push(runtimeRoutes.processDefinitions());
+ }, [runtimeRoutes, history]);
+
+ const onNavigateToProcessInstanceDetails = useCallback(
+ (processInstanceId: string) => {
+ history.push(runtimeRoutes.processDetails(processInstanceId));
+ },
+ [runtimeRoutes, history]
+ );
+
+ useEffect(() => {
+ setOnSelectAuthSession(() => onNavigateToProcessDefinitionForm);
+
+ return () => {
+ setOnSelectAuthSession(undefined);
+ };
+ }, [onNavigateToProcessDefinitionForm, setOnSelectAuthSession]);
+
+ useEffect(() => {
+ setCurrentPageTitle(
+ <>
+ New <b>{processName}</b> process
+ </>
+ );
+ setBreadcrumbText([
+ "Home",
+ runtimeDisplayInfo?.fullDisplayName ?? "Runtime",
+ "Process Definitions",
+ processName ?? "",
+ ]);
+ setBreadcrumbPath([
+ routes.home.path({}),
+ runtimeRoutes.processes(),
+ runtimeRoutes.processDefinitions(),
+ processName ? runtimeRoutes.processDefinitionForm(processName) : runtimeRoutes.processes(),
+ ]);
+
+ return () => {
+ setCurrentPageTitle("");
+ setBreadcrumbText([]);
+ setBreadcrumbPath([]);
+ };
+ }, [
+ processName,
+ routes.home,
+ runtimeDisplayInfo?.fullDisplayName,
+ runtimeRoutes,
+ setBreadcrumbPath,
+ setBreadcrumbText,
+ setCurrentPageTitle,
+ ]);
+
+ useEffect(() => {
+ document.title = `${env.RUNTIME_TOOLS_MANAGEMENT_CONSOLE_APP_NAME} :: Process Definition :: ${processName}`;
+ }, [env.RUNTIME_TOOLS_MANAGEMENT_CONSOLE_APP_NAME, processName]);
+
+ return (
+ <>
+ {processName ? (
+ <ProcessDefinitionForm
+ processName={processName}
+ onReturnToProcessDefinitionsList={onNavigateToProcessDefinitionsList}
+ onNavigateToProcessInstanceDetails={onNavigateToProcessInstanceDetails}
+ />
+ ) : (
+ <KogitoSpinner spinnerText="Loading process details..." />
+ )}
+ </>
+ );
+};
diff --git a/packages/runtime-tools-management-console-webapp/src/process/index.ts b/packages/runtime-tools-management-console-webapp/src/process/index.ts
index aa731b59cb3..2d98a497ffd 100644
--- a/packages/runtime-tools-management-console-webapp/src/process/index.ts
+++ b/packages/runtime-tools-management-console-webapp/src/process/index.ts
@@ -20,3 +20,5 @@ export * from "./details/ProcessDetails";
export * from "./details/ProcessDetailsPage";
export * from "./list/ProcessList";
export * from "./list/ProcessListPage";
+export * from "./definitions/ProcessDefinitionsList";
+export * from "./definitions/ProcessDefinitionsListPage";
diff --git a/packages/runtime-tools-management-console-webapp/src/process/list/ProcessList.tsx b/packages/runtime-tools-management-console-webapp/src/process/list/ProcessList.tsx
index ebb4643a2ab..e8387c9598a 100644
--- a/packages/runtime-tools-management-console-webapp/src/process/list/ProcessList.tsx
+++ b/packages/runtime-tools-management-console-webapp/src/process/list/ProcessList.tsx
@@ -18,17 +18,16 @@
*/
import React, { useEffect, useMemo } from "react";
import {
- ProcessListState,
ProcessInstance,
ProcessInstanceState,
ProcessInstanceFilter,
ProcessListSortBy,
} from "@kie-tools/runtime-tools-process-gateway-api/dist/types";
+import { useProcessListChannelApi } from "@kie-tools/runtime-tools-process-webapp-components/dist/ProcessList";
import {
- ProcessListGatewayApi,
- useProcessListGatewayApi,
-} from "@kie-tools/runtime-tools-process-webapp-components/dist/ProcessList";
-import { EmbeddedProcessList } from "@kie-tools/runtime-tools-process-enveloped-components/dist/processList";
+ EmbeddedProcessList,
+ ProcessListState,
+} from "@kie-tools/runtime-tools-process-enveloped-components/dist/processList";
import { useHistory } from "react-router";
import { OrderBy } from "@kie-tools/runtime-tools-shared-gateway-api/dist/types";
import { useQueryParam, useQueryParams } from "../../navigation/queryParams/QueryParamsContext";
@@ -49,7 +48,7 @@ interface Props {
}
export const ProcessList: React.FC<Props> = ({ onNavigateToProcessDetails }) => {
- const gatewayApi: ProcessListGatewayApi = useProcessListGatewayApi();
+ const channelApi = useProcessListChannelApi();
const history = useHistory();
const filters = useQueryParam(QueryParams.FILTERS);
const sortBy = useQueryParam(QueryParams.SORT_BY);
@@ -74,19 +73,19 @@ export const ProcessList: React.FC<Props> = ({ onNavigateToProcessDetails }) =>
}, [initialState, setRuntimePathSearchParams]);
useEffect(() => {
- const unsubscriber = gatewayApi.onOpenProcessListen({
+ const unsubscriber = channelApi.processList__onOpenProcessListen({
onOpen(process: ProcessInstance) {
onNavigateToProcessDetails(process.id);
},
});
return () => {
- unsubscriber.unSubscribe();
+ unsubscriber.then((unsubscribeHandler) => unsubscribeHandler.unSubscribe());
};
- }, [gatewayApi, onNavigateToProcessDetails]);
+ }, [channelApi, onNavigateToProcessDetails]);
useEffect(() => {
- const unsubscriber = gatewayApi.onUpdateProcessListState({
+ const unsubscriber = channelApi.processList__onUpdateProcessListState({
onUpdate(processListState: ProcessListState) {
const newSearchParams = {
[QueryParams.FILTERS]: JSON.stringify(processListState.filters),
@@ -103,13 +102,13 @@ export const ProcessList: React.FC<Props> = ({ onNavigateToProcessDetails }) =>
});
return () => {
- unsubscriber.unSubscribe();
+ unsubscriber.then((unsubscribeHandler) => unsubscribeHandler.unSubscribe());
};
- }, [gatewayApi, history, queryParams, setRuntimePathSearchParams]);
+ }, [channelApi, history, queryParams, setRuntimePathSearchParams]);
return (
<EmbeddedProcessList
- driver={gatewayApi}
+ channelApi={channelApi}
targetOrigin={window.location.origin}
initialState={initialState}
singularProcessLabel={"Process"}
diff --git a/packages/runtime-tools-management-console-webapp/src/runtime/RuntimeContext.tsx b/packages/runtime-tools-management-console-webapp/src/runtime/RuntimeContext.tsx
index 132f36b73f3..7c1f2b9c59a 100644
--- a/packages/runtime-tools-management-console-webapp/src/runtime/RuntimeContext.tsx
+++ b/packages/runtime-tools-management-console-webapp/src/runtime/RuntimeContext.tsx
@@ -44,12 +44,15 @@ import { AuthSessionsService } from "../authSessions";
import { ProcessListContextProvider } from "@kie-tools/runtime-tools-process-webapp-components/dist/ProcessList";
import { JobsManagementContextProvider } from "@kie-tools/runtime-tools-process-webapp-components/dist/JobsManagement";
import { ProcessDetailsContextProvider } from "@kie-tools/runtime-tools-process-webapp-components/dist/ProcessDetails";
-import { TaskInboxContextProvider } from "@kie-tools/runtime-tools-process-webapp-components/dist/TaskInbox";
+import { TaskListContextProvider } from "@kie-tools/runtime-tools-process-webapp-components/dist/TaskList";
import { TaskFormContextProvider } from "@kie-tools/runtime-tools-process-webapp-components/dist/TaskForms";
+import { ProcessDefinitionsListContextProvider } from "@kie-tools/runtime-tools-process-webapp-components/dist/ProcessDefinitionsList";
+import { ProcessFormContextProvider } from "@kie-tools/runtime-tools-process-webapp-components/dist/ProcessForm";
export type RuntimePathSearchParams = Partial<Record<QueryParams, string>>;
export enum RuntimePathSearchParamsRoutes {
PROCESSES = "processes",
+ PROCESS_DEFINITIONS = "processDefinitions",
JOBS = "jobs",
TASKS = "tasks",
TASK_DETAILS = "taskDetails",
@@ -376,8 +379,9 @@ export const RuntimeContextProvider: React.FC<RuntimeContextProviderProps> = (pr
// Replacing only the origin keeps the URLSeachParameters intact
return url.replace(urlOrigin, runtimeUrlOrigin);
},
+ token: accessToken,
}),
- [runtimeUrl]
+ [runtimeUrl, accessToken]
);
return (
@@ -388,11 +392,15 @@ export const RuntimeContextProvider: React.FC<RuntimeContextProviderProps> = (pr
<KogitoAppContextProvider userContext={userContext}>
<ProcessListContextProvider apolloClient={apolloClient} options={providerOptions}>
<ProcessDetailsContextProvider apolloClient={apolloClient} options={providerOptions}>
- <JobsManagementContextProvider apolloClient={apolloClient}>
- <TaskInboxContextProvider apolloClient={apolloClient}>
- <TaskFormContextProvider options={providerOptions}>{props.children}</TaskFormContextProvider>
- </TaskInboxContextProvider>
- </JobsManagementContextProvider>
+ <ProcessDefinitionsListContextProvider apolloClient={apolloClient} options={providerOptions}>
+ <ProcessFormContextProvider token={accessToken}>
+ <JobsManagementContextProvider apolloClient={apolloClient}>
+ <TaskListContextProvider apolloClient={apolloClient}>
+ <TaskFormContextProvider options={providerOptions}>{props.children}</TaskFormContextProvider>
+ </TaskListContextProvider>
+ </JobsManagementContextProvider>
+ </ProcessFormContextProvider>
+ </ProcessDefinitionsListContextProvider>
</ProcessDetailsContextProvider>
</ProcessListContextProvider>
</KogitoAppContextProvider>
@@ -474,6 +482,33 @@ export function useRuntimeSpecificRoutes() {
// Should never come to this...
return buildRouteUrl(routes.home);
},
+ processDefinitions: (authSession?: AuthSession) => {
+ const pathRuntimeUrl = authSession ? authSession.runtimeUrl : runtimeUrl;
+ const pathUsername = authSession && isOpenIdConnectAuthSession(authSession) ? authSession.username : username;
+ if (pathRuntimeUrl) {
+ return buildRouteUrl(
+ routes.runtime.processDefinitions,
+ { runtimeUrl: pathRuntimeUrl },
+ { user: pathUsername },
+ runtimePathSearchParams.get(RuntimePathSearchParamsRoutes.PROCESS_DEFINITIONS)
+ );
+ }
+ // Should never come to this...
+ return buildRouteUrl(routes.home);
+ },
+ processDefinitionForm: (processName: string, authSession?: AuthSession) => {
+ const pathRuntimeUrl = authSession ? authSession.runtimeUrl : runtimeUrl;
+ const pathUsername = authSession && isOpenIdConnectAuthSession(authSession) ? authSession.username : username;
+ if (pathRuntimeUrl) {
+ return buildRouteUrl(
+ routes.runtime.processDefinitionForm,
+ { runtimeUrl: pathRuntimeUrl, processName },
+ { user: pathUsername }
+ );
+ }
+ // Should never come to this...
+ return buildRouteUrl(routes.home);
+ },
jobs: (authSession?: AuthSession) => {
const pathRuntimeUrl = authSession ? authSession.runtimeUrl : runtimeUrl;
const pathUsername = authSession && isOpenIdConnectAuthSession(authSession) ? authSession.username : username;
diff --git a/packages/runtime-tools-management-console-webapp/src/runtime/RuntimeNav.tsx b/packages/runtime-tools-management-console-webapp/src/runtime/RuntimeNav.tsx
index 4d28696d9b5..193e4593476 100644
--- a/packages/runtime-tools-management-console-webapp/src/runtime/RuntimeNav.tsx
+++ b/packages/runtime-tools-management-console-webapp/src/runtime/RuntimeNav.tsx
@@ -33,15 +33,19 @@ export const RuntimeNav: React.FC = () => {
isActive={[runtimeRoutes.processes().pathname, runtimeRoutes.processDetails("").pathname].some((path) =>
history.location.pathname.includes(path)
)}
- ouiaId="process-instances"
>
<Link to={runtimeRoutes.processes()}>Process Instances</Link>
</NavItem>
<NavItem
- key={"jobs-nav"}
- isActive={history.location.pathname.includes(runtimeRoutes.jobs().pathname)}
- ouiaId="jobs"
+ key={"process-definitions-nav"}
+ isActive={[
+ runtimeRoutes.processDefinitions().pathname,
+ runtimeRoutes.processDefinitionForm("").pathname,
+ ].some((path) => history.location.pathname.includes(path))}
>
+ <Link to={runtimeRoutes.processDefinitions()}>Process Definitions</Link>
+ </NavItem>
+ <NavItem key={"jobs-nav"} isActive={history.location.pathname.includes(runtimeRoutes.jobs().pathname)}>
<Link to={runtimeRoutes.jobs()}>Jobs</Link>
</NavItem>
<NavItem
diff --git a/packages/runtime-tools-management-console-webapp/src/runtime/RuntimePageLayoutContext.tsx b/packages/runtime-tools-management-console-webapp/src/runtime/RuntimePageLayoutContext.tsx
index 4b03e4570cb..1de00792d67 100644
--- a/packages/runtime-tools-management-console-webapp/src/runtime/RuntimePageLayoutContext.tsx
+++ b/packages/runtime-tools-management-console-webapp/src/runtime/RuntimePageLayoutContext.tsx
@@ -17,7 +17,7 @@
* under the License.
*/
-import React, { createContext, PropsWithChildren, useContext, useMemo, useState } from "react";
+import React, { createContext, PropsWithChildren, ReactElement, useContext, useMemo, useState } from "react";
import { Location, LocationDescriptor } from "history";
import { ManagementConsolePageLayout } from "../managementConsole/ManagementConsolePageLayout";
import { RuntimeNav } from "./RuntimeNav";
@@ -25,14 +25,14 @@ import { RuntimeNav } from "./RuntimeNav";
export type BreadcrumbPathType = Array<Pick<Location, "pathname" | "state"> | LocationDescriptor>;
export type RuntimePageLayoutContextType = {
- currentPageTitle: string;
- breadcrumbText: string[];
+ currentPageTitle: string | ReactElement;
+ breadcrumbText: (string | ReactElement)[];
breadcrumbPath: BreadcrumbPathType;
};
export type RuntimePageLayoutDispatchContextType = {
- setCurrentPageTitle: React.Dispatch<React.SetStateAction<string>>;
- setBreadcrumbText: React.Dispatch<React.SetStateAction<string[]>>;
+ setCurrentPageTitle: React.Dispatch<React.SetStateAction<string | ReactElement>>;
+ setBreadcrumbText: React.Dispatch<React.SetStateAction<(string | ReactElement)[]>>;
setBreadcrumbPath: React.Dispatch<React.SetStateAction<BreadcrumbPathType | undefined>>;
};
@@ -50,8 +50,8 @@ export function useRuntimePageLayoutDispatch() {
}
export function RuntimePageLayoutContextProvider(props: PropsWithChildren<{}>) {
- const [currentPageTitle, setCurrentPageTitle] = useState("");
- const [breadcrumbText, setBreadcrumbText] = useState<string[]>([]);
+ const [currentPageTitle, setCurrentPageTitle] = useState<string | ReactElement>("");
+ const [breadcrumbText, setBreadcrumbText] = useState<(string | ReactElement)[]>([]);
const [breadcrumbPath, setBreadcrumbPath] = useState<BreadcrumbPathType>([]);
const value = useMemo(
diff --git a/packages/runtime-tools-management-console-webapp/src/styles.css b/packages/runtime-tools-management-console-webapp/src/styles.css
index 97f1f416b56..4951d310f2d 100644
--- a/packages/runtime-tools-management-console-webapp/src/styles.css
+++ b/packages/runtime-tools-management-console-webapp/src/styles.css
@@ -92,6 +92,5 @@
.kogito-management-console__impersonation-hint {
width: 100%;
padding: 0;
- margin-bottom: 24px;
border-radius: 16px;
}
diff --git a/packages/runtime-tools-management-console-webapp/src/tasks/TaskDetails.tsx b/packages/runtime-tools-management-console-webapp/src/tasks/TaskDetails.tsx
index 66b25844a9f..838cd7b11df 100644
--- a/packages/runtime-tools-management-console-webapp/src/tasks/TaskDetails.tsx
+++ b/packages/runtime-tools-management-console-webapp/src/tasks/TaskDetails.tsx
@@ -32,12 +32,8 @@ import { Card, CardBody } from "@patternfly/react-core/dist/js/components/Card";
import { Button } from "@patternfly/react-core/dist/js/components/Button";
import { Title } from "@patternfly/react-core/dist/js/components/Title";
import { Bullseye } from "@patternfly/react-core/dist/js/layouts/Bullseye";
-import { Grid, GridItem } from "@patternfly/react-core/dist/js/layouts/Grid";
import { Flex, FlexItem } from "@patternfly/react-core/dist/js/layouts/Flex";
-import {
- TaskInboxGatewayApi,
- useTaskInboxGatewayApi,
-} from "@kie-tools/runtime-tools-process-webapp-components/dist/TaskInbox";
+import { useTaskListChannelApi } from "@kie-tools/runtime-tools-process-webapp-components/dist/TaskList";
import { KogitoSpinner } from "@kie-tools/runtime-tools-components/dist/components/KogitoSpinner";
import { ServerErrors } from "@kie-tools/runtime-tools-components/dist/components/ServerErrors";
import {
@@ -49,20 +45,20 @@ import { EmbeddedTaskDetails } from "@kie-tools/runtime-tools-process-enveloped-
import { UserTaskInstance } from "@kie-tools/runtime-tools-process-gateway-api/dist/types";
import { TaskState } from "@kie-tools/runtime-tools-process-enveloped-components/dist/taskDetails";
import { TaskForm } from "./TaskForm";
-import { FormNotification, Notification } from "./components";
import { useRuntime, useRuntimeDispatch, useRuntimeInfo, useRuntimeSpecificRoutes } from "../runtime/RuntimeContext";
import { useCancelableEffect } from "@kie-tools-core/react-hooks/dist/useCancelableEffect";
import { isOpenIdConnectAuthSession, useAuthSessions } from "../authSessions";
+import { FormNotification, Notification } from "@kie-tools/runtime-tools-components/dist/components/FormNotification";
interface Props {
taskId?: string;
}
export const TaskDetails: React.FC<Props> = ({ taskId }) => {
- const taskInboxGatewayApi: TaskInboxGatewayApi = useTaskInboxGatewayApi();
+ const channelApi = useTaskListChannelApi();
const history = useHistory();
const runtimeRoutes = useRuntimeSpecificRoutes();
- const { username, accessToken } = useRuntimeInfo();
+ const { username } = useRuntimeInfo();
const { impersonationUsername } = useRuntime();
const { currentAuthSession } = useAuthSessions();
const { refreshToken } = useRuntimeDispatch();
@@ -80,8 +76,8 @@ export const TaskDetails: React.FC<Props> = ({ taskId }) => {
}
setIsLoading(true);
setIsDetailsExpanded(false);
- taskInboxGatewayApi
- .getTaskById(taskId)
+ channelApi
+ .taskList__getTaskById(taskId)
.then((taskData) => {
if (canceled.get()) {
return;
@@ -104,14 +100,14 @@ export const TaskDetails: React.FC<Props> = ({ taskId }) => {
setIsLoading(false);
});
},
- [impersonationUsername, taskId, taskInboxGatewayApi, username]
+ [impersonationUsername, taskId, channelApi, username]
)
);
const goToTasks = useCallback(() => {
- taskInboxGatewayApi.clearOpenTask();
+ channelApi.taskList__clearOpenTask();
history.push(runtimeRoutes.tasks());
- }, [history, runtimeRoutes, taskInboxGatewayApi]);
+ }, [history, runtimeRoutes, channelApi]);
const showNotification = useCallback(
(notificationType: "error" | "success", submitMessage: string, notificationDetails?: string) => {
@@ -119,13 +115,15 @@ export const TaskDetails: React.FC<Props> = ({ taskId }) => {
type: notificationType,
message: submitMessage,
details: notificationDetails,
- customAction: {
- label: "Go to Tasks",
- onClick: () => {
- setNotification(undefined);
- goToTasks();
+ customActions: [
+ {
+ label: "Go to Tasks",
+ onClick: () => {
+ setNotification(undefined);
+ goToTasks();
+ },
},
- },
+ ],
close: () => {
setNotification(undefined);
},
@@ -171,136 +169,112 @@ export const TaskDetails: React.FC<Props> = ({ taskId }) => {
setIsDetailsExpanded(false);
}, []);
+ const taskFormContent = useMemo(
+ () =>
+ userTask ? (
+ <TaskForm
+ userTask={userTask}
+ onSubmitFormSuccess={onSubmitSuccess}
+ onSubmitFormError={onSubmitError}
+ onUnauthorized={onUnauthorized}
+ username={username}
+ />
+ ) : null,
+ [onSubmitError, onSubmitSuccess, onUnauthorized, userTask, username]
+ );
+
+ const taskDetailsPanel = useMemo(
+ () =>
+ userTask ? (
+ <DrawerPanelContent>
+ <DrawerHead>
+ <span tabIndex={isDetailsExpanded ? 0 : -1}>
+ <Title headingLevel="h3" size="xl">
+ Details
+ </Title>
+ </span>
+ <DrawerActions>
+ <DrawerCloseButton onClick={onDetailsCloseClick} />
+ </DrawerActions>
+ </DrawerHead>
+ <DrawerPanelBody>
+ <EmbeddedTaskDetails targetOrigin={window.location.origin} userTask={userTask} />
+ </DrawerPanelBody>
+ </DrawerPanelContent>
+ ) : null,
+ [isDetailsExpanded, onDetailsCloseClick, userTask]
+ );
+
const content = useMemo(() => {
if (isLoading) {
return (
- <Grid hasGutter md={1} className={"kogito-management-console__full-size"}>
- <GridItem span={12} className={"kogito-management-console__full-size"}>
- <Card className={"kogito-management-console__full-size"}>
- <Bullseye>
- <KogitoSpinner spinnerText={`Loading details for task: ${taskId}`} />
- </Bullseye>
- </Card>
- </GridItem>
- </Grid>
+ <Card className="kogito-management-console__card-size">
+ <Bullseye>
+ <KogitoSpinner spinnerText={`Loading details for task: ${taskId}`} />
+ </Bullseye>
+ </Card>
);
}
if (error) {
return (
- <Grid hasGutter md={1} className={"kogito-management-console__full-size"}>
- <GridItem span={12} className={"kogito-management-console__full-size"}>
- <Card className={"kogito-management-console__full-size"}>
- <ServerErrors error={error} variant="large">
- <Button variant="primary" onClick={() => goToTasks()}>
- Go to Tasks
- </Button>
- </ServerErrors>
- </Card>
- </GridItem>
- </Grid>
+ <Card className="kogito-management-console__card-size">
+ <ServerErrors error={error} variant="large">
+ <Button variant="primary" onClick={() => goToTasks()}>
+ Go to Tasks
+ </Button>
+ </ServerErrors>
+ </Card>
);
}
if (!userTask) {
return (
- <Grid hasGutter md={1} className={"kogito-management-console__full-size"}>
- <GridItem span={12} className={"kogito-management-console__full-size"}>
- <Card className={"kogito-management-console__full-size"}>
- <KogitoEmptyState
- type={KogitoEmptyStateType.Info}
- title={"Cannot find Task"}
- body={`Cannot find Task with id '${taskId}'`}
- />
- </Card>
- </GridItem>
- </Grid>
+ <Card className="kogito-management-console__card-size">
+ <KogitoEmptyState
+ type={KogitoEmptyStateType.Info}
+ title={"Cannot find Task"}
+ body={`Cannot find Task with id '${taskId}'`}
+ />
+ </Card>
);
}
- const taskDetailsPanel = (
- <DrawerPanelContent className={"kogito-management-console__full-size"}>
- <DrawerHead>
- <span tabIndex={isDetailsExpanded ? 0 : -1}>
- <Title headingLevel="h3" size="xl">
- Details
- </Title>
- </span>
- <DrawerActions>
- <DrawerCloseButton onClick={onDetailsCloseClick} />
- </DrawerActions>
- </DrawerHead>
- <DrawerPanelBody>
- <EmbeddedTaskDetails targetOrigin={window.location.origin} userTask={userTask} />
- </DrawerPanelBody>
- </DrawerPanelContent>
- );
-
return (
- <Drawer isExpanded={isDetailsExpanded}>
- <DrawerContent panelContent={taskDetailsPanel}>
- <DrawerContentBody>
- <Grid hasGutter md={1} className={"kogito-management-console__full-size"}>
- <GridItem span={12} className={"kogito-management-console__full-size"}>
- <Card isPlain className={"kogito-management-console__full-size"}>
- <CardBody className="pf-v5-u-h-100">
- <TaskForm
- userTask={userTask}
- onSubmitFormSuccess={onSubmitSuccess}
- onSubmitFormError={onSubmitError}
- onUnauthorized={onUnauthorized}
- accessToken={accessToken}
- username={username}
- />
- </CardBody>
- </Card>
- </GridItem>
- </Grid>
- </DrawerContentBody>
- </DrawerContent>
- </Drawer>
+ <Card className="kogito-management-console__card-size">
+ <Drawer isExpanded={isDetailsExpanded}>
+ <DrawerContent panelContent={taskDetailsPanel}>
+ <DrawerContentBody>
+ <CardBody className="pf-v5-u-h-100">{taskFormContent}</CardBody>
+ </DrawerContentBody>
+ </DrawerContent>
+ </Drawer>
+ </Card>
);
- }, [
- accessToken,
- error,
- goToTasks,
- isDetailsExpanded,
- isLoading,
- onDetailsCloseClick,
- onSubmitError,
- onSubmitSuccess,
- onUnauthorized,
- taskId,
- userTask,
- username,
- ]);
+ }, [error, goToTasks, isDetailsExpanded, isLoading, taskDetailsPanel, taskFormContent, taskId, userTask]);
return (
<>
{userTask && (
- <Flex justifyContent={{ default: "justifyContentSpaceBetween" }}>
- <FlexItem>
- <PageTitle title={userTask.referenceName} extra={<TaskState task={userTask} variant={"label"} />} />
- </FlexItem>
- <FlexItem>
- <Button variant="secondary" id="view-details" onClick={onViewDetailsClick}>
- View details
- </Button>
- </FlexItem>
- </Flex>
+ <FlexItem>
+ <Flex justifyContent={{ default: "justifyContentSpaceBetween" }}>
+ <FlexItem>
+ <PageTitle title={userTask.referenceName} extra={<TaskState task={userTask} variant={"label"} />} />
+ </FlexItem>
+ <FlexItem>
+ <Button variant="secondary" id="view-details" onClick={onViewDetailsClick}>
+ View details
+ </Button>
+ </FlexItem>
+ </Flex>
+ </FlexItem>
)}
{notification && (
<div className="kogito-management-console__task-details-page">
<FormNotification notification={notification} />
</div>
)}
- <Card
- isPlain
- className="kogito-management-console__card-size"
- style={{ paddingTop: "var(--pf-v5-global--spacer--md)" }}
- >
- {content}
- </Card>
+ <FlexItem grow={{ default: "grow" }}>{content}</FlexItem>
</>
);
};
diff --git a/packages/runtime-tools-management-console-webapp/src/tasks/TaskDetailsPage.tsx b/packages/runtime-tools-management-console-webapp/src/tasks/TaskDetailsPage.tsx
index 4e003255970..b01edcb66c6 100644
--- a/packages/runtime-tools-management-console-webapp/src/tasks/TaskDetailsPage.tsx
+++ b/packages/runtime-tools-management-console-webapp/src/tasks/TaskDetailsPage.tsx
@@ -25,6 +25,7 @@ import { useRoutes } from "../navigation/Hooks";
import { TaskDetails } from "./TaskDetails";
import { useRuntimePageLayoutDispatch } from "../runtime/RuntimePageLayoutContext";
import { ImpersonationPageSection } from "./components/ImpersonationPageSection";
+import { Flex, FlexItem } from "@patternfly/react-core/dist/js/layouts/Flex";
interface Props {
taskId?: string;
@@ -86,9 +87,11 @@ export const TaskDetailsPage: React.FC<Props> = ({ taskId }) => {
]);
return (
- <>
- <ImpersonationPageSection />
+ <Flex direction={{ default: "column" }} style={{ height: "100%" }}>
+ <FlexItem>
+ <ImpersonationPageSection />
+ </FlexItem>
<TaskDetails taskId={taskId} />
- </>
+ </Flex>
);
};
diff --git a/packages/runtime-tools-management-console-webapp/src/tasks/TaskForm.tsx b/packages/runtime-tools-management-console-webapp/src/tasks/TaskForm.tsx
index 9070b76be34..9f4a4384cc8 100644
--- a/packages/runtime-tools-management-console-webapp/src/tasks/TaskForm.tsx
+++ b/packages/runtime-tools-management-console-webapp/src/tasks/TaskForm.tsx
@@ -20,7 +20,7 @@ import React, { useMemo } from "react";
import { Form } from "@kie-tools/runtime-tools-shared-gateway-api/dist/types";
import { EmbeddedTaskForm } from "@kie-tools/runtime-tools-process-enveloped-components/dist/taskForm";
import { UserTaskInstance } from "@kie-tools/runtime-tools-process-gateway-api/dist/types";
-import { useTaskFormGatewayApi } from "@kie-tools/runtime-tools-process-webapp-components/dist/TaskForms";
+import { useTaskFormChannelApi } from "@kie-tools/runtime-tools-process-webapp-components/dist/TaskForms";
interface Props {
userTask: UserTaskInstance;
@@ -36,58 +36,53 @@ export const TaskForm: React.FC<Props> = ({
onSubmitFormSuccess,
onSubmitFormError,
onUnauthorized,
- accessToken,
username,
}) => {
- const gatewayApi = useTaskFormGatewayApi();
- const requestHeaders = useMemo(
- () =>
- accessToken
- ? {
- Authorization: `Bearer ${accessToken}`,
+ const channelApi = useTaskFormChannelApi();
+
+ const extendedChannelApi = useMemo(
+ () => ({
+ taskForm__doSubmit(userTask: UserTaskInstance, phase?: string, payload?: any): Promise<any> {
+ return channelApi
+ .taskForm__doSubmit(userTask, phase ?? "", payload)
+ .then((result) => onSubmitFormSuccess(phase ?? ""))
+ .catch(async (error) => {
+ if (error?.response?.status === 401) {
+ await onUnauthorized(error);
+ }
+ const details = error.response?.data?.message ? error.response.data.message : error.message;
+ onSubmitFormError(phase ?? "", details);
+ });
+ },
+ taskForm__getTaskFormSchema(userTask: UserTaskInstance): Promise<Record<string, any>> {
+ return channelApi.taskForm__getTaskFormSchema(userTask).catch(async (error) => {
+ if (error?.response?.status === 401) {
+ await onUnauthorized(error);
+ }
+ return error;
+ });
+ },
+ taskForm__getCustomForm(userTask: UserTaskInstance): Promise<Form> {
+ // No-op
+ return Promise.reject();
+ },
+ taskForm__getTaskPhases(userTask: UserTaskInstance): Promise<string[]> {
+ return channelApi.taskForm__getTaskPhases(userTask).catch(async (error) => {
+ if (error?.response?.status === 401) {
+ await onUnauthorized(error);
}
- : undefined,
- [accessToken]
+ return error;
+ });
+ },
+ }),
+ [channelApi, onSubmitFormError, onSubmitFormSuccess, onUnauthorized]
);
return (
<EmbeddedTaskForm
userTask={userTask}
user={{ id: username ?? "", groups: [] }}
- driver={{
- doSubmit(phase?: string, payload?: any): Promise<any> {
- return gatewayApi
- .doSubmit(userTask, phase ?? "", payload, requestHeaders)
- .then((result) => onSubmitFormSuccess(phase ?? ""))
- .catch(async (error) => {
- if (error?.response?.status === 401) {
- await onUnauthorized(error);
- }
- const details = error.response?.data?.message ? error.response.data.message : error.message;
- onSubmitFormError(phase ?? "", details);
- });
- },
- getTaskFormSchema(): Promise<Record<string, any>> {
- return gatewayApi.getTaskFormSchema(userTask, requestHeaders).catch(async (error) => {
- if (error?.response?.status === 401) {
- await onUnauthorized(error);
- }
- return error;
- });
- },
- getCustomForm(): Promise<Form> {
- // No-op
- return gatewayApi.getCustomForm(userTask);
- },
- getTaskPhases(): Promise<string[]> {
- return gatewayApi.getTaskPhases(userTask, requestHeaders).catch(async (error) => {
- if (error?.response?.status === 401) {
- await onUnauthorized(error);
- }
- return error;
- });
- },
- }}
+ channelApi={extendedChannelApi}
targetOrigin={window.location.origin}
/>
);
diff --git a/packages/runtime-tools-management-console-webapp/src/tasks/Tasks.tsx b/packages/runtime-tools-management-console-webapp/src/tasks/Tasks.tsx
index cbd512f6ebb..1662741bff8 100644
--- a/packages/runtime-tools-management-console-webapp/src/tasks/Tasks.tsx
+++ b/packages/runtime-tools-management-console-webapp/src/tasks/Tasks.tsx
@@ -18,48 +18,45 @@
*/
import React, { useEffect, useMemo } from "react";
import { useHistory } from "react-router-dom";
-import {
- TaskInboxGatewayApi,
- useTaskInboxGatewayApi,
-} from "@kie-tools/runtime-tools-process-webapp-components/dist/TaskInbox";
-import { EmbeddedTaskInbox } from "@kie-tools/runtime-tools-process-enveloped-components/dist/taskInbox";
+import { EmbeddedTaskList } from "@kie-tools/runtime-tools-process-enveloped-components/dist/taskList";
import { getActiveTaskStates, getAllTaskStates } from "@kie-tools/runtime-tools-process-webapp-components/dist/utils";
-import { UserTaskInstance } from "@kie-tools/runtime-tools-process-gateway-api/dist/types";
import {
- QueryFilter,
- TaskInboxState,
- SortBy,
-} from "@kie-tools/runtime-tools-process-enveloped-components/src/taskInbox";
+ TaskListQueryFilter,
+ TaskListSortBy,
+ UserTaskInstance,
+} from "@kie-tools/runtime-tools-process-gateway-api/dist/types";
+import { TaskListState } from "@kie-tools/runtime-tools-process-enveloped-components/dist/taskList";
import { RuntimePathSearchParamsRoutes, useRuntimeDispatch } from "../runtime/RuntimeContext";
import { useQueryParam, useQueryParams } from "../navigation/queryParams/QueryParamsContext";
import { QueryParams } from "../navigation/Routes";
+import { useTaskListChannelApi } from "@kie-tools/runtime-tools-process-webapp-components/dist/TaskList";
interface Props {
onNavigateToTaskDetails: (taskId: string) => void;
}
-const defaultFilter: QueryFilter = {
+const defaultFilter: TaskListQueryFilter = {
taskNames: [],
taskStates: getActiveTaskStates(),
};
-const defaultOrderBy: SortBy = {
+const defaultOrderBy: TaskListSortBy = {
property: "lastUpdate",
direction: "desc",
};
export const Tasks: React.FC<Props> = ({ onNavigateToTaskDetails }) => {
- const gatewayApi: TaskInboxGatewayApi = useTaskInboxGatewayApi();
+ const channelApi = useTaskListChannelApi();
const history = useHistory();
const filters = useQueryParam(QueryParams.FILTERS);
const sortBy = useQueryParam(QueryParams.SORT_BY);
const queryParams = useQueryParams();
const { setRuntimePathSearchParams } = useRuntimeDispatch();
- const initialState: TaskInboxState = useMemo(() => {
+ const initialState: TaskListState = useMemo(() => {
return {
- filters: filters ? (JSON.parse(filters) as TaskInboxState["filters"]) : defaultFilter,
- sortBy: sortBy ? (JSON.parse(sortBy) as TaskInboxState["sortBy"]) : defaultOrderBy,
+ filters: filters ? (JSON.parse(filters) as TaskListState["filters"]) : defaultFilter,
+ sortBy: sortBy ? (JSON.parse(sortBy) as TaskListState["sortBy"]) : defaultOrderBy,
currentPage: {
offset: 0,
limit: 10,
@@ -78,8 +75,8 @@ export const Tasks: React.FC<Props> = ({ onNavigateToTaskDetails }) => {
}, [initialState, setRuntimePathSearchParams]);
useEffect(() => {
- const unsubscriber = gatewayApi.onUpdateTaskListState({
- onUpdate(taskListState: TaskInboxState) {
+ const unsubscriber = channelApi.taskList__onUpdateTaskListState({
+ onUpdate(taskListState: TaskListState) {
const newSearchParams = {
[QueryParams.FILTERS]: JSON.stringify(taskListState.filters),
[QueryParams.ORDER_BY]: JSON.stringify(taskListState.sortBy),
@@ -95,26 +92,26 @@ export const Tasks: React.FC<Props> = ({ onNavigateToTaskDetails }) => {
});
return () => {
- unsubscriber.unSubscribe();
+ unsubscriber.then((unsubscribeHandler) => unsubscribeHandler.unSubscribe());
};
- }, [gatewayApi, history, queryParams, setRuntimePathSearchParams]);
+ }, [channelApi, history, queryParams, setRuntimePathSearchParams]);
useEffect(() => {
- const unsubscriber = gatewayApi.onOpenTaskListen({
+ const unsubscriber = channelApi.taskList__onOpenTaskListen({
onOpen(task: UserTaskInstance) {
onNavigateToTaskDetails(task.id);
},
});
return () => {
- unsubscriber.unSubscribe();
+ unsubscriber.then((unsubscribeHandler) => unsubscribeHandler.unSubscribe());
};
- }, [gatewayApi, onNavigateToTaskDetails]);
+ }, [channelApi, onNavigateToTaskDetails]);
return (
- <EmbeddedTaskInbox
+ <EmbeddedTaskList
initialState={initialState}
- driver={gatewayApi}
+ channelApi={channelApi}
allTaskStates={getAllTaskStates()}
activeTaskStates={getActiveTaskStates()}
targetOrigin={window.location.origin}
diff --git a/packages/runtime-tools-management-console-webapp/src/tasks/TasksPage.tsx b/packages/runtime-tools-management-console-webapp/src/tasks/TasksPage.tsx
index 1268f1fc892..903ad72d407 100644
--- a/packages/runtime-tools-management-console-webapp/src/tasks/TasksPage.tsx
+++ b/packages/runtime-tools-management-console-webapp/src/tasks/TasksPage.tsx
@@ -26,6 +26,7 @@ import { useRoutes } from "../navigation/Hooks";
import { AuthSession, useAuthSessionsDispatch } from "../authSessions";
import { useRuntimePageLayoutDispatch } from "../runtime/RuntimePageLayoutContext";
import { ImpersonationPageSection } from "./components/ImpersonationPageSection";
+import { Flex, FlexItem } from "@patternfly/react-core/dist/js/layouts/Flex";
export const TasksPage: React.FC = (ouiaId, ouiaSafe) => {
const { env } = useEnv();
@@ -77,11 +78,15 @@ export const TasksPage: React.FC = (ouiaId, ouiaSafe) => {
);
return (
- <>
- <ImpersonationPageSection />
- <Card className="kogito-management-console__card-size">
- <Tasks onNavigateToTaskDetails={onNavigateToTaskDetails} />
- </Card>
- </>
+ <Flex direction={{ default: "column" }} style={{ height: "100%" }}>
+ <FlexItem>
+ <ImpersonationPageSection />
+ </FlexItem>
+ <FlexItem grow={{ default: "grow" }}>
+ <Card className="kogito-management-console__card-size">
+ <Tasks onNavigateToTaskDetails={onNavigateToTaskDetails} />
+ </Card>
+ </FlexItem>
+ </Flex>
);
};
diff --git a/packages/runtime-tools-management-console-webapp/src/tasks/components/FormNotification.tsx b/packages/runtime-tools-management-console-webapp/src/tasks/components/FormNotification.tsx
deleted file mode 100644
index 1860961dfa4..00000000000
--- a/packages/runtime-tools-management-console-webapp/src/tasks/components/FormNotification.tsx
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-import React, { useState } from "react";
-import { Alert, AlertActionCloseButton, AlertActionLink } from "@patternfly/react-core/dist/js/components/Alert";
-
-export interface Notification {
- type: "success" | "error";
- message: string;
- details?: string;
- customAction?: Action;
- close: () => void;
-}
-
-export interface Action {
- label: string;
- onClick: () => void;
-}
-
-interface Props {
- notification: Notification;
-}
-
-export const FormNotification: React.FC<Props> = ({ notification }) => {
- const [showDetails, setShowDetails] = useState<boolean>(false);
-
- return (
- <Alert
- isInline
- title={notification.message}
- variant={notification.type === "error" ? "danger" : "success"}
- actionLinks={
- <React.Fragment>
- {notification.details && (
- <AlertActionLink onClick={() => setShowDetails((currentValue) => !currentValue)}>
- View details
- </AlertActionLink>
- )}
- {notification.customAction && (
- <AlertActionLink onClick={notification.customAction.onClick}>
- {notification.customAction.label}
- </AlertActionLink>
- )}
- </React.Fragment>
- }
- actionClose={<AlertActionCloseButton onClose={notification.close} />}
- >
- {showDetails && notification.details && <p>{notification.details}</p>}
- </Alert>
- );
-};
diff --git a/packages/runtime-tools-management-console-webapp/src/tasks/components/index.ts b/packages/runtime-tools-management-console-webapp/src/tasks/components/index.ts
index fb43cd55938..f2ba3a32d44 100644
--- a/packages/runtime-tools-management-console-webapp/src/tasks/components/index.ts
+++ b/packages/runtime-tools-management-console-webapp/src/tasks/components/index.ts
@@ -16,4 +16,4 @@
* specific language governing permissions and limitations
* under the License.
*/
-export * from "./FormNotification";
+export * from "./ImpersonationPageSection";
diff --git a/packages/runtime-tools-management-console-webapp/src/utils/QueryUtils.ts b/packages/runtime-tools-management-console-webapp/src/utils/QueryUtils.ts
deleted file mode 100644
index 6f9313faa35..00000000000
--- a/packages/runtime-tools-management-console-webapp/src/utils/QueryUtils.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import { ProcessInstanceFilter } from "@kie-tools/runtime-tools-process-gateway-api/dist/types";
-
-const formatSearchWords = (searchWords: string[]) => {
- const tempSearchWordsArray: { businessKey: { like: string } }[] = [];
- searchWords.forEach((word) => {
- tempSearchWordsArray.push({ businessKey: { like: word } });
- });
- return tempSearchWordsArray;
-};
-
-export const buildProcessListWhereArgument = (filters: ProcessInstanceFilter) => {
- if (filters.businessKey!.length === 0) {
- return {
- parentProcessInstanceId: { isNull: true },
- state: { in: filters.status },
- };
- } else {
- return {
- parentProcessInstanceId: { isNull: true },
- state: { in: filters.status },
- or: formatSearchWords(filters.businessKey!),
- };
- }
-};
diff --git a/packages/runtime-tools-management-console-webapp/static/resources/form-displayer.html b/packages/runtime-tools-management-console-webapp/static/resources/form-displayer.html
index 3d03001a2ab..ba14c33c0fe 100644
--- a/packages/runtime-tools-management-console-webapp/static/resources/form-displayer.html
+++ b/packages/runtime-tools-management-console-webapp/static/resources/form-displayer.html
@@ -26,9 +26,8 @@
margin: 0;
border: 0;
padding: 0;
- overflow: hidden;
- height: 100%;
width: 100%;
+ height: auto !important;
font-family: "Open Sans", Helvetica, Arial, sans-serif;
}
</style>
@@ -38,11 +37,11 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
- <body style="overflow-y: auto">
+ <body>
<div id="displayer-app"></div>
<script>
var exports = {};
</script>
- <script src="./form-displayer-envelope.js"></script>
+ <script src="/resources/form-displayer-envelope.js"></script>
</body>
</html>
diff --git a/packages/runtime-tools-management-console-webapp/tsconfig.json b/packages/runtime-tools-management-console-webapp/tsconfig.json
index 09268aca3ee..0f3d3875af4 100644
--- a/packages/runtime-tools-management-console-webapp/tsconfig.json
+++ b/packages/runtime-tools-management-console-webapp/tsconfig.json
@@ -2,9 +2,8 @@
"extends": "@kie-tools/tsconfig/tsconfig.esm.json",
"compilerOptions": {
"esModuleInterop": true,
- "declaration": false,
- "declarationMap": false,
- "jsx": "react-jsx"
+ "jsx": "react-jsx",
+ "noImplicitAny": false
},
"preserveSymlinks": true
}
diff --git a/packages/runtime-tools-process-dev-ui-webapp/package.json b/packages/runtime-tools-process-dev-ui-webapp/package.json
index f0bc8787b4d..39e1a93be2c 100644
--- a/packages/runtime-tools-process-dev-ui-webapp/package.json
+++ b/packages/runtime-tools-process-dev-ui-webapp/package.json
@@ -33,7 +33,6 @@
"@kie-tools/runtime-tools-process-enveloped-components": "workspace:*",
"@kie-tools/runtime-tools-process-gateway-api": "workspace:*",
"@kie-tools/runtime-tools-process-webapp-components": "workspace:*",
- "@kie-tools/runtime-tools-shared-enveloped-components": "workspace:*",
"@kie-tools/runtime-tools-shared-gateway-api": "workspace:*",
"@kie-tools/runtime-tools-shared-webapp-components": "workspace:*",
"@patternfly/patternfly": "^5.4.1",
diff --git a/packages/runtime-tools-process-dev-ui-webapp/resources/form-displayer.html b/packages/runtime-tools-process-dev-ui-webapp/resources/form-displayer.html
index cd9a0eddbe7..ab6feedc6fb 100644
--- a/packages/runtime-tools-process-dev-ui-webapp/resources/form-displayer.html
+++ b/packages/runtime-tools-process-dev-ui-webapp/resources/form-displayer.html
@@ -27,10 +27,14 @@
border: 0;
padding: 0;
overflow: hidden;
- height: 100%;
width: 100%;
font-family: "Open Sans", Helvetica, Arial, sans-serif;
}
+
+ body,
+ html {
+ height: auto !important;
+ }
</style>
<title></title>
@@ -38,7 +42,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
- <body style="overflow-y: auto">
+ <body>
<div id="displayer-app"></div>
<script>
var exports = {};
diff --git a/packages/runtime-tools-process-dev-ui-webapp/src/channel/FormDetails/FormDetailsGatewayApi.ts b/packages/runtime-tools-process-dev-ui-webapp/src/channel/FormDetails/FormDetailsChannelApiImpl.ts
similarity index 71%
rename from packages/runtime-tools-process-dev-ui-webapp/src/channel/FormDetails/FormDetailsGatewayApi.ts
rename to packages/runtime-tools-process-dev-ui-webapp/src/channel/FormDetails/FormDetailsChannelApiImpl.ts
index 7701f65d363..783cbbac2c0 100755
--- a/packages/runtime-tools-process-dev-ui-webapp/src/channel/FormDetails/FormDetailsGatewayApi.ts
+++ b/packages/runtime-tools-process-dev-ui-webapp/src/channel/FormDetails/FormDetailsChannelApiImpl.ts
@@ -19,20 +19,15 @@
import { Form, FormContent } from "@kie-tools/runtime-tools-shared-gateway-api/dist/types";
import { getFormContent, saveFormContent } from "@kie-tools/runtime-tools-process-gateway-api/dist/gatewayApi";
+import { FormDetailsChannelApi } from "@kie-tools/runtime-tools-process-enveloped-components/dist/formDetails";
-export interface FormDetailsGatewayApi {
- getFormContent: (formName: string) => Promise<Form>;
- saveFormContent: (formName: string, content: FormContent) => Promise<void>;
-}
-
-export class FormDetailsGatewayApiImpl implements FormDetailsGatewayApi {
+export class FormDetailsChannelApiImpl implements FormDetailsChannelApi {
constructor(private baseUrl: string) {}
- getFormContent(formName: string): Promise<Form> {
+ formDetails__getFormContent(formName: string): Promise<Form> {
return getFormContent(this.baseUrl, formName);
}
-
- saveFormContent(formName: string, content: FormContent): Promise<void> {
- return saveFormContent(this.baseUrl, formName, content);
+ formDetails__saveFormContent(formName: string, formContent: FormContent): Promise<void> {
+ return saveFormContent(this.baseUrl, formName, formContent);
}
}
diff --git a/packages/runtime-tools-process-dev-ui-webapp/src/channel/FormDetails/FormDetailsContext.ts b/packages/runtime-tools-process-dev-ui-webapp/src/channel/FormDetails/FormDetailsContext.ts
index 6bfc7f0da77..8e838408b79 100644
--- a/packages/runtime-tools-process-dev-ui-webapp/src/channel/FormDetails/FormDetailsContext.ts
+++ b/packages/runtime-tools-process-dev-ui-webapp/src/channel/FormDetails/FormDetailsContext.ts
@@ -17,11 +17,11 @@
* under the License.
*/
import React, { useContext } from "react";
-import { FormDetailsGatewayApi } from "./FormDetailsGatewayApi";
+import { FormDetailsChannelApi } from "@kie-tools/runtime-tools-process-enveloped-components/dist/formDetails";
-const FormDetailsContext = React.createContext<FormDetailsGatewayApi>(null);
+const FormDetailsContext = React.createContext<FormDetailsChannelApi>(null);
-export const useFormDetailsGatewayApi = (): FormDetailsGatewayApi =>
- useContext<FormDetailsGatewayApi>(FormDetailsContext);
+export const useFormDetailsChannelApi = (): FormDetailsChannelApi =>
+ useContext<FormDetailsChannelApi>(FormDetailsContext);
export default FormDetailsContext;
diff --git a/packages/runtime-tools-process-dev-ui-webapp/src/channel/FormDetails/FormDetailsContextProvider.tsx b/packages/runtime-tools-process-dev-ui-webapp/src/channel/FormDetails/FormDetailsContextProvider.tsx
index d477def78f5..a734bc8513e 100755
--- a/packages/runtime-tools-process-dev-ui-webapp/src/channel/FormDetails/FormDetailsContextProvider.tsx
+++ b/packages/runtime-tools-process-dev-ui-webapp/src/channel/FormDetails/FormDetailsContextProvider.tsx
@@ -16,22 +16,25 @@
* specific language governing permissions and limitations
* under the License.
*/
-import React from "react";
+import React, { useMemo } from "react";
import FormDetailsContext from "./FormDetailsContext";
-import { FormDetailsGatewayApiImpl } from "./FormDetailsGatewayApi";
import { useDevUIAppContext } from "../../components/contexts/DevUIAppContext";
+import { FormDetailsChannelApiImpl } from "./FormDetailsChannelApiImpl";
-interface IOwnProps {
+interface Props {
children;
}
-const FormDetailsContextProvider: React.FC<IOwnProps> = ({ children }) => {
+const FormDetailsContextProvider: React.FC<Props> = ({ children }) => {
const appContext = useDevUIAppContext();
- const baseUrl = appContext.transformEndpointBaseUrl(
- `${appContext.getQuarkusAppOrigin()}${appContext.getQuarkusAppRootPath()}`
+ const baseUrl = useMemo(
+ () =>
+ appContext.transformEndpointBaseUrl(`${appContext.getQuarkusAppOrigin()}${appContext.getQuarkusAppRootPath()}`),
+ [appContext]
);
+
return (
- <FormDetailsContext.Provider value={new FormDetailsGatewayApiImpl(baseUrl)}>{children}</FormDetailsContext.Provider>
+ <FormDetailsContext.Provider value={new FormDetailsChannelApiImpl(baseUrl)}>{children}</FormDetailsContext.Provider>
);
};
diff --git a/packages/runtime-tools-process-dev-ui-webapp/src/channel/FormDetails/index.ts b/packages/runtime-tools-process-dev-ui-webapp/src/channel/FormDetails/index.ts
index fb666cd1092..0b9018bef00 100644
--- a/packages/runtime-tools-process-dev-ui-webapp/src/channel/FormDetails/index.ts
+++ b/packages/runtime-tools-process-dev-ui-webapp/src/channel/FormDetails/index.ts
@@ -16,5 +16,5 @@
* specific language governing permissions and limitations
* under the License.
*/
-export { FormDetailsGatewayApi } from "./FormDetailsGatewayApi";
+export * from "./FormDetailsChannelApiImpl";
export * from "./FormDetailsContext";
diff --git a/packages/runtime-tools-process-dev-ui-webapp/src/channel/FormsList/FormsListGatewayApi.ts b/packages/runtime-tools-process-dev-ui-webapp/src/channel/FormsList/FormsListChannelApiImpl.ts
similarity index 55%
rename from packages/runtime-tools-process-dev-ui-webapp/src/channel/FormsList/FormsListGatewayApi.ts
rename to packages/runtime-tools-process-dev-ui-webapp/src/channel/FormsList/FormsListChannelApiImpl.ts
index 018cf166ebd..b947723e019 100755
--- a/packages/runtime-tools-process-dev-ui-webapp/src/channel/FormsList/FormsListGatewayApi.ts
+++ b/packages/runtime-tools-process-dev-ui-webapp/src/channel/FormsList/FormsListChannelApiImpl.ts
@@ -18,52 +18,39 @@
*/
import { FormInfo } from "@kie-tools/runtime-tools-shared-gateway-api/dist/types";
-import { FormFilter } from "@kie-tools/runtime-tools-shared-enveloped-components/dist/formsList";
+import {
+ FormFilter,
+ FormsListChannelApi,
+ OnOpenFormListener,
+ UnSubscribeHandler,
+} from "@kie-tools/runtime-tools-process-enveloped-components/dist/formsList";
import { getForms } from "@kie-tools/runtime-tools-process-gateway-api/dist/gatewayApi";
-export interface FormsListGatewayApi {
- getFormFilter(): Promise<FormFilter>;
- applyFilter(formList: FormFilter): Promise<void>;
- getFormsQuery(): Promise<FormInfo[]>;
- openForm: (formData: FormInfo) => Promise<void>;
- onOpenFormListen: (listener: OnOpenFormListener) => UnSubscribeHandler;
-}
-
-export interface OnOpenFormListener {
- onOpen: (formData: FormInfo) => void;
-}
-
-export interface UnSubscribeHandler {
- unSubscribe: () => void;
-}
-
-export class FormsListGatewayApiImpl implements FormsListGatewayApi {
- constructor(private baseUrl: string) {}
-
- private _FormFilter: FormFilter = {
+export class FormsListChannelApiImpl implements FormsListChannelApi {
+ private _formFilter: FormFilter = {
formNames: [],
};
private readonly listeners: OnOpenFormListener[] = [];
- getFormFilter = (): Promise<FormFilter> => {
- return Promise.resolve(this._FormFilter);
- };
+ constructor(private baseUrl: string) {}
- applyFilter = (formFilter: FormFilter): Promise<void> => {
- this._FormFilter = formFilter;
- return Promise.resolve();
- };
+ formsList__getFormFilter(): Promise<FormFilter> {
+ return Promise.resolve(this._formFilter);
+ }
+
+ formsList__applyFilter(formFilter: FormFilter): void {
+ this._formFilter = formFilter;
+ }
- getFormsQuery(): Promise<FormInfo[]> {
- return getForms(this.baseUrl, this._FormFilter.formNames);
+ formsList__getFormsQuery(): Promise<FormInfo[]> {
+ return getForms(this.baseUrl, this._formFilter.formNames);
}
- openForm = (formData: FormInfo): Promise<void> => {
+ formsList__openForm(formData: FormInfo): void {
this.listeners.forEach((listener) => listener.onOpen(formData));
- return Promise.resolve();
- };
+ }
- onOpenFormListen(listener: OnOpenFormListener): UnSubscribeHandler {
+ formsList__onOpenFormListen(listener: OnOpenFormListener): Promise<UnSubscribeHandler> {
this.listeners.push(listener);
const unSubscribe = () => {
@@ -73,8 +60,8 @@ export class FormsListGatewayApiImpl implements FormsListGatewayApi {
}
};
- return {
+ return Promise.resolve({
unSubscribe,
- };
+ });
}
}
diff --git a/packages/runtime-tools-process-dev-ui-webapp/src/channel/FormsList/FormsListContext.ts b/packages/runtime-tools-process-dev-ui-webapp/src/channel/FormsList/FormsListContext.ts
index af8c037c11c..2c73b02e860 100644
--- a/packages/runtime-tools-process-dev-ui-webapp/src/channel/FormsList/FormsListContext.ts
+++ b/packages/runtime-tools-process-dev-ui-webapp/src/channel/FormsList/FormsListContext.ts
@@ -17,10 +17,8 @@
* under the License.
*/
import React, { useContext } from "react";
-import { FormsListGatewayApi } from "./FormsListGatewayApi";
+import { FormsListChannelApi } from "@kie-tools/runtime-tools-process-enveloped-components/dist/formsList";
-const FormsListContext = React.createContext<FormsListGatewayApi>(null);
+export const FormsListContext = React.createContext<FormsListChannelApi>(null);
-export const useFormsListGatewayApi = (): FormsListGatewayApi => useContext<FormsListGatewayApi>(FormsListContext);
-
-export default FormsListContext;
+export const useFormsListChannelApi = (): FormsListChannelApi => useContext<FormsListChannelApi>(FormsListContext);
diff --git a/packages/runtime-tools-process-dev-ui-webapp/src/channel/FormsList/FormsListContextProvider.tsx b/packages/runtime-tools-process-dev-ui-webapp/src/channel/FormsList/FormsListContextProvider.tsx
index 53c7011d193..f5164f3fded 100755
--- a/packages/runtime-tools-process-dev-ui-webapp/src/channel/FormsList/FormsListContextProvider.tsx
+++ b/packages/runtime-tools-process-dev-ui-webapp/src/channel/FormsList/FormsListContextProvider.tsx
@@ -17,21 +17,19 @@
* under the License.
*/
import React from "react";
-import FormsListContext from "./FormsListContext";
-import { FormsListGatewayApiImpl } from "./FormsListGatewayApi";
+import { FormsListContext } from "./FormsListContext";
+import { FormsListChannelApiImpl } from "./FormsListChannelApiImpl";
import { useDevUIAppContext } from "../../components/contexts/DevUIAppContext";
interface FormsListContextProviderProps {
children;
}
-const FormsListContextProvider: React.FC<FormsListContextProviderProps> = ({ children }) => {
+export const FormsListContextProvider: React.FC<FormsListContextProviderProps> = ({ children }) => {
const appContext = useDevUIAppContext();
const baseUrl = appContext.transformEndpointBaseUrl(
`${appContext.getQuarkusAppOrigin()}${appContext.getQuarkusAppRootPath()}`
);
- return <FormsListContext.Provider value={new FormsListGatewayApiImpl(baseUrl)}>{children}</FormsListContext.Provider>;
+ return <FormsListContext.Provider value={new FormsListChannelApiImpl(baseUrl)}>{children}</FormsListContext.Provider>;
};
-
-export default FormsListContextProvider;
diff --git a/packages/runtime-tools-process-dev-ui-webapp/src/channel/FormsList/index.ts b/packages/runtime-tools-process-dev-ui-webapp/src/channel/FormsList/index.ts
index 09116d4202e..d04067ce168 100644
--- a/packages/runtime-tools-process-dev-ui-webapp/src/channel/FormsList/index.ts
+++ b/packages/runtime-tools-process-dev-ui-webapp/src/channel/FormsList/index.ts
@@ -16,6 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
-export { FormsListGatewayApi } from "./FormsListGatewayApi";
export * from "./FormsListContext";
-export { default as FormsListContextProvider } from "./FormsListContextProvider";
+export * from "./FormsListContextProvider";
+export * from "./FormsListChannelApiImpl";
diff --git a/packages/runtime-tools-process-dev-ui-webapp/src/channel/ProcessDefinitionList/ProcessDefinitionListGatewayApi.ts b/packages/runtime-tools-process-dev-ui-webapp/src/channel/ProcessDefinitionList/ProcessDefinitionListGatewayApi.ts
deleted file mode 100644
index 09fa21a432c..00000000000
--- a/packages/runtime-tools-process-dev-ui-webapp/src/channel/ProcessDefinitionList/ProcessDefinitionListGatewayApi.ts
+++ /dev/null
@@ -1,107 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import { ProcessDefinition } from "@kie-tools/runtime-tools-process-gateway-api/dist/types";
-import { ProcessDefinitionListQueries } from "./ProcessDefinitionListQueries";
-
-export interface ProcessDefinitionListGatewayApi {
- getProcessDefinitionFilter: () => Promise<string[]>;
- setProcessDefinitionFilter: (filter: string[]) => Promise<void>;
- getProcessDefinitionsQuery: () => Promise<ProcessDefinition[]>;
- openProcessForm: (processDefinition: ProcessDefinition) => Promise<void>;
- openTriggerCloudEvent: () => void;
- onOpenProcessFormListen: (listener: OnOpenProcessFormListener) => UnSubscribeHandler;
- onOpenTriggerCloudEventListen: (listener: OnOpenTriggerCloudEventListener) => UnSubscribeHandler;
-}
-
-export interface OnOpenProcessFormListener {
- onOpen: (processDefinition: ProcessDefinition) => void;
-}
-
-export interface OnOpenTriggerCloudEventListener {
- onOpen: () => void;
-}
-
-export interface UnSubscribeHandler {
- unSubscribe: () => void;
-}
-
-export class ProcessDefinitionListGatewayApiImpl implements ProcessDefinitionListGatewayApi {
- private readonly onOpenProcessListeners: OnOpenProcessFormListener[] = [];
- private readonly onOpenTriggerCloudEventListeners: OnOpenTriggerCloudEventListener[] = [];
-
- private readonly queries: ProcessDefinitionListQueries;
- private processDefinitionFilter: string[] = [];
-
- constructor(queries: ProcessDefinitionListQueries) {
- this.queries = queries;
- }
-
- getProcessDefinitionFilter(): Promise<string[]> {
- return Promise.resolve(this.processDefinitionFilter);
- }
-
- setProcessDefinitionFilter(filter: string[]): Promise<void> {
- this.processDefinitionFilter = filter;
- return Promise.resolve();
- }
-
- openProcessForm(processDefinition: ProcessDefinition): Promise<void> {
- this.onOpenProcessListeners.forEach((listener) => listener.onOpen(processDefinition));
- return Promise.resolve();
- }
-
- onOpenProcessFormListen(listener: OnOpenProcessFormListener): UnSubscribeHandler {
- this.onOpenProcessListeners.push(listener);
-
- const unSubscribe = () => {
- const index = this.onOpenProcessListeners.indexOf(listener);
- if (index > -1) {
- this.onOpenProcessListeners.splice(index, 1);
- }
- };
-
- return {
- unSubscribe,
- };
- }
-
- onOpenTriggerCloudEventListen(listener: OnOpenTriggerCloudEventListener): UnSubscribeHandler {
- this.onOpenTriggerCloudEventListeners.push(listener);
-
- const unSubscribe = () => {
- const index = this.onOpenTriggerCloudEventListeners.indexOf(listener);
- if (index > -1) {
- this.onOpenTriggerCloudEventListeners.splice(index, 1);
- }
- };
-
- return {
- unSubscribe,
- };
- }
-
- getProcessDefinitionsQuery(): Promise<ProcessDefinition[]> {
- return this.queries.getProcessDefinitions();
- }
-
- openTriggerCloudEvent(): void {
- this.onOpenTriggerCloudEventListeners.forEach((listener) => listener.onOpen());
- }
-}
diff --git a/packages/runtime-tools-process-dev-ui-webapp/src/channel/ProcessDefinitionList/ProcessDefinitionListQueries.ts b/packages/runtime-tools-process-dev-ui-webapp/src/channel/ProcessDefinitionList/ProcessDefinitionListQueries.ts
deleted file mode 100644
index e13cc897827..00000000000
--- a/packages/runtime-tools-process-dev-ui-webapp/src/channel/ProcessDefinitionList/ProcessDefinitionListQueries.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-import { ApolloClient } from "apollo-client";
-import { ProcessDefinition } from "@kie-tools/runtime-tools-process-gateway-api/dist/types";
-import { getProcessDefinitions } from "@kie-tools/runtime-tools-process-gateway-api/dist/gatewayApi";
-
-export interface ProcessDefinitionListQueries {
- getProcessDefinitions(): Promise<ProcessDefinition[]>;
-}
-
-export class GraphQLProcessDefinitionListQueries implements ProcessDefinitionListQueries {
- constructor(
- private readonly client: ApolloClient<any>,
- private readonly options?: { transformEndpointBaseUrl?: (url?: string) => string }
- ) {
- this.client = client;
- }
-
- getProcessDefinitions(): Promise<ProcessDefinition[]> {
- return getProcessDefinitions(this.client).then((processDefinitions) =>
- processDefinitions.map((definition) => ({
- ...definition,
- endpoint: this.options?.transformEndpointBaseUrl?.(definition.endpoint) ?? definition.endpoint,
- }))
- );
- }
-}
diff --git a/packages/runtime-tools-process-dev-ui-webapp/src/channel/ProcessDefinitionList/index.ts b/packages/runtime-tools-process-dev-ui-webapp/src/channel/ProcessDefinitionList/index.ts
deleted file mode 100644
index a2774952cb3..00000000000
--- a/packages/runtime-tools-process-dev-ui-webapp/src/channel/ProcessDefinitionList/index.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-export { ProcessDefinitionListGatewayApi } from "./ProcessDefinitionListGatewayApi";
-export * from "./ProcessDefinitionListContext";
-export { default as ProcessDefinitionListContextProvider } from "./ProcessDefinitionListContextProvider";
diff --git a/packages/runtime-tools-process-dev-ui-webapp/src/channel/ProcessForm/ProcessFormGatewayApi.ts b/packages/runtime-tools-process-dev-ui-webapp/src/channel/ProcessForm/ProcessFormGatewayApi.ts
deleted file mode 100644
index 4cfd6d1ce96..00000000000
--- a/packages/runtime-tools-process-dev-ui-webapp/src/channel/ProcessForm/ProcessFormGatewayApi.ts
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import {
- getCustomForm,
- getProcessSchema,
- startProcessInstance,
-} from "@kie-tools/runtime-tools-process-gateway-api/dist/gatewayApi";
-import { ProcessDefinition } from "@kie-tools/runtime-tools-process-gateway-api/dist/types";
-import { Form } from "@kie-tools/runtime-tools-shared-gateway-api/dist/types";
-
-export interface ProcessFormGatewayApi {
- getProcessFormSchema(processDefinitionData: ProcessDefinition): Promise<any>;
- getCustomForm(processDefinitionData: ProcessDefinition): Promise<Form>;
- startProcess(formData: any, processDefinitionData: ProcessDefinition): Promise<string>;
- setBusinessKey(bk: string): void;
- getBusinessKey(): string;
-}
-
-export class ProcessFormGatewayApiImpl implements ProcessFormGatewayApi {
- private businessKey: string;
- constructor() {
- this.businessKey = "";
- }
-
- setBusinessKey(bk: string): void {
- this.businessKey = bk;
- }
-
- getBusinessKey(): string {
- return this.businessKey;
- }
-
- getProcessFormSchema(processDefinitionData: ProcessDefinition): Promise<Record<string, any>> {
- return getProcessSchema(processDefinitionData);
- }
-
- getCustomForm(processDefinitionData: ProcessDefinition): Promise<Form> {
- return getCustomForm(processDefinitionData);
- }
-
- startProcess(formData: any, processDefinitionData: ProcessDefinition): Promise<string> {
- return startProcessInstance(formData, this.businessKey, processDefinitionData);
- }
-}
diff --git a/packages/runtime-tools-process-dev-ui-webapp/src/components/DevUI/DevUILayout/DevUILayout.tsx b/packages/runtime-tools-process-dev-ui-webapp/src/components/DevUI/DevUILayout/DevUILayout.tsx
index e457000a14a..f8473862ecc 100755
--- a/packages/runtime-tools-process-dev-ui-webapp/src/components/DevUI/DevUILayout/DevUILayout.tsx
+++ b/packages/runtime-tools-process-dev-ui-webapp/src/components/DevUI/DevUILayout/DevUILayout.tsx
@@ -22,18 +22,18 @@ import { ApolloProvider } from "react-apollo";
import { ApolloClient } from "apollo-client";
import { MemoryRouter } from "react-router";
import DevUINav from "../DevUINav/DevUINav";
-import FormsListContextProvider from "../../../channel/FormsList/FormsListContextProvider";
+import { FormsListContextProvider } from "../../../channel/FormsList/FormsListContextProvider";
import FormDetailsContextProvider from "../../../channel/FormDetails/FormDetailsContextProvider";
import DevUIAppContextProvider from "../../contexts/DevUIAppContextProvider";
-import ProcessFormContextProvider from "../../../channel/ProcessForm/ProcessFormContextProvider";
+import ProcessContextProvider from "../../contexts/ProcessContextProvider";
import { CustomLabels } from "../../../api/CustomLabels";
import { User } from "@kie-tools/runtime-tools-process-enveloped-components/dist/taskForm";
import { DiagramPreviewSize } from "@kie-tools/runtime-tools-process-enveloped-components/dist/processDetails";
import { PageLayout } from "@kie-tools/runtime-tools-components/dist/components/PageLayout";
import { JobsManagementContextProvider } from "@kie-tools/runtime-tools-process-webapp-components/dist/JobsManagement";
import { TaskFormContextProvider } from "../../contexts/TaskFormContextProvider";
-import { TaskInboxContextProvider } from "../../contexts/TaskInboxContextProvider";
-import ProcessContextProvider from "../../contexts/ProcessContextProvider";
+import { TaskListContextProvider } from "../../contexts/TaskListContextProvider";
+import { ProcessFormContextProvider } from "@kie-tools/runtime-tools-process-webapp-components/dist/ProcessForm/ProcessFormContextProvider";
interface IOwnProps {
apolloClient: ApolloClient<any>;
@@ -89,7 +89,7 @@ const DevUILayout: React.FC<IOwnProps> = ({
omittedProcessTimelineEvents={omittedProcessTimelineEvents}
diagramPreviewSize={diagramPreviewSize}
>
- <TaskInboxContextProvider apolloClient={apolloClient}>
+ <TaskListContextProvider apolloClient={apolloClient}>
<TaskFormContextProvider>
<ProcessContextProvider apolloClient={apolloClient}>
<JobsManagementContextProvider apolloClient={apolloClient}>
@@ -107,7 +107,7 @@ const DevUILayout: React.FC<IOwnProps> = ({
</JobsManagementContextProvider>
</ProcessContextProvider>
</TaskFormContextProvider>
- </TaskInboxContextProvider>
+ </TaskListContextProvider>
</DevUIAppContextProvider>
</ApolloProvider>
);
diff --git a/packages/runtime-tools-process-dev-ui-webapp/src/components/DevUI/DevUIRoutes/DevUIRoutes.tsx b/packages/runtime-tools-process-dev-ui-webapp/src/components/DevUI/DevUIRoutes/DevUIRoutes.tsx
index 996749734a3..4c8550f9713 100755
--- a/packages/runtime-tools-process-dev-ui-webapp/src/components/DevUI/DevUIRoutes/DevUIRoutes.tsx
+++ b/packages/runtime-tools-process-dev-ui-webapp/src/components/DevUI/DevUIRoutes/DevUIRoutes.tsx
@@ -20,7 +20,7 @@ import React, { useMemo } from "react";
import { Redirect, Route, Switch } from "react-router-dom";
import { JobsManagementPage, ProcessesPage } from "../../pages";
import ProcessDetailsPage from "../../pages/ProcessDetailsPage/ProcessDetailsPage";
-import TaskInboxPage from "../../pages/TaskInboxPage/TaskInboxPage";
+import TaskListPage from "../../pages/TaskListPage/TaskListPage";
import TaskDetailsPage from "../../pages/TaskDetailsPage/TaskDetailsPage";
import FormsListPage from "../../pages/FormsListPage/FormsListPage";
import FormDetailPage from "../../pages/FormDetailsPage/FormDetailsPage";
@@ -62,7 +62,7 @@ const DevUIRoutes: React.FC<IOwnProps> = ({ navigate }) => {
},
{
enabled: () => context.isProcessEnabled,
- node: <Route key="4" exact path="/Tasks" component={TaskInboxPage} />,
+ node: <Route key="4" exact path="/Tasks" component={TaskListPage} />,
},
{
enabled: () => context.isProcessEnabled,
diff --git a/packages/runtime-tools-process-dev-ui-webapp/src/components/containers/FormDetailsContainer/FormDetailsContainer.tsx b/packages/runtime-tools-process-dev-ui-webapp/src/components/containers/FormDetailsContainer/FormDetailsContainer.tsx
index ddce7134365..70dc9a2693f 100755
--- a/packages/runtime-tools-process-dev-ui-webapp/src/components/containers/FormDetailsContainer/FormDetailsContainer.tsx
+++ b/packages/runtime-tools-process-dev-ui-webapp/src/components/containers/FormDetailsContainer/FormDetailsContainer.tsx
@@ -16,12 +16,13 @@
* specific language governing permissions and limitations
* under the License.
*/
-import React from "react";
-import { FormDetailsGatewayApi } from "../../../channel/FormDetails";
-import { useFormDetailsGatewayApi } from "../../../channel/FormDetails/FormDetailsContext";
-import { Form, FormInfo, FormContent } from "@kie-tools/runtime-tools-shared-gateway-api/dist/types";
-import { OUIAProps, componentOuiaProps } from "@kie-tools/runtime-tools-components/dist/ouiaTools";
-import { EmbeddedFormDetails } from "@kie-tools/runtime-tools-shared-enveloped-components/dist/formDetails";
+import React, { useMemo } from "react";
+import { FormInfo, FormContent } from "@kie-tools/runtime-tools-shared-gateway-api/dist/types";
+import {
+ EmbeddedFormDetails,
+ FormDetailsChannelApi,
+} from "@kie-tools/runtime-tools-process-enveloped-components/dist/formDetails";
+import { useFormDetailsChannelApi } from "../../../channel/FormDetails";
interface FormDetailsContainerProps {
formData: FormInfo;
@@ -29,37 +30,28 @@ interface FormDetailsContainerProps {
onError: (details?: string) => void;
targetOrigin: string;
}
-const FormDetailsContainer: React.FC<FormDetailsContainerProps & OUIAProps> = ({
- formData,
- onSuccess,
- onError,
- ouiaId,
- ouiaSafe,
- targetOrigin,
-}) => {
- const gatewayApi: FormDetailsGatewayApi = useFormDetailsGatewayApi();
+const FormDetailsContainer: React.FC<FormDetailsContainerProps> = ({ formData, onSuccess, onError, targetOrigin }) => {
+ const channelApi = useFormDetailsChannelApi();
- return (
- <EmbeddedFormDetails
- {...componentOuiaProps(ouiaId, "form-details-container", ouiaSafe)}
- driver={{
- getFormContent: function (formName: string): Promise<Form> {
- return gatewayApi.getFormContent(formName);
- },
- saveFormContent(formName: string, content: FormContent): void {
- gatewayApi
- .saveFormContent(formName, content)
- .then((value) => onSuccess())
- .catch((error) => {
- const message = error.response ? error.response.data : error.message;
- onError(message);
- });
- },
- }}
- targetOrigin={targetOrigin}
- formData={formData}
- />
+ const extendedChannelApi: FormDetailsChannelApi = useMemo(
+ () => ({
+ formDetails__getFormContent: function (formName: string) {
+ return channelApi.formDetails__getFormContent(formName);
+ },
+ formDetails__saveFormContent(formName: string, formContent: FormContent) {
+ return channelApi
+ .formDetails__saveFormContent(formName, formContent)
+ .then(() => onSuccess())
+ .catch((error) => {
+ const message = error.response ? error.response.data : error.message;
+ onError(message);
+ });
+ },
+ }),
+ [channelApi, onError, onSuccess]
);
+
+ return <EmbeddedFormDetails channelApi={extendedChannelApi} targetOrigin={targetOrigin} formData={formData} />;
};
export default FormDetailsContainer;
diff --git a/packages/runtime-tools-process-dev-ui-webapp/src/components/containers/FormsListContainer/FormsListContainer.tsx b/packages/runtime-tools-process-dev-ui-webapp/src/components/containers/FormsListContainer/FormsListContainer.tsx
index f0524c78d43..f17c17be22a 100644
--- a/packages/runtime-tools-process-dev-ui-webapp/src/components/containers/FormsListContainer/FormsListContainer.tsx
+++ b/packages/runtime-tools-process-dev-ui-webapp/src/components/containers/FormsListContainer/FormsListContainer.tsx
@@ -17,37 +17,35 @@
* under the License.
*/
import React, { useEffect } from "react";
-import { FormsListGatewayApi } from "../../../channel/FormsList";
-import { useFormsListGatewayApi } from "../../../channel/FormsList/FormsListContext";
import { useHistory } from "react-router-dom";
import { useDevUIAppContext } from "../../contexts/DevUIAppContext";
-import { OUIAProps } from "@kie-tools/runtime-tools-components/dist/ouiaTools";
import { FormInfo } from "@kie-tools/runtime-tools-shared-gateway-api/dist/types";
-import { EmbeddedFormsList } from "@kie-tools/runtime-tools-shared-enveloped-components/dist/formsList";
+import { EmbeddedFormsList } from "@kie-tools/runtime-tools-process-enveloped-components/dist/formsList";
+import { useFormsListChannelApi } from "../../../channel/FormsList";
-const FormsListContainer: React.FC<OUIAProps> = () => {
+const FormsListContainer: React.FC = () => {
const history = useHistory();
- const gatewayApi: FormsListGatewayApi = useFormsListGatewayApi();
+ const channelApi = useFormsListChannelApi();
const appContext = useDevUIAppContext();
useEffect(() => {
- const unsubscriber = gatewayApi.onOpenFormListen({
+ const unsubscriber = channelApi.formsList__onOpenFormListen({
onOpen(formData: FormInfo) {
history.push({
pathname: `/Forms/${formData.name}`,
state: {
- filter: gatewayApi.getFormFilter(),
+ filter: channelApi.formsList__getFormFilter(),
formData: formData,
},
});
},
});
return () => {
- unsubscriber.unSubscribe();
+ unsubscriber.then((unsubscribeHandler) => unsubscribeHandler.unSubscribe());
};
- }, []);
+ }, [channelApi, history]);
- return <EmbeddedFormsList driver={gatewayApi} targetOrigin={appContext.getDevUIUrl()} />;
+ return <EmbeddedFormsList channelApi={channelApi} targetOrigin={appContext.getDevUIUrl()} />;
};
export default FormsListContainer;
diff --git a/packages/runtime-tools-process-dev-ui-webapp/src/components/containers/JobsManagementContainer/JobsManagementContainer.tsx b/packages/runtime-tools-process-dev-ui-webapp/src/components/containers/JobsManagementContainer/JobsManagementContainer.tsx
index a15674fb8ca..2bb232247d2 100644
--- a/packages/runtime-tools-process-dev-ui-webapp/src/components/containers/JobsManagementContainer/JobsManagementContainer.tsx
+++ b/packages/runtime-tools-process-dev-ui-webapp/src/components/containers/JobsManagementContainer/JobsManagementContainer.tsx
@@ -18,23 +18,13 @@
*/
import React from "react";
import { useDevUIAppContext } from "../../contexts/DevUIAppContext";
-import { OUIAProps, componentOuiaProps } from "@kie-tools/runtime-tools-components/dist/ouiaTools";
-import {
- JobsManagementGatewayApi,
- useJobsManagementGatewayApi,
-} from "@kie-tools/runtime-tools-process-webapp-components/dist/JobsManagement";
+import { useJobsManagementChannelApi } from "@kie-tools/runtime-tools-process-webapp-components/dist/JobsManagement";
import { EmbeddedJobsManagement } from "@kie-tools/runtime-tools-process-enveloped-components/dist/jobsManagement";
-const JobsManagementContainer: React.FC<OUIAProps> = ({ ouiaId, ouiaSafe }) => {
- const gatewayApi: JobsManagementGatewayApi = useJobsManagementGatewayApi();
+const JobsManagementContainer: React.FC = () => {
+ const channelApi = useJobsManagementChannelApi();
const appContext = useDevUIAppContext();
- return (
- <EmbeddedJobsManagement
- driver={gatewayApi}
- targetOrigin={appContext.getDevUIUrl()}
- {...componentOuiaProps(ouiaId, "jobs-management-container", ouiaSafe)}
- />
- );
+ return <EmbeddedJobsManagement channelApi={channelApi} targetOrigin={appContext.getDevUIUrl()} />;
};
export default JobsManagementContainer;
diff --git a/packages/runtime-tools-process-dev-ui-webapp/src/components/containers/ProcessDefinitionListContainer/ProcessDefinitionListContainer.tsx b/packages/runtime-tools-process-dev-ui-webapp/src/components/containers/ProcessDefinitionListContainer/ProcessDefinitionListContainer.tsx
index 7eb432f0f93..a90022d7ce3 100644
--- a/packages/runtime-tools-process-dev-ui-webapp/src/components/containers/ProcessDefinitionListContainer/ProcessDefinitionListContainer.tsx
+++ b/packages/runtime-tools-process-dev-ui-webapp/src/components/containers/ProcessDefinitionListContainer/ProcessDefinitionListContainer.tsx
@@ -16,20 +16,23 @@
* specific language governing permissions and limitations
* under the License.
*/
-import React, { useEffect } from "react";
-import {
- ProcessDefinitionListGatewayApi,
- useProcessDefinitionListGatewayApi,
-} from "../../../channel/ProcessDefinitionList";
+import React, { useEffect, useMemo } from "react";
import { useHistory } from "react-router-dom";
import { useDevUIAppContext } from "../../contexts/DevUIAppContext";
-import { OUIAProps, componentOuiaProps } from "@kie-tools/runtime-tools-components/dist/ouiaTools";
import { ProcessDefinition } from "@kie-tools/runtime-tools-process-gateway-api/dist/types";
-import { EmbeddedProcessDefinitionList } from "@kie-tools/runtime-tools-process-enveloped-components/dist/processDefinitionList";
+import {
+ EmbeddedProcessDefinitionsList,
+ ProcessDefinitionsListState,
+} from "@kie-tools/runtime-tools-process-enveloped-components/dist/processDefinitionsList";
+import { useProcessDefinitionsListChannelApi } from "@kie-tools/runtime-tools-process-webapp-components/dist/ProcessDefinitionsList";
+
+const defaultFilters = {
+ processNames: [],
+};
-const ProcessDefinitionListContainer: React.FC<OUIAProps> = ({ ouiaId, ouiaSafe }) => {
+const ProcessDefinitionsListContainer: React.FC = () => {
const history = useHistory();
- const gatewayApi: ProcessDefinitionListGatewayApi = useProcessDefinitionListGatewayApi();
+ const channelApi = useProcessDefinitionsListChannelApi();
const appContext = useDevUIAppContext();
useEffect(() => {
@@ -44,21 +47,26 @@ const ProcessDefinitionListContainer: React.FC<OUIAProps> = ({ ouiaId, ouiaSafe
},
};
- const onOpenInstanceUnsubscriber = gatewayApi.onOpenProcessFormListen(onOpenProcess);
+ const onOpenInstanceUnsubscriber = channelApi.processDefinitionsList__onOpenProcessDefinitionListen(onOpenProcess);
return () => {
- onOpenInstanceUnsubscriber.unSubscribe();
+ onOpenInstanceUnsubscriber.then((unsubscribeHandler) => unsubscribeHandler.unSubscribe());
+ };
+ }, [channelApi, history]);
+
+ const initialState: ProcessDefinitionsListState = useMemo(() => {
+ return {
+ filters: defaultFilters,
};
}, []);
return (
- <EmbeddedProcessDefinitionList
- {...componentOuiaProps(ouiaId, "process-definition-list-container", ouiaSafe)}
- driver={gatewayApi}
+ <EmbeddedProcessDefinitionsList
+ initialState={initialState}
+ channelApi={channelApi}
targetOrigin={appContext.getDevUIUrl()}
- singularProcessLabel={appContext.customLabels.singularProcessLabel}
/>
);
};
-export default ProcessDefinitionListContainer;
+export default ProcessDefinitionsListContainer;
diff --git a/packages/runtime-tools-process-dev-ui-webapp/src/components/containers/ProcessDetailsContainer/ProcessDetailsContainer.tsx b/packages/runtime-tools-process-dev-ui-webapp/src/components/containers/ProcessDetailsContainer/ProcessDetailsContainer.tsx
index 83b783fcf9d..b29ce8cc032 100644
--- a/packages/runtime-tools-process-dev-ui-webapp/src/components/containers/ProcessDetailsContainer/ProcessDetailsContainer.tsx
+++ b/packages/runtime-tools-process-dev-ui-webapp/src/components/containers/ProcessDetailsContainer/ProcessDetailsContainer.tsx
@@ -20,27 +20,20 @@ import React, { useEffect } from "react";
import { useHistory } from "react-router-dom";
import { useDevUIAppContext } from "../../contexts/DevUIAppContext";
import { ProcessInstance } from "@kie-tools/runtime-tools-process-gateway-api/dist/types";
-import { OUIAProps, componentOuiaProps } from "@kie-tools/runtime-tools-components/dist/ouiaTools";
-import {
- useProcessDetailsGatewayApi,
- ProcessDetailsGatewayApi,
-} from "@kie-tools/runtime-tools-process-webapp-components/dist/ProcessDetails";
+import { useProcessDetailsChannelApi } from "@kie-tools/runtime-tools-process-webapp-components/dist/ProcessDetails";
import { EmbeddedProcessDetails } from "@kie-tools/runtime-tools-process-enveloped-components/dist/processDetails";
interface ProcessDetailsContainerProps {
processInstance: ProcessInstance;
}
-const ProcessDetailsContainer: React.FC<ProcessDetailsContainerProps & OUIAProps> = ({
- processInstance,
- ouiaId,
- ouiaSafe,
-}) => {
+const ProcessDetailsContainer: React.FC<ProcessDetailsContainerProps> = ({ processInstance }) => {
const history = useHistory();
const appContext = useDevUIAppContext();
- const gatewayApi: ProcessDetailsGatewayApi = useProcessDetailsGatewayApi();
+ const channelApi = useProcessDetailsChannelApi();
+
useEffect(() => {
- const unSubscribeHandler = gatewayApi.onOpenProcessInstanceDetailsListener({
+ const unsubscriber = channelApi.processDetails__onOpenProcessInstanceDetailsListener({
onOpen(id: string) {
history.push(`/`);
history.push(`/Process/${id}`);
@@ -48,13 +41,13 @@ const ProcessDetailsContainer: React.FC<ProcessDetailsContainerProps & OUIAProps
});
return () => {
- unSubscribeHandler.unSubscribe();
+ unsubscriber.then((unSubscribeHandler) => unSubscribeHandler.unSubscribe());
};
- }, [processInstance]);
+ }, [channelApi, history, processInstance]);
+
return (
<EmbeddedProcessDetails
- {...componentOuiaProps(ouiaId, "process-details-container", ouiaSafe)}
- driver={gatewayApi}
+ channelApi={channelApi}
targetOrigin={appContext.getDevUIUrl()}
processInstance={processInstance}
omittedProcessTimelineEvents={appContext.omittedProcessTimelineEvents}
diff --git a/packages/runtime-tools-process-dev-ui-webapp/src/components/containers/ProcessFormContainer/ProcessFormContainer.tsx b/packages/runtime-tools-process-dev-ui-webapp/src/components/containers/ProcessFormContainer/ProcessFormContainer.tsx
index 6baa0e7be99..0e8fa4d4a37 100755
--- a/packages/runtime-tools-process-dev-ui-webapp/src/components/containers/ProcessFormContainer/ProcessFormContainer.tsx
+++ b/packages/runtime-tools-process-dev-ui-webapp/src/components/containers/ProcessFormContainer/ProcessFormContainer.tsx
@@ -16,54 +16,63 @@
* specific language governing permissions and limitations
* under the License.
*/
-import React from "react";
-import { OUIAProps, componentOuiaProps } from "@kie-tools/runtime-tools-components/dist/ouiaTools";
-import { ProcessFormGatewayApi } from "../../../channel/ProcessForm/ProcessFormGatewayApi";
-import { useProcessFormGatewayApi } from "../../../channel/ProcessForm/ProcessFormContext";
+import React, { ReactElement, useEffect } from "react";
import { useDevUIAppContext } from "../../contexts/DevUIAppContext";
import { ProcessDefinition } from "@kie-tools/runtime-tools-process-gateway-api/dist/types";
import { EmbeddedProcessForm } from "@kie-tools/runtime-tools-process-enveloped-components/dist/processForm";
-import { Form } from "@kie-tools/runtime-tools-shared-gateway-api/dist/types";
+import { useProcessFormChannelApi } from "@kie-tools/runtime-tools-process-webapp-components/dist/ProcessForm";
interface ProcessFormContainerProps {
processDefinitionData: ProcessDefinition;
onSubmitSuccess: (id: string) => void;
- onSubmitError: (details?: string) => void;
+ onSubmitError: (details?: ReactElement | string) => void;
}
-const ProcessFormContainer: React.FC<ProcessFormContainerProps & OUIAProps> = ({
+const ProcessFormContainer: React.FC<ProcessFormContainerProps> = ({
processDefinitionData,
onSubmitSuccess,
onSubmitError,
- ouiaId,
- ouiaSafe,
}) => {
- const gatewayApi: ProcessFormGatewayApi = useProcessFormGatewayApi();
+ const channelApi = useProcessFormChannelApi();
const appContext = useDevUIAppContext();
+
+ useEffect(() => {
+ const unsubscriber = channelApi.processForm__onStartProcessListen({
+ onSuccess(processInstanceId) {
+ channelApi.processForm__setBusinessKey("");
+ onSubmitSuccess(processInstanceId);
+ },
+ onError(error) {
+ const details = error.response ? (
+ <>
+ <b>
+ {error.response.statusText}: {error.message}
+ </b>
+ {error.response.data?.message && (
+ <>
+ <br />
+ {error.response.data.message}
+ </>
+ )}
+ </>
+ ) : (
+ error.message
+ );
+ onSubmitError(details);
+ },
+ });
+
+ return () => {
+ unsubscriber.then((unsubscribeHandler) => unsubscribeHandler.unSubscribe());
+ };
+ }, [channelApi, onSubmitError, onSubmitSuccess]);
+
return (
<EmbeddedProcessForm
- {...componentOuiaProps(ouiaId, "process-form-container", ouiaSafe)}
- driver={{
- getProcessFormSchema(processDefinitionData: ProcessDefinition): Promise<any> {
- return gatewayApi.getProcessFormSchema(processDefinitionData);
- },
- getCustomForm(processDefinitionData: ProcessDefinition): Promise<Form> {
- return gatewayApi.getCustomForm(processDefinitionData);
- },
- async startProcess(formData: any): Promise<void> {
- return gatewayApi
- .startProcess(formData, processDefinitionData)
- .then((id: string) => {
- gatewayApi.setBusinessKey("");
- onSubmitSuccess(id);
- })
- .catch((error) => {
- const message = error.response ? `${error.response.statusText} : ${error.message}` : error.message;
- onSubmitError(message);
- });
- },
- }}
- targetOrigin={appContext.getDevUIUrl()}
processDefinition={processDefinitionData}
+ channelApi={channelApi}
+ targetOrigin={appContext.getDevUIUrl()}
+ customFormDisplayerEnvelopePath="resources/form-displayer.html"
+ shouldLoadCustomForms={true}
/>
);
};
diff --git a/packages/runtime-tools-process-dev-ui-webapp/src/components/containers/ProcessListContainer/ProcessListContainer.tsx b/packages/runtime-tools-process-dev-ui-webapp/src/components/containers/ProcessListContainer/ProcessListContainer.tsx
index c4fdebaca90..33317c11d5f 100644
--- a/packages/runtime-tools-process-dev-ui-webapp/src/components/containers/ProcessListContainer/ProcessListContainer.tsx
+++ b/packages/runtime-tools-process-dev-ui-webapp/src/components/containers/ProcessListContainer/ProcessListContainer.tsx
@@ -19,42 +19,38 @@
import React, { useEffect } from "react";
import { useHistory } from "react-router-dom";
import { useDevUIAppContext } from "../../contexts/DevUIAppContext";
-import { ProcessListState } from "@kie-tools/runtime-tools-process-gateway-api/dist/types";
-import { OUIAProps, componentOuiaProps } from "@kie-tools/runtime-tools-components/dist/ouiaTools";
-import { EmbeddedProcessList } from "@kie-tools/runtime-tools-process-enveloped-components/dist/processList";
import {
- ProcessListGatewayApi,
- useProcessListGatewayApi,
-} from "@kie-tools/runtime-tools-process-webapp-components/dist/ProcessList";
+ EmbeddedProcessList,
+ ProcessListState,
+} from "@kie-tools/runtime-tools-process-enveloped-components/dist/processList";
+import { useProcessListChannelApi } from "@kie-tools/runtime-tools-process-webapp-components/dist/ProcessList";
import { ProcessInstance } from "@kie-tools/runtime-tools-process-gateway-api/dist/types";
interface ProcessListContainerProps {
initialState: ProcessListState;
}
-const ProcessListContainer: React.FC<ProcessListContainerProps & OUIAProps> = ({ initialState, ouiaId, ouiaSafe }) => {
+const ProcessListContainer: React.FC<ProcessListContainerProps> = ({ initialState }) => {
const history = useHistory();
- const gatewayApi: ProcessListGatewayApi = useProcessListGatewayApi();
+ const channelApi = useProcessListChannelApi();
const appContext = useDevUIAppContext();
useEffect(() => {
- const onOpenInstanceUnsubscriber = gatewayApi.onOpenProcessListen({
+ const onOpenInstanceUnsubscriber = channelApi.processList__onOpenProcessListen({
onOpen(process: ProcessInstance) {
history.push({
pathname: `/Process/${process.id}`,
- state: gatewayApi.processListState,
});
},
});
return () => {
- onOpenInstanceUnsubscriber.unSubscribe();
+ onOpenInstanceUnsubscriber.then((unsubscribeHandler) => unsubscribeHandler.unSubscribe());
};
- }, []);
+ }, [channelApi, history]);
return (
<EmbeddedProcessList
- {...componentOuiaProps(ouiaId, "process-list-container", ouiaSafe)}
- driver={gatewayApi}
+ channelApi={channelApi}
targetOrigin={appContext.getDevUIUrl()}
initialState={initialState}
singularProcessLabel={appContext.customLabels.singularProcessLabel}
diff --git a/packages/runtime-tools-process-dev-ui-webapp/src/components/containers/TaskFormContainer/TaskFormContainer.tsx b/packages/runtime-tools-process-dev-ui-webapp/src/components/containers/TaskFormContainer/TaskFormContainer.tsx
index e5815b77c04..4580014aaba 100644
--- a/packages/runtime-tools-process-dev-ui-webapp/src/components/containers/TaskFormContainer/TaskFormContainer.tsx
+++ b/packages/runtime-tools-process-dev-ui-webapp/src/components/containers/TaskFormContainer/TaskFormContainer.tsx
@@ -16,10 +16,9 @@
* specific language governing permissions and limitations
* under the License.
*/
-import React from "react";
+import React, { useMemo } from "react";
import { useDevUIAppContext } from "../../contexts/DevUIAppContext";
-import { OUIAProps, componentOuiaProps } from "@kie-tools/runtime-tools-components/dist/ouiaTools";
-import { useTaskFormGatewayApi } from "@kie-tools/runtime-tools-process-webapp-components/dist/TaskForms";
+import { useTaskFormChannelApi } from "@kie-tools/runtime-tools-process-webapp-components/dist/TaskForms";
import { UserTaskInstance } from "@kie-tools/runtime-tools-process-gateway-api/dist/types";
import { EmbeddedTaskForm } from "@kie-tools/runtime-tools-process-enveloped-components/dist/taskForm";
import { Form } from "@kie-tools/runtime-tools-shared-gateway-api/dist/types";
@@ -30,47 +29,45 @@ interface Props {
onSubmitError: (message: string, details?: string) => void;
}
-const TaskFormContainer: React.FC<Props & OUIAProps> = ({
- userTask,
- onSubmitSuccess,
- onSubmitError,
- ouiaId,
- ouiaSafe,
-}) => {
- const gatewayApi = useTaskFormGatewayApi();
+const TaskFormContainer: React.FC<Props> = ({ userTask, onSubmitSuccess, onSubmitError }) => {
+ const channelApi = useTaskFormChannelApi();
const appContext = useDevUIAppContext();
+ const extendedChannelApi = useMemo(
+ () => ({
+ taskForm__doSubmit(userTask: UserTaskInstance, phase?: string, payload?: any): Promise<any> {
+ return new Promise<any>((resolve, reject) => {
+ channelApi
+ .taskForm__doSubmit(userTask, phase, payload)
+ .then((response) => {
+ onSubmitSuccess(phase);
+ resolve(response);
+ })
+ .catch((error) => {
+ const details = error.response?.data?.message ? error.response.data.message : error.message;
+ onSubmitError(phase ?? "", details);
+ reject(error);
+ });
+ });
+ },
+ taskForm__getTaskFormSchema(userTask: UserTaskInstance): Promise<Record<string, any>> {
+ return channelApi.taskForm__getTaskFormSchema(userTask);
+ },
+ taskForm__getCustomForm(userTask: UserTaskInstance): Promise<Form> {
+ return channelApi.taskForm__getCustomForm(userTask);
+ },
+ taskForm__getTaskPhases(userTask: UserTaskInstance): Promise<string[]> {
+ return channelApi.taskForm__getTaskPhases(userTask);
+ },
+ }),
+ [channelApi, onSubmitError, onSubmitSuccess]
+ );
+
return (
<EmbeddedTaskForm
- {...componentOuiaProps(ouiaId, "task-form-container", ouiaSafe)}
userTask={userTask}
user={appContext.getCurrentUser()}
- driver={{
- doSubmit(phase?: string, payload?: any): Promise<any> {
- return new Promise<any>((resolve, reject) => {
- gatewayApi
- .doSubmit(userTask, phase, payload)
- .then((response) => {
- onSubmitSuccess(phase);
- resolve(response);
- })
- .catch((error) => {
- const details = error.response?.data?.message ? error.response.data.message : error.message;
- onSubmitError(phase ?? "", details);
- reject(error);
- });
- });
- },
- getTaskFormSchema(): Promise<Record<string, any>> {
- return gatewayApi.getTaskFormSchema(userTask);
- },
- getCustomForm(): Promise<Form> {
- return gatewayApi.getCustomForm(userTask);
- },
- getTaskPhases(): Promise<string[]> {
- return gatewayApi.getTaskPhases(userTask);
- },
- }}
+ channelApi={extendedChannelApi}
targetOrigin={appContext.getDevUIUrl()}
/>
);
diff --git a/packages/runtime-tools-process-dev-ui-webapp/src/components/containers/TaskInboxContainer/TaskInboxContainer.tsx b/packages/runtime-tools-process-dev-ui-webapp/src/components/containers/TaskListContainer/TaskListContainer.tsx
similarity index 65%
rename from packages/runtime-tools-process-dev-ui-webapp/src/components/containers/TaskInboxContainer/TaskInboxContainer.tsx
rename to packages/runtime-tools-process-dev-ui-webapp/src/components/containers/TaskListContainer/TaskListContainer.tsx
index 61e527ca871..11745d6dcb0 100644
--- a/packages/runtime-tools-process-dev-ui-webapp/src/components/containers/TaskInboxContainer/TaskInboxContainer.tsx
+++ b/packages/runtime-tools-process-dev-ui-webapp/src/components/containers/TaskListContainer/TaskListContainer.tsx
@@ -19,23 +19,19 @@
import React, { useEffect } from "react";
import { useHistory } from "react-router-dom";
import { useDevUIAppContext } from "../../contexts/DevUIAppContext";
-import { OUIAProps, componentOuiaProps } from "@kie-tools/runtime-tools-components/dist/ouiaTools";
-import {
- useTaskInboxGatewayApi,
- TaskInboxGatewayApi,
-} from "@kie-tools/runtime-tools-process-webapp-components/dist/TaskInbox";
-import { EmbeddedTaskInbox, TaskInboxApi } from "@kie-tools/runtime-tools-process-enveloped-components/dist/taskInbox";
+import { useTaskListChannelApi } from "@kie-tools/runtime-tools-process-webapp-components/dist/TaskList";
+import { EmbeddedTaskList, TaskListApi } from "@kie-tools/runtime-tools-process-enveloped-components/dist/taskList";
import { UserTaskInstance } from "@kie-tools/runtime-tools-process-gateway-api/dist/types";
import { getActiveTaskStates, getAllTaskStates } from "@kie-tools/runtime-tools-process-webapp-components/dist/utils";
-const TaskInboxContainer: React.FC<OUIAProps> = ({ ouiaId, ouiaSafe }) => {
+const TaskListContainer: React.FC = () => {
const history = useHistory();
- const gatewayApi: TaskInboxGatewayApi = useTaskInboxGatewayApi();
- const taskInboxApiRef = React.useRef<TaskInboxApi>();
+ const channelApi = useTaskListChannelApi();
+ const taskListApiRef = React.useRef<TaskListApi>();
const appContext = useDevUIAppContext();
useEffect(() => {
- const unsubscriber = gatewayApi.onOpenTaskListen({
+ const unsubscriber = channelApi.taskList__onOpenTaskListen({
onOpen(task: UserTaskInstance) {
history.push(`/TaskDetails/${task.id}`);
},
@@ -43,26 +39,24 @@ const TaskInboxContainer: React.FC<OUIAProps> = ({ ouiaId, ouiaSafe }) => {
const unsubscribeUserChange = appContext.onUserChange({
onUserChange(user) {
- taskInboxApiRef.current.taskInbox__notify(user.id);
+ taskListApiRef.current.taskList__notify(user.id);
},
});
return () => {
- unsubscriber.unSubscribe();
+ unsubscriber.then((unsubscribeHandler) => unsubscribeHandler.unSubscribe());
unsubscribeUserChange.unSubscribe();
};
}, []);
return (
- <EmbeddedTaskInbox
- {...componentOuiaProps(ouiaId, "tasks-container", ouiaSafe)}
- initialState={gatewayApi.taskInboxState}
- driver={gatewayApi}
+ <EmbeddedTaskList
+ channelApi={channelApi}
allTaskStates={getAllTaskStates()}
activeTaskStates={getActiveTaskStates()}
targetOrigin={appContext.getDevUIUrl()}
- ref={taskInboxApiRef}
+ ref={taskListApiRef}
/>
);
};
-export default TaskInboxContainer;
+export default TaskListContainer;
diff --git a/packages/runtime-tools-process-dev-ui-webapp/src/components/contexts/ProcessContextProvider.tsx b/packages/runtime-tools-process-dev-ui-webapp/src/components/contexts/ProcessContextProvider.tsx
index e03404e53a2..15a16ba6401 100644
--- a/packages/runtime-tools-process-dev-ui-webapp/src/components/contexts/ProcessContextProvider.tsx
+++ b/packages/runtime-tools-process-dev-ui-webapp/src/components/contexts/ProcessContextProvider.tsx
@@ -21,14 +21,14 @@ import { ApolloClient } from "apollo-client";
import { useDevUIAppContext } from "../../components/contexts/DevUIAppContext";
import { ProcessListContextProvider } from "@kie-tools/runtime-tools-process-webapp-components/dist/ProcessList";
import { ProcessDetailsContextProvider } from "@kie-tools/runtime-tools-process-webapp-components/dist/ProcessDetails";
-import { ProcessDefinitionListContextProvider } from "../../channel/ProcessDefinitionList";
+import { ProcessDefinitionsListContextProvider } from "@kie-tools/runtime-tools-process-webapp-components/dist/ProcessDefinitionsList";
-interface IOwnProps {
+interface Props {
apolloClient: ApolloClient<any>;
children;
}
-export const ProcessContextProvider: React.FC<IOwnProps> = ({ apolloClient, children }) => {
+export const ProcessContextProvider: React.FC<Props> = ({ apolloClient, children }) => {
const appContext = useDevUIAppContext();
return (
@@ -40,12 +40,12 @@ export const ProcessContextProvider: React.FC<IOwnProps> = ({ apolloClient, chil
apolloClient={apolloClient}
options={{ transformEndpointBaseUrl: (url) => appContext.transformEndpointBaseUrl(url) }}
>
- <ProcessDefinitionListContextProvider
+ <ProcessDefinitionsListContextProvider
apolloClient={apolloClient}
options={{ transformEndpointBaseUrl: (url) => appContext.transformEndpointBaseUrl(url) }}
>
{children}
- </ProcessDefinitionListContextProvider>
+ </ProcessDefinitionsListContextProvider>
</ProcessDetailsContextProvider>
</ProcessListContextProvider>
);
diff --git a/packages/runtime-tools-process-dev-ui-webapp/src/components/contexts/TaskFormContextProvider.tsx b/packages/runtime-tools-process-dev-ui-webapp/src/components/contexts/TaskFormContextProvider.tsx
index 5642f985bdd..856aa6332f7 100644
--- a/packages/runtime-tools-process-dev-ui-webapp/src/components/contexts/TaskFormContextProvider.tsx
+++ b/packages/runtime-tools-process-dev-ui-webapp/src/components/contexts/TaskFormContextProvider.tsx
@@ -20,7 +20,7 @@ import React from "react";
import { useDevUIAppContext } from "../../components/contexts/DevUIAppContext";
import {
TaskFormContext,
- TaskFormGatewayApiImpl,
+ TaskFormChannelApiImpl,
} from "@kie-tools/runtime-tools-process-webapp-components/dist/TaskForms";
export const TaskFormContextProvider: React.FC = ({ children }) => {
@@ -29,10 +29,9 @@ export const TaskFormContextProvider: React.FC = ({ children }) => {
return (
<TaskFormContext.Provider
value={
- new TaskFormGatewayApiImpl(
- () => appContext.getCurrentUser(),
- (url: string) => appContext.transformEndpointBaseUrl(url)
- )
+ new TaskFormChannelApiImpl(() => appContext.getCurrentUser(), {
+ transformEndpointBaseUrl: (url: string) => appContext.transformEndpointBaseUrl(url),
+ })
}
>
{children}
diff --git a/packages/runtime-tools-process-dev-ui-webapp/src/components/contexts/TaskInboxContextProvider.tsx b/packages/runtime-tools-process-dev-ui-webapp/src/components/contexts/TaskListContextProvider.tsx
similarity index 64%
rename from packages/runtime-tools-process-dev-ui-webapp/src/components/contexts/TaskInboxContextProvider.tsx
rename to packages/runtime-tools-process-dev-ui-webapp/src/components/contexts/TaskListContextProvider.tsx
index 4df50e03305..a640536fdb2 100644
--- a/packages/runtime-tools-process-dev-ui-webapp/src/components/contexts/TaskInboxContextProvider.tsx
+++ b/packages/runtime-tools-process-dev-ui-webapp/src/components/contexts/TaskListContextProvider.tsx
@@ -18,28 +18,20 @@
*/
import React from "react";
import { ApolloClient } from "apollo-client";
-import { useDevUIAppContext } from "../../components/contexts/DevUIAppContext";
import {
- TaskInboxContext,
- TaskInboxGatewayApiImpl,
- GraphQLTaskInboxQueries,
-} from "@kie-tools/runtime-tools-process-webapp-components/dist/TaskInbox";
+ TaskListContext,
+ TaskListChannelApiImpl,
+} from "@kie-tools/runtime-tools-process-webapp-components/dist/TaskList";
-interface IOwnProps {
+interface Props {
apolloClient: ApolloClient<any>;
children;
}
-export const TaskInboxContextProvider: React.FC<IOwnProps> = ({ apolloClient, children }) => {
- const appContext = useDevUIAppContext();
-
+export const TaskListContextProvider: React.FC<Props> = ({ apolloClient, children }) => {
return (
- <TaskInboxContext.Provider
- value={new TaskInboxGatewayApiImpl(new GraphQLTaskInboxQueries(apolloClient), () => appContext.getCurrentUser())}
- >
- {children}
- </TaskInboxContext.Provider>
+ <TaskListContext.Provider value={new TaskListChannelApiImpl(apolloClient)}>{children}</TaskListContext.Provider>
);
};
-export default TaskInboxContextProvider;
+export default TaskListContextProvider;
diff --git a/packages/runtime-tools-process-dev-ui-webapp/src/components/pages/ProcessDetailsPage/ProcessDetailsPage.tsx b/packages/runtime-tools-process-dev-ui-webapp/src/components/pages/ProcessDetailsPage/ProcessDetailsPage.tsx
index 86b7117053d..56a093e9148 100644
--- a/packages/runtime-tools-process-dev-ui-webapp/src/components/pages/ProcessDetailsPage/ProcessDetailsPage.tsx
+++ b/packages/runtime-tools-process-dev-ui-webapp/src/components/pages/ProcessDetailsPage/ProcessDetailsPage.tsx
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-import React, { useState, useEffect } from "react";
+import React, { useState, useEffect, useCallback, useRef } from "react";
import { Card } from "@patternfly/react-core/dist/js/components/Card";
import { PageSection } from "@patternfly/react-core/dist/js/components/Page";
import { Bullseye } from "@patternfly/react-core/dist/js/layouts/Bullseye";
@@ -25,10 +25,7 @@ import { PageSectionHeader } from "@kie-tools/runtime-tools-components/dist/comp
import { ServerErrors } from "@kie-tools/runtime-tools-components/dist/components/ServerErrors";
import { KogitoSpinner } from "@kie-tools/runtime-tools-components/dist/components/KogitoSpinner";
import ProcessDetailsContainer from "../../containers/ProcessDetailsContainer/ProcessDetailsContainer";
-import {
- ProcessDetailsGatewayApi,
- useProcessDetailsGatewayApi,
-} from "@kie-tools/runtime-tools-process-webapp-components/dist/ProcessDetails";
+import { useProcessDetailsChannelApi } from "@kie-tools/runtime-tools-process-webapp-components/dist/ProcessDetails";
import { StaticContext, useHistory } from "react-router";
import * as H from "history";
import "../../styles.css";
@@ -53,7 +50,7 @@ const ProcessDetailsPage: React.FC<RouteComponentProps<MatchProps, StaticContext
return ouiaPageTypeAndObjectId("process-details");
});
- const gatewayApi: ProcessDetailsGatewayApi = useProcessDetailsGatewayApi();
+ const channelApi = useProcessDetailsChannelApi();
const appContext = useDevUIAppContext();
const history = useHistory();
@@ -61,38 +58,37 @@ const ProcessDetailsPage: React.FC<RouteComponentProps<MatchProps, StaticContext
const [processInstance, setProcessInstance] = useState<ProcessInstance>({} as ProcessInstance);
const [isLoading, setIsLoading] = useState<boolean>(false);
const [fetchError, setFetchError] = useState<string>("");
- let currentPage = JSON.parse(window.localStorage.getItem("state"));
+ const currentPage = useRef(JSON.parse(window.localStorage.getItem("state")));
+
useEffect(() => {
window.onpopstate = () => {
props.history.push({ state: Object.assign({}, props.location.state) });
};
});
- async function fetchDetails() {
+ const fetchDetails = useCallback(async () => {
let response: ProcessInstance = {} as ProcessInstance;
let responseError: string = "";
try {
setIsLoading(true);
- response = await gatewayApi.processDetailsQuery(processId);
+ response = await channelApi.processDetails__getProcessDetails(processId);
setProcessInstance(response);
} catch (error) {
responseError = error;
setFetchError(error);
} finally {
setIsLoading(false);
- /* istanbul ignore else */
if (responseError.length === 0 && fetchError.length === 0 && Object.keys(response).length === 0) {
let prevPath;
- /* istanbul ignore else */
- if (currentPage) {
- currentPage = Object.assign({}, currentPage, props.location.state);
- const tempPath = currentPage.prev.split("/");
+ if (currentPage.current) {
+ currentPage.current = Object.assign({}, currentPage.current, props.location.state);
+ const tempPath = currentPage.current.prev.split("/");
prevPath = tempPath.filter((item) => item);
}
history.push({
pathname: "/NoData",
state: {
- prev: currentPage ? currentPage.prev : "/ProcessInstances",
+ prev: currentPage ? currentPage.current.prev : "/ProcessInstances",
title: "Process not found",
description: `Process instance with the id ${processId} not found`,
buttonText: currentPage
@@ -106,14 +102,13 @@ const ProcessDetailsPage: React.FC<RouteComponentProps<MatchProps, StaticContext
});
}
}
- }
+ }, [channelApi, fetchError.length, history, processId, props.location.state]);
useEffect(() => {
- /* istanbul ignore else */
if (processId) {
fetchDetails();
}
- }, [processId]);
+ }, [fetchDetails, processId]);
const renderItems = () => {
if (!isLoading) {
diff --git a/packages/runtime-tools-process-dev-ui-webapp/src/components/pages/ProcessFormPage/ProcessFormPage.tsx b/packages/runtime-tools-process-dev-ui-webapp/src/components/pages/ProcessFormPage/ProcessFormPage.tsx
index 0e45fcaca3d..3ab75aecae0 100644
--- a/packages/runtime-tools-process-dev-ui-webapp/src/components/pages/ProcessFormPage/ProcessFormPage.tsx
+++ b/packages/runtime-tools-process-dev-ui-webapp/src/components/pages/ProcessFormPage/ProcessFormPage.tsx
@@ -16,106 +16,74 @@
* specific language governing permissions and limitations
* under the License.
*/
-import React, { useEffect, useState, useCallback } from "react";
-import { Card, CardBody } from "@patternfly/react-core/dist/js/components/Card";
+import React, { useState, useCallback, useMemo, ReactElement } from "react";
import { PageSection } from "@patternfly/react-core/dist/js/components/Page";
import ProcessFormContainer from "../../containers/ProcessFormContainer/ProcessFormContainer";
-import "../../styles.css";
import { useHistory } from "react-router-dom";
-import InlineEdit from "./components/InlineEdit/InlineEdit";
-import { useProcessFormGatewayApi } from "../../../channel/ProcessForm/ProcessFormContext";
+import { InlineEdit } from "./components/InlineEdit/InlineEdit";
import { ProcessDefinition } from "@kie-tools/runtime-tools-process-gateway-api/dist/types";
-import {
- OUIAProps,
- componentOuiaProps,
- ouiaPageTypeAndObjectId,
-} from "@kie-tools/runtime-tools-components/dist/ouiaTools";
import { FormNotification, Notification } from "@kie-tools/runtime-tools-components/dist/components/FormNotification";
import { PageTitle } from "@kie-tools/runtime-tools-components/dist/components/PageTitle";
+import { useProcessFormChannelApi } from "@kie-tools/runtime-tools-process-webapp-components/dist/ProcessForm";
+import "../../styles.css";
-const ProcessFormPage: React.FC<OUIAProps> = ({ ouiaId, ouiaSafe }) => {
+const ProcessFormPage: React.FC = () => {
const [notification, setNotification] = useState<Notification>();
-
const history = useHistory();
- const gatewayApi = useProcessFormGatewayApi();
-
- const processDefinition: ProcessDefinition = history.location.state["processDefinition"];
-
- let processId: string;
-
- useEffect(() => {
- return ouiaPageTypeAndObjectId("process-form");
- });
-
- const goToProcessDefinition = () => {
- history.push("/Processes");
- };
+ const channelApi = useProcessFormChannelApi();
+ const processDefinition = useMemo(
+ () => history.location.state["processDefinition"] as ProcessDefinition,
+ [history.location.state]
+ );
- const showNotification = (
- notificationType: Notification["type"],
- submitMessage: string,
- notificationDetails?: string
- ) => {
- setNotification({
- type: notificationType,
- message: submitMessage,
- details: notificationDetails,
- customActions: [
- {
- label: "Go to Processes",
- onClick: () => {
- setNotification(null);
- goToProcessDefinition();
+ const showNotification = useCallback(
+ (notificationType: Notification["type"], submitMessage: string, notificationDetails?: ReactElement | string) => {
+ setNotification({
+ type: notificationType,
+ message: submitMessage,
+ details: notificationDetails,
+ customActions: [
+ {
+ label: "Go to Processes",
+ onClick: () => {
+ setNotification(null);
+ history.push(`/Processes`);
+ },
},
+ ],
+ close: () => {
+ setNotification(null);
},
- ],
- close: () => {
- setNotification(null);
- },
- });
- return (
- <>
- {processId && (
- <div>
- <label>Go to Process details</label>
- <button onClick={handleClick}>Click Here</button>
- </div>
- )}
- </>
- );
- };
-
- const onSubmitSuccess = (id: string): void => {
- processId = id;
- const message = `The process with id: ${id} has started successfully`;
- showNotification("success", message);
- };
+ });
+ },
+ [history]
+ );
- const onSubmitError = (details?: string) => {
- const message = "Failed to start the process.";
- showNotification("error", message, details);
- };
+ const onSubmitSuccess = useCallback(
+ (id: string): void => {
+ const message = `The process with id: ${id} has started successfully`;
+ showNotification("success", message);
+ },
+ [showNotification]
+ );
- const handleClick = useCallback(() => {
- const goToProcessDetails = () => {
- history.push(`/Process/${processId}`);
- };
- setNotification(null);
- goToProcessDetails();
- }, [setNotification, history, processId]);
+ const onSubmitError = useCallback(
+ (details?: ReactElement | string) => {
+ const message = "Failed to start the process.";
+ showNotification("error", message, details);
+ },
+ [showNotification]
+ );
return (
<React.Fragment>
- <PageSection
- {...componentOuiaProps(`title${ouiaId ? "-" + ouiaId : ""}`, "process-form-page-section", ouiaSafe)}
- variant="light"
- >
+ <PageSection variant="light">
<PageTitle
title={`Start ${processDefinition.processName}`}
extra={
<InlineEdit
- setBusinessKey={(bk) => gatewayApi.setBusinessKey(bk)}
- getBusinessKey={() => gatewayApi.getBusinessKey()}
+ setBusinessKey={(bk) => channelApi.processForm__setBusinessKey(bk)}
+ getBusinessKey={async () => await channelApi.processForm__getBusinessKey()}
/>
}
/>
@@ -125,18 +93,12 @@ const ProcessFormPage: React.FC<OUIAProps> = ({ ouiaId, ouiaSafe }) => {
</div>
)}
</PageSection>
- <PageSection
- {...componentOuiaProps(`content${ouiaId ? "-" + ouiaId : ""}`, "process-form-page-section", ouiaSafe)}
- >
- <Card className="Dev-ui__card-size">
- <CardBody className="pf-v5-u-h-100">
- <ProcessFormContainer
- processDefinitionData={processDefinition}
- onSubmitSuccess={onSubmitSuccess}
- onSubmitError={onSubmitError}
- />
- </CardBody>
- </Card>
+ <PageSection>
+ <ProcessFormContainer
+ processDefinitionData={processDefinition}
+ onSubmitSuccess={onSubmitSuccess}
+ onSubmitError={onSubmitError}
+ />
</PageSection>
</React.Fragment>
);
diff --git a/packages/runtime-tools-process-dev-ui-webapp/src/components/pages/ProcessFormPage/components/InlineEdit/InlineEdit.tsx b/packages/runtime-tools-process-dev-ui-webapp/src/components/pages/ProcessFormPage/components/InlineEdit/InlineEdit.tsx
index 597199947a9..8f70001eb49 100644
--- a/packages/runtime-tools-process-dev-ui-webapp/src/components/pages/ProcessFormPage/components/InlineEdit/InlineEdit.tsx
+++ b/packages/runtime-tools-process-dev-ui-webapp/src/components/pages/ProcessFormPage/components/InlineEdit/InlineEdit.tsx
@@ -22,7 +22,6 @@ import { TextInput } from "@patternfly/react-core/dist/js/components/TextInput";
import { PencilAltIcon } from "@patternfly/react-icons/dist/js/icons/pencil-alt-icon";
import { CheckIcon } from "@patternfly/react-icons/dist/js/icons/check-icon";
import { TimesIcon } from "@patternfly/react-icons/dist/js/icons/times-icon";
-import { OUIAProps, componentOuiaProps } from "@kie-tools/runtime-tools-components/dist/ouiaTools";
export interface InlineEditApi {
reset: () => void;
@@ -30,14 +29,18 @@ export interface InlineEditApi {
interface InlineEditProps {
setBusinessKey: (businessKey: string) => void;
- getBusinessKey: () => string;
+ getBusinessKey: () => Promise<string>;
}
-export const InlineEdit = React.forwardRef<InlineEditApi, InlineEditProps & OUIAProps>(
- ({ setBusinessKey, getBusinessKey, ouiaId, ouiaSafe }, forwardedRef) => {
+export const InlineEdit = React.forwardRef<InlineEditApi, InlineEditProps>(
+ ({ setBusinessKey, getBusinessKey }, forwardedRef) => {
const [isEditable, setIsEditable] = useState<boolean>(false);
const [inputValue, setInputValue] = useState<string>("");
- const [currentBusinessKey, setCurrentBusinessKey] = useState<string>(getBusinessKey());
+ const [currentBusinessKey, setCurrentBusinessKey] = useState<string>("");
+
+ useEffect(() => {
+ getBusinessKey().then((key) => setCurrentBusinessKey(key));
+ }, [getBusinessKey]);
useEffect(() => {
if (currentBusinessKey.length === 0) {
@@ -69,11 +72,7 @@ export const InlineEdit = React.forwardRef<InlineEditApi, InlineEditProps & OUIA
);
return (
- <div
- {...componentOuiaProps(ouiaId, "inline-edit", ouiaSafe)}
- className={`pf-v5-c-inline-edit ${isEditable && "pf-m-inline-editable"}`}
- id="inline-edit-toggle-example"
- >
+ <div className={`pf-v5-c-inline-edit ${isEditable && "pf-v5-m-inline-editable"}`} id="inline-edit-toggle-example">
<div className="pf-v5-c-inline-edit__group">
<div className="pf-v5-c-inline-edit__value" id="single-editable-example-label">
{currentBusinessKey.length > 0 ? (
@@ -116,5 +115,3 @@ export const InlineEdit = React.forwardRef<InlineEditApi, InlineEditProps & OUIA
);
}
);
-
-export default InlineEdit;
diff --git a/packages/runtime-tools-process-dev-ui-webapp/src/components/pages/ProcessesPage/ProcessesPage.tsx b/packages/runtime-tools-process-dev-ui-webapp/src/components/pages/ProcessesPage/ProcessesPage.tsx
index 685fa42e53a..1631ae997a9 100644
--- a/packages/runtime-tools-process-dev-ui-webapp/src/components/pages/ProcessesPage/ProcessesPage.tsx
+++ b/packages/runtime-tools-process-dev-ui-webapp/src/components/pages/ProcessesPage/ProcessesPage.tsx
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-import React, { ReactText, useEffect, useState } from "react";
+import React, { useState } from "react";
import { Card } from "@patternfly/react-core/dist/js/components/Card";
import { PageSection } from "@patternfly/react-core/dist/js/components/Page";
import { Tab, Tabs, TabTitleText } from "@patternfly/react-core/dist/js/components/Tabs";
@@ -25,31 +25,19 @@ import { StaticContext } from "react-router";
import * as H from "history";
import ProcessListContainer from "../../containers/ProcessListContainer/ProcessListContainer";
import "../../styles.css";
-import ProcessDefinitionListContainer from "../../containers/ProcessDefinitionListContainer/ProcessDefinitionListContainer";
import { useDevUIAppContext } from "../../contexts/DevUIAppContext";
-import {
- OUIAProps,
- componentOuiaProps,
- ouiaPageTypeAndObjectId,
-} from "@kie-tools/runtime-tools-components/dist/ouiaTools";
-import { ProcessListState } from "@kie-tools/runtime-tools-process-gateway-api/dist/types";
import { PageSectionHeader } from "@kie-tools/runtime-tools-components/dist/components/PageSectionHeader";
+import ProcessDefinitionsListContainer from "../../containers/ProcessDefinitionListContainer/ProcessDefinitionListContainer";
+import { ProcessListState } from "@kie-tools/runtime-tools-process-enveloped-components/dist/processList";
interface MatchProps {
instanceID: string;
}
-const ProcessesPage: React.FC<RouteComponentProps<MatchProps, StaticContext, H.LocationState> & OUIAProps> = ({
- ouiaId,
- ouiaSafe,
- ...props
-}) => {
+const ProcessesPage: React.FC<RouteComponentProps<MatchProps, StaticContext, H.LocationState>> = ({ ...props }) => {
const apiContext = useDevUIAppContext();
- const [activeTabKey, setActiveTabKey] = useState<ReactText>(0);
- useEffect(() => {
- return ouiaPageTypeAndObjectId("process-instances");
- });
+ const [activeTabKey, setActiveTabKey] = useState<number>(0);
const initialState: ProcessListState = props.location && (props.location.state as ProcessListState);
@@ -57,48 +45,46 @@ const ProcessesPage: React.FC<RouteComponentProps<MatchProps, StaticContext, H.L
setActiveTabKey(tabIndex);
};
return (
- <React.Fragment>
+ <>
{activeTabKey === 0 && (
- <PageSectionHeader titleText={`${apiContext.customLabels.singularProcessLabel} Instances`} ouiaId={ouiaId} />
+ <PageSectionHeader titleText={`${apiContext.customLabels.singularProcessLabel} Instances`} />
)}
{activeTabKey === 1 && (
- <PageSectionHeader titleText={`${apiContext.customLabels.singularProcessLabel} Definitions`} ouiaId={ouiaId} />
+ <PageSectionHeader titleText={`${apiContext.customLabels.singularProcessLabel} Definitions`} />
)}
- <div>
- <Tabs
- activeKey={activeTabKey}
- onSelect={handleTabClick}
- isBox
- variant="light300"
- style={{
- background: "white",
- }}
+ <Tabs
+ activeKey={activeTabKey}
+ onSelect={handleTabClick}
+ isBox
+ variant="light300"
+ style={{
+ background: "white",
+ }}
+ >
+ <Tab
+ id="process-list-tab"
+ eventKey={0}
+ title={<TabTitleText>{apiContext.customLabels.singularProcessLabel} Instances</TabTitleText>}
>
- <Tab
- id="process-list-tab"
- eventKey={0}
- title={<TabTitleText>{apiContext.customLabels.singularProcessLabel} Instances</TabTitleText>}
- >
- <PageSection {...componentOuiaProps(ouiaId, "process-list-page-section", ouiaSafe)}>
- <Card className="Dev-ui__card-size">
- <ProcessListContainer initialState={initialState} />
- </Card>
- </PageSection>
- </Tab>
- <Tab
- id="process-definitions-tab"
- eventKey={1}
- title={<TabTitleText>{apiContext.customLabels.singularProcessLabel} Definitions</TabTitleText>}
- >
- <PageSection {...componentOuiaProps(ouiaId, "process-definition-list-page-section", ouiaSafe)}>
- <Card className="Dev-ui__card-size">
- <ProcessDefinitionListContainer />
- </Card>
- </PageSection>
- </Tab>
- </Tabs>
- </div>
- </React.Fragment>
+ <PageSection style={{ height: "100%" }}>
+ <Card className="Dev-ui__card-size">
+ <ProcessListContainer initialState={initialState} />
+ </Card>
+ </PageSection>
+ </Tab>
+ <Tab
+ id="process-definitions-tab"
+ eventKey={1}
+ title={<TabTitleText>{apiContext.customLabels.singularProcessLabel} Definitions</TabTitleText>}
+ >
+ <PageSection style={{ height: "100%" }}>
+ <Card className="Dev-ui__card-size">
+ <ProcessDefinitionsListContainer />
+ </Card>
+ </PageSection>
+ </Tab>
+ </Tabs>
+ </>
);
};
diff --git a/packages/runtime-tools-process-dev-ui-webapp/src/components/pages/TaskDetailsPage/TaskDetailsPage.tsx b/packages/runtime-tools-process-dev-ui-webapp/src/components/pages/TaskDetailsPage/TaskDetailsPage.tsx
index be694c145c2..dccafd29270 100644
--- a/packages/runtime-tools-process-dev-ui-webapp/src/components/pages/TaskDetailsPage/TaskDetailsPage.tsx
+++ b/packages/runtime-tools-process-dev-ui-webapp/src/components/pages/TaskDetailsPage/TaskDetailsPage.tsx
@@ -43,10 +43,7 @@ import {
componentOuiaProps,
ouiaPageTypeAndObjectId,
} from "@kie-tools/runtime-tools-components/dist/ouiaTools";
-import {
- TaskInboxGatewayApi,
- useTaskInboxGatewayApi,
-} from "@kie-tools/runtime-tools-process-webapp-components/dist/TaskInbox";
+import { useTaskListChannelApi } from "@kie-tools/runtime-tools-process-webapp-components/dist/TaskList";
import { UserTaskInstance } from "@kie-tools/runtime-tools-process-gateway-api/dist/types";
import { FormNotification, Notification } from "@kie-tools/runtime-tools-components/dist/components/FormNotification";
import { KogitoSpinner } from "@kie-tools/runtime-tools-components/dist/components/KogitoSpinner";
@@ -57,13 +54,14 @@ import {
} from "@kie-tools/runtime-tools-components/dist/components/KogitoEmptyState";
import { EmbeddedTaskDetails, TaskState } from "@kie-tools/runtime-tools-process-enveloped-components/dist/taskDetails";
import { PageTitle } from "@kie-tools/runtime-tools-components/dist/components/PageTitle";
+import { TaskListChannelApi } from "@kie-tools/runtime-tools-process-enveloped-components/dist/taskList";
interface Props {
taskId?: string;
}
const TaskDetailsPage: React.FC<RouteComponentProps<Props> & OUIAProps> = ({ ouiaId, ouiaSafe, ...props }) => {
- const taskInboxGatewayApi: TaskInboxGatewayApi = useTaskInboxGatewayApi();
+ const channelApi: TaskListChannelApi = useTaskListChannelApi();
const appContext = useDevUIAppContext();
const [taskId] = useState<string>(props.match.params.taskId);
@@ -79,7 +77,7 @@ const TaskDetailsPage: React.FC<RouteComponentProps<Props> & OUIAProps> = ({ oui
const loadTask = async () => {
try {
- const task = await taskInboxGatewayApi.getTaskById(taskId);
+ const task = await channelApi.taskList__getTaskById(taskId);
setUserTask(task);
if (
(appContext.getCurrentUser().id && !task?.potentialUsers?.includes(appContext.getCurrentUser()?.id)) ||
@@ -114,7 +112,7 @@ const TaskDetailsPage: React.FC<RouteComponentProps<Props> & OUIAProps> = ({ oui
label: "Go to Tasks",
onClick: () => {
setNotification(null);
- goToInbox();
+ goToTaskList();
},
},
],
@@ -124,8 +122,8 @@ const TaskDetailsPage: React.FC<RouteComponentProps<Props> & OUIAProps> = ({ oui
});
};
- const goToInbox = () => {
- taskInboxGatewayApi.clearOpenTask();
+ const goToTaskList = () => {
+ channelApi.taskList__clearOpenTask();
props.history.push("/Tasks");
};
@@ -164,7 +162,7 @@ const TaskDetailsPage: React.FC<RouteComponentProps<Props> & OUIAProps> = ({ oui
<GridItem span={12} className={"Dev-ui__card-size"}>
<Card className={"Dev-ui__card-size"}>
<ServerErrors error={error} variant="large">
- <Button variant="primary" onClick={() => goToInbox()}>
+ <Button variant="primary" onClick={() => goToTaskList()}>
Go to Tasks
</Button>
</ServerErrors>
diff --git a/packages/runtime-tools-process-dev-ui-webapp/src/components/pages/TaskInboxPage/TaskInboxPage.tsx b/packages/runtime-tools-process-dev-ui-webapp/src/components/pages/TaskListPage/TaskListPage.tsx
similarity index 60%
rename from packages/runtime-tools-process-dev-ui-webapp/src/components/pages/TaskInboxPage/TaskInboxPage.tsx
rename to packages/runtime-tools-process-dev-ui-webapp/src/components/pages/TaskListPage/TaskListPage.tsx
index 4895cb82040..8c78b5028da 100644
--- a/packages/runtime-tools-process-dev-ui-webapp/src/components/pages/TaskInboxPage/TaskInboxPage.tsx
+++ b/packages/runtime-tools-process-dev-ui-webapp/src/components/pages/TaskListPage/TaskListPage.tsx
@@ -16,49 +16,37 @@
* specific language governing permissions and limitations
* under the License.
*/
-import React, { useEffect } from "react";
-
+import React from "react";
import { Card } from "@patternfly/react-core/dist/js/components/Card";
import { PageSection } from "@patternfly/react-core/dist/js/components/Page";
-import TaskInboxContainer from "../../containers/TaskInboxContainer/TaskInboxContainer";
-import TaskInboxSwitchUser from "./components/TaskInboxSwitchUser";
+import TaskListContainer from "../../containers/TaskListContainer/TaskListContainer";
+import TaskListSwitchUser from "./components/TaskListSwitchUser";
import { useDevUIAppContext } from "../../contexts/DevUIAppContext";
-import "../../styles.css";
-import {
- OUIAProps,
- componentOuiaProps,
- ouiaPageTypeAndObjectId,
-} from "@kie-tools/runtime-tools-components/dist/ouiaTools";
import { PageTitle } from "@kie-tools/runtime-tools-components/dist/components/PageTitle";
import { Flex } from "@patternfly/react-core/dist/js/layouts/Flex";
+import "../../styles.css";
-const TaskInboxPage: React.FC<OUIAProps> = (ouiaId, ouiaSafe) => {
+const TaskListPage: React.FC = () => {
const appContext = useDevUIAppContext();
const user: string = appContext.getCurrentUser().id;
- useEffect(() => {
- return ouiaPageTypeAndObjectId("tasks-page");
- });
- const renderTaskInbox = (): JSX.Element => {
- return <TaskInboxContainer />;
+ const renderTaskList = (): JSX.Element => {
+ return <TaskListContainer />;
};
return (
<React.Fragment>
- <PageSection
- variant="light"
- {...componentOuiaProps("header" + (ouiaId ? "-" + ouiaId : ""), "tasks-page", ouiaSafe)}
- >
+ <PageSection variant="light">
<Flex alignItems={{ default: "alignItemsCenter" }}>
<PageTitle title="Tasks" />
- {user.length > 0 && <TaskInboxSwitchUser user={user} />}
+ {user.length > 0 && <TaskListSwitchUser user={user} />}
</Flex>
</PageSection>
- <PageSection {...componentOuiaProps("content" + (ouiaId ? "-" + ouiaId : ""), "tasks-page-section", ouiaSafe)}>
- <Card className="Dev-ui__card-size">{renderTaskInbox()}</Card>
+ <PageSection>
+ <Card className="Dev-ui__card-size">{renderTaskList()}</Card>
</PageSection>
</React.Fragment>
);
};
-export default TaskInboxPage;
+export default TaskListPage;
diff --git a/packages/runtime-tools-process-dev-ui-webapp/src/components/pages/TaskInboxPage/components/TaskInboxSwitchUser.tsx b/packages/runtime-tools-process-dev-ui-webapp/src/components/pages/TaskListPage/components/TaskListSwitchUser.tsx
similarity index 95%
rename from packages/runtime-tools-process-dev-ui-webapp/src/components/pages/TaskInboxPage/components/TaskInboxSwitchUser.tsx
rename to packages/runtime-tools-process-dev-ui-webapp/src/components/pages/TaskListPage/components/TaskListSwitchUser.tsx
index 828cf87e360..c711bb3408e 100644
--- a/packages/runtime-tools-process-dev-ui-webapp/src/components/pages/TaskInboxPage/components/TaskInboxSwitchUser.tsx
+++ b/packages/runtime-tools-process-dev-ui-webapp/src/components/pages/TaskListPage/components/TaskListSwitchUser.tsx
@@ -28,7 +28,7 @@ interface IOwnProps {
user: string;
}
-const TaskInboxSwitchUser: React.FC<IOwnProps & OUIAProps> = ({ user, ouiaId, ouiaSafe }) => {
+const TaskListSwitchUser: React.FC<IOwnProps & OUIAProps> = ({ user, ouiaId, ouiaSafe }) => {
const appContext = useDevUIAppContext();
const [isDropDownOpen, setIsDropDownOpen] = useState(false);
const [currentUser, setCurrentUser] = useState(user);
@@ -76,4 +76,4 @@ const TaskInboxSwitchUser: React.FC<IOwnProps & OUIAProps> = ({ user, ouiaId, ou
);
};
-export default TaskInboxSwitchUser;
+export default TaskListSwitchUser;
diff --git a/packages/runtime-tools-process-dev-ui-webapp/src/resources/form-displayer.ts b/packages/runtime-tools-process-dev-ui-webapp/src/resources/form-displayer.ts
index e0a60960dd2..3367de41c3e 100644
--- a/packages/runtime-tools-process-dev-ui-webapp/src/resources/form-displayer.ts
+++ b/packages/runtime-tools-process-dev-ui-webapp/src/resources/form-displayer.ts
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { init } from "@kie-tools/runtime-tools-shared-enveloped-components/dist/formDisplayer";
+import { init } from "@kie-tools/runtime-tools-process-enveloped-components/dist/formDisplayer";
import { ContainerType } from "@kie-tools-core/envelope/dist/api";
init({
diff --git a/packages/runtime-tools-process-enveloped-components/package.json b/packages/runtime-tools-process-enveloped-components/package.json
index 786afd36362..c106804770e 100644
--- a/packages/runtime-tools-process-enveloped-components/package.json
+++ b/packages/runtime-tools-process-enveloped-components/package.json
@@ -38,7 +38,6 @@
"@kie-tools/i18n-common-dictionary": "workspace:*",
"@kie-tools/runtime-tools-components": "workspace:*",
"@kie-tools/runtime-tools-process-gateway-api": "workspace:*",
- "@kie-tools/runtime-tools-shared-enveloped-components": "workspace:*",
"@kie-tools/runtime-tools-shared-gateway-api": "workspace:*",
"@microlink/react-json-view": "^1.24.0",
"@patternfly/patternfly": "^5.4.1",
diff --git a/packages/runtime-tools-process-enveloped-components/src/processList/api/ProcessListApi.ts b/packages/runtime-tools-process-enveloped-components/src/formDetails/api/FormDetailsApi.ts
similarity index 88%
copy from packages/runtime-tools-process-enveloped-components/src/processList/api/ProcessListApi.ts
copy to packages/runtime-tools-process-enveloped-components/src/formDetails/api/FormDetailsApi.ts
index dcfc570add2..41fd0bfc6eb 100644
--- a/packages/runtime-tools-process-enveloped-components/src/processList/api/ProcessListApi.ts
+++ b/packages/runtime-tools-process-enveloped-components/src/formDetails/api/FormDetailsApi.ts
@@ -1,4 +1,4 @@
-/**
+/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,7 +7,7 @@
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -16,5 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
-export interface ProcessListApi {}
+export interface FormDetailsApi {
+ // forms details api
+}
diff --git a/packages/runtime-tools-components/src/common/contexts/BrandContext/BrandContext.ts b/packages/runtime-tools-process-enveloped-components/src/formDetails/api/FormDetailsChannelApi.ts
similarity index 71%
copy from packages/runtime-tools-components/src/common/contexts/BrandContext/BrandContext.ts
copy to packages/runtime-tools-process-enveloped-components/src/formDetails/api/FormDetailsChannelApi.ts
index 0acaacdc957..df106bdc811 100644
--- a/packages/runtime-tools-components/src/common/contexts/BrandContext/BrandContext.ts
+++ b/packages/runtime-tools-process-enveloped-components/src/formDetails/api/FormDetailsChannelApi.ts
@@ -17,13 +17,12 @@
* under the License.
*/
-import React, { useContext } from "react";
+import { Form, FormContent } from "@kie-tools/runtime-tools-shared-gateway-api/dist/types";
-export interface Brand {
- imageSrc: string;
- altText: string;
+/**
+ * Channel Api for Forms Details
+ */
+export interface FormDetailsChannelApi {
+ formDetails__getFormContent(formName: string): Promise<Form>;
+ formDetails__saveFormContent(formName: string, formContent: FormContent): Promise<void>;
}
-
-export const BrandContext = React.createContext<Brand>({} as Brand);
-
-export const useBrandContext = (): Brand => useContext<Brand>(BrandContext);
diff --git a/packages/runtime-tools-components/src/common/contexts/BrandContext/BrandContext.ts b/packages/runtime-tools-process-enveloped-components/src/formDetails/api/FormDetailsDriver.ts
similarity index 72%
copy from packages/runtime-tools-components/src/common/contexts/BrandContext/BrandContext.ts
copy to packages/runtime-tools-process-enveloped-components/src/formDetails/api/FormDetailsDriver.ts
index 0acaacdc957..4de01a4a62d 100644
--- a/packages/runtime-tools-components/src/common/contexts/BrandContext/BrandContext.ts
+++ b/packages/runtime-tools-process-enveloped-components/src/formDetails/api/FormDetailsDriver.ts
@@ -17,13 +17,12 @@
* under the License.
*/
-import React, { useContext } from "react";
+import { Form, FormContent } from "@kie-tools/runtime-tools-shared-gateway-api/dist/types";
-export interface Brand {
- imageSrc: string;
- altText: string;
+/**
+ * Interface that defines a Driver for FormDetails views.
+ */
+export interface FormDetailsDriver {
+ getFormContent(formName: string): Promise<Form>;
+ saveFormContent(formName: string, content: FormContent): void;
}
-
-export const BrandContext = React.createContext<Brand>({} as Brand);
-
-export const useBrandContext = (): Brand => useContext<Brand>(BrandContext);
diff --git a/packages/runtime-tools-shared-enveloped-components/src/formsList/api/FormsListDriver.ts b/packages/runtime-tools-process-enveloped-components/src/formDetails/api/FormDetailsEnvelopeApi.ts
similarity index 72%
copy from packages/runtime-tools-shared-enveloped-components/src/formsList/api/FormsListDriver.ts
copy to packages/runtime-tools-process-enveloped-components/src/formDetails/api/FormDetailsEnvelopeApi.ts
index 5ccda1dc084..766535aaf9b 100644
--- a/packages/runtime-tools-shared-enveloped-components/src/formsList/api/FormsListDriver.ts
+++ b/packages/runtime-tools-process-enveloped-components/src/formDetails/api/FormDetailsEnvelopeApi.ts
@@ -17,15 +17,20 @@
* under the License.
*/
-import { FormInfo } from "@kie-tools/runtime-tools-shared-gateway-api/src/types";
-import { FormFilter } from "./FormsListEnvelopeApi";
+import { FormInfo } from "@kie-tools/runtime-tools-shared-gateway-api/dist/types";
/**
- * Interface that defines a Driver for FormsList views.
+ * Envelope Api
*/
-export interface FormsListDriver {
- getFormFilter(): Promise<FormFilter>;
- applyFilter(formFilter: FormFilter): Promise<void>;
- getFormsQuery(): Promise<FormInfo[]>;
- openForm(formData: FormInfo): Promise<void>;
+export interface FormDetailsEnvelopeApi {
+ /**
+ * Initializes the envelope.
+ * @param association
+ */
+ formDetails__init(association: Association, formData: FormInfo): Promise<void>;
+}
+
+export interface Association {
+ origin: string;
+ envelopeServerId: string;
}
diff --git a/packages/runtime-tools-components/src/common/components/BulkList/index.ts b/packages/runtime-tools-process-enveloped-components/src/formDetails/api/index.ts
similarity index 83%
copy from packages/runtime-tools-components/src/common/components/BulkList/index.ts
copy to packages/runtime-tools-process-enveloped-components/src/formDetails/api/index.ts
index d2e3ca60a5a..a1515d2cbe4 100644
--- a/packages/runtime-tools-components/src/common/components/BulkList/index.ts
+++ b/packages/runtime-tools-process-enveloped-components/src/formDetails/api/index.ts
@@ -17,4 +17,7 @@
* under the License.
*/
-export * from "./BulkList";
+export * from "./FormDetailsApi";
+export * from "./FormDetailsChannelApi";
+export * from "./FormDetailsEnvelopeApi";
+export * from "./FormDetailsDriver";
diff --git a/packages/runtime-tools-process-enveloped-components/src/jobsManagement/embedded/EmbeddedJobsManagement.tsx b/packages/runtime-tools-process-enveloped-components/src/formDetails/embedded/EmbeddedFormDetails.tsx
similarity index 58%
copy from packages/runtime-tools-process-enveloped-components/src/jobsManagement/embedded/EmbeddedJobsManagement.tsx
copy to packages/runtime-tools-process-enveloped-components/src/formDetails/embedded/EmbeddedFormDetails.tsx
index 5518e8b8fde..4edb5b5d2e6 100644
--- a/packages/runtime-tools-process-enveloped-components/src/jobsManagement/embedded/EmbeddedJobsManagement.tsx
+++ b/packages/runtime-tools-process-enveloped-components/src/formDetails/embedded/EmbeddedFormDetails.tsx
@@ -1,4 +1,4 @@
-/**
+/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,7 +7,7 @@
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -16,32 +16,31 @@
* specific language governing permissions and limitations
* under the License.
*/
-import React, { useCallback, useMemo } from "react";
+import React, { useCallback } from "react";
import { EnvelopeServer } from "@kie-tools-core/envelope-bus/dist/channel";
import { EmbeddedEnvelopeProps, RefForwardingEmbeddedEnvelope } from "@kie-tools-core/envelope/dist/embedded";
+import { FormDetailsApi, FormDetailsChannelApi, FormDetailsEnvelopeApi, FormDetailsDriver } from "../api";
import { ContainerType } from "@kie-tools-core/envelope/dist/api";
import { init } from "../envelope";
-import { JobsManagementApi, JobsManagementChannelApi, JobsManagementEnvelopeApi, JobsManagementDriver } from "../api";
-import { JobsManagementChannelApiImpl } from "./JobsManagementChannelApiImpl";
-import { JobsManagementState } from "@kie-tools/runtime-tools-process-gateway-api/dist/types";
+import { FormInfo } from "@kie-tools/runtime-tools-shared-gateway-api/dist/types";
export interface Props {
targetOrigin: string;
- driver: JobsManagementDriver;
- initialState?: JobsManagementState;
+ channelApi: FormDetailsChannelApi;
+ formData: FormInfo;
}
-export const EmbeddedJobsManagement = React.forwardRef((props: Props, forwardedRef: React.Ref<JobsManagementApi>) => {
+export const EmbeddedFormDetails = React.forwardRef((props: Props, forwardedRef: React.Ref<FormDetailsApi>) => {
const refDelegate = useCallback(
- (envelopeServer: EnvelopeServer<JobsManagementChannelApi, JobsManagementEnvelopeApi>): JobsManagementApi => ({}),
+ (envelopeServer: EnvelopeServer<FormDetailsChannelApi, FormDetailsEnvelopeApi>): FormDetailsApi => ({}),
[]
);
const pollInit = useCallback(
- async (
- envelopeServer: EnvelopeServer<JobsManagementChannelApi, JobsManagementEnvelopeApi>,
+ (
+ envelopeServer: EnvelopeServer<FormDetailsChannelApi, FormDetailsEnvelopeApi>,
container: () => HTMLDivElement
) => {
- await init({
+ init({
config: {
containerType: ContainerType.DIV,
envelopeId: envelopeServer.id,
@@ -52,28 +51,25 @@ export const EmbeddedJobsManagement = React.forwardRef((props: Props, forwardedR
window.postMessage(message, targetOrigin!, transfer);
},
},
+ targetOrigin: props.targetOrigin,
});
-
- return await envelopeServer.envelopeApi.requests.jobsManagement__init(
+ return envelopeServer.envelopeApi.requests.formDetails__init(
{
origin: envelopeServer.origin,
envelopeServerId: envelopeServer.id,
},
- props.initialState
- ? {
- initialState: props.initialState,
- }
- : {}
+ {
+ ...props.formData,
+ }
);
},
- [props.initialState]
+ []
);
- const apiImpl = useMemo(() => new JobsManagementChannelApiImpl(props.driver), [props.driver]);
return (
- <EmbeddedJobsManagementEnvelope
+ <EmbeddedFormDetailsEnvelope
ref={forwardedRef}
- apiImpl={apiImpl}
+ apiImpl={props.channelApi}
origin={props.targetOrigin}
refDelegate={refDelegate}
pollInit={pollInit}
@@ -82,7 +78,7 @@ export const EmbeddedJobsManagement = React.forwardRef((props: Props, forwardedR
);
});
-const EmbeddedJobsManagementEnvelope = React.forwardRef<
- JobsManagementApi,
- EmbeddedEnvelopeProps<JobsManagementChannelApi, JobsManagementEnvelopeApi, JobsManagementApi>
+const EmbeddedFormDetailsEnvelope = React.forwardRef<
+ FormDetailsApi,
+ EmbeddedEnvelopeProps<FormDetailsChannelApi, FormDetailsEnvelopeApi, FormDetailsApi>
>(RefForwardingEmbeddedEnvelope);
diff --git a/packages/runtime-tools-components/src/common/components/BulkList/index.ts b/packages/runtime-tools-process-enveloped-components/src/formDetails/embedded/index.ts
similarity index 95%
copy from packages/runtime-tools-components/src/common/components/BulkList/index.ts
copy to packages/runtime-tools-process-enveloped-components/src/formDetails/embedded/index.ts
index d2e3ca60a5a..20c4fa9ffe4 100644
--- a/packages/runtime-tools-components/src/common/components/BulkList/index.ts
+++ b/packages/runtime-tools-process-enveloped-components/src/formDetails/embedded/index.ts
@@ -17,4 +17,4 @@
* under the License.
*/
-export * from "./BulkList";
+export * from "./EmbeddedFormDetails";
diff --git a/packages/runtime-tools-process-enveloped-components/src/processForm/envelope/ProcessFormEnvelope.tsx b/packages/runtime-tools-process-enveloped-components/src/formDetails/envelope/FormDetailsEnvelope.tsx
similarity index 62%
copy from packages/runtime-tools-process-enveloped-components/src/processForm/envelope/ProcessFormEnvelope.tsx
copy to packages/runtime-tools-process-enveloped-components/src/formDetails/envelope/FormDetailsEnvelope.tsx
index edfeabd168d..0a48cb65996 100644
--- a/packages/runtime-tools-process-enveloped-components/src/processForm/envelope/ProcessFormEnvelope.tsx
+++ b/packages/runtime-tools-process-enveloped-components/src/formDetails/envelope/FormDetailsEnvelope.tsx
@@ -1,4 +1,4 @@
-/**
+/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,7 +7,7 @@
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -16,21 +16,20 @@
* specific language governing permissions and limitations
* under the License.
*/
+
import * as React from "react";
import * as ReactDOM from "react-dom";
import { EnvelopeBus } from "@kie-tools-core/envelope-bus/dist/api";
+import { FormDetailsChannelApi, FormDetailsEnvelopeApi } from "../api";
+import { FormDetailsEnvelopeContext } from "./FormDetailsEnvelopeContext";
+import { FormDetailsEnvelopeView, FormDetailsEnvelopeViewApi } from "./FormDetailsEnvelopeView";
+import { FormDetailsEnvelopeApiImpl } from "./FormDetailsEnvelopeApiImpl";
import { Envelope, EnvelopeDivConfig } from "@kie-tools-core/envelope";
-import { ProcessFormChannelApi, ProcessFormEnvelopeApi } from "../api";
-import { ProcessFormEnvelopeContext } from "./ProcessFormEnvelopeContext";
-import { ProcessFormEnvelopeView, ProcessFormEnvelopeViewApi } from "./ProcessFormEnvelopeView";
-import { ProcessFormEnvelopeApiImpl } from "./ProcessFormEnvelopeApiImpl";
-
-import "./styles.css";
/**
* Function that starts an Envelope application.
*
- * @param args.container: The HTML element in which the ProcessForm will render
+ * @param args.container: The HTML element in which the FormDetails will render
* @param args.bus: The implementation of a `bus` that knows how to send messages to the Channel.
*
*/
@@ -39,37 +38,37 @@ export function init(args: {
container: HTMLDivElement;
bus: EnvelopeBus;
targetOrigin: string;
-}) {
+}): Promise<any> {
/**
* Creates a new generic Envelope, typed with the right interfaces.
*/
const envelope = new Envelope<
- ProcessFormEnvelopeApi,
- ProcessFormChannelApi,
- ProcessFormEnvelopeViewApi,
- ProcessFormEnvelopeContext
+ FormDetailsEnvelopeApi,
+ FormDetailsChannelApi,
+ FormDetailsEnvelopeViewApi,
+ FormDetailsEnvelopeContext
>(args.bus, args.config);
/**
- * Function that knows how to render a ProcessForm.
+ * Function that knows how to render a FormDetails.
* In this case, it's a React application, but any other framework can be used.
*
- * Returns a Promise<() => ProcessFormEnvelopeViewApi> that can be used in ProcessFormEnvelopeApiImpl.
+ * Returns a Promise<() => FormDetailsEnvelopeViewApi> that can be used in FormDetailsEnvelopeApiImpl.
*/
const envelopeViewDelegate = async () => {
- const ref = React.createRef<ProcessFormEnvelopeViewApi>();
- return new Promise<() => ProcessFormEnvelopeViewApi>((res) => {
- args.container.className = "kogito-process-form-container";
+ const ref = React.createRef<FormDetailsEnvelopeViewApi>();
+ return new Promise<() => FormDetailsEnvelopeViewApi>((res) => {
+ args.container.className = "kogito-form-details-container";
ReactDOM.render(
- <ProcessFormEnvelopeView ref={ref} channelApi={envelope.channelApi} targetOrigin={args.targetOrigin} />,
+ <FormDetailsEnvelopeView ref={ref} channelApi={envelope.channelApi} targetOrigin={args.targetOrigin} />,
args.container,
() => res(() => ref.current!)
);
});
};
- const context: ProcessFormEnvelopeContext = {};
+ const context: FormDetailsEnvelopeContext = {};
return envelope.start(envelopeViewDelegate, context, {
- create: (apiFactoryArgs) => new ProcessFormEnvelopeApiImpl(apiFactoryArgs),
+ create: (apiFactoryArgs) => new FormDetailsEnvelopeApiImpl(apiFactoryArgs),
});
}
diff --git a/packages/runtime-tools-process-enveloped-components/src/processList/envelope/ProcessListEnvelopeApiImpl.ts b/packages/runtime-tools-process-enveloped-components/src/formDetails/envelope/FormDetailsEnvelopeApiImpl.ts
similarity index 64%
copy from packages/runtime-tools-process-enveloped-components/src/processList/envelope/ProcessListEnvelopeApiImpl.ts
copy to packages/runtime-tools-process-enveloped-components/src/formDetails/envelope/FormDetailsEnvelopeApiImpl.ts
index 665eccff2e9..0170cd19808 100644
--- a/packages/runtime-tools-process-enveloped-components/src/processList/envelope/ProcessListEnvelopeApiImpl.ts
+++ b/packages/runtime-tools-process-enveloped-components/src/formDetails/envelope/FormDetailsEnvelopeApiImpl.ts
@@ -1,4 +1,4 @@
-/**
+/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,7 +7,7 @@
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -16,21 +16,25 @@
* specific language governing permissions and limitations
* under the License.
*/
+
import { EnvelopeApiFactoryArgs } from "@kie-tools-core/envelope";
-import { ProcessListEnvelopeViewApi } from "./ProcessListEnvelopeView";
-import { Association, ProcessListChannelApi, ProcessListEnvelopeApi, ProcessListInitArgs } from "../api";
-import { ProcessListEnvelopeContext } from "./ProcessListEnvelopeContext";
+import { FormDetailsEnvelopeViewApi } from "./FormDetailsEnvelopeView";
+import { Association, FormDetailsChannelApi, FormDetailsEnvelopeApi } from "../api";
+import { FormDetailsEnvelopeContext } from "./FormDetailsEnvelopeContext";
+import { FormInfo } from "@kie-tools/runtime-tools-shared-gateway-api/dist/types";
-export class ProcessListEnvelopeApiImpl implements ProcessListEnvelopeApi {
- private view: () => ProcessListEnvelopeViewApi;
+/**
+ * Implementation of the FormDetailsEnvelopeApi
+ */
+export class FormDetailsEnvelopeApiImpl implements FormDetailsEnvelopeApi {
+ private view: () => FormDetailsEnvelopeViewApi;
private capturedInitRequestYet = false;
-
constructor(
private readonly args: EnvelopeApiFactoryArgs<
- ProcessListEnvelopeApi,
- ProcessListChannelApi,
- ProcessListEnvelopeViewApi,
- ProcessListEnvelopeContext
+ FormDetailsEnvelopeApi,
+ FormDetailsChannelApi,
+ FormDetailsEnvelopeViewApi,
+ FormDetailsEnvelopeContext
>
) {}
@@ -42,15 +46,15 @@ export class ProcessListEnvelopeApiImpl implements ProcessListEnvelopeApi {
this.capturedInitRequestYet = true;
}
- public processList__init = async (association: Association, initArgs: ProcessListInitArgs): Promise<void> => {
+ formDetails__init = async (association: Association, formData: FormInfo): Promise<void> => {
this.args.envelopeClient.associate(association.origin, association.envelopeServerId);
- /* istanbul ignore if*/
+
if (this.hasCapturedInitRequestYet()) {
return;
}
this.ackCapturedInitRequest();
this.view = await this.args.viewDelegate();
- this.view().initialize(initArgs);
+ this.view().initialize(formData);
};
}
diff --git a/packages/runtime-tools-process-enveloped-components/src/taskInbox/envelope/TaskInboxEnvelopeContext.ts b/packages/runtime-tools-process-enveloped-components/src/formDetails/envelope/FormDetailsEnvelopeContext.ts
similarity index 90%
copy from packages/runtime-tools-process-enveloped-components/src/taskInbox/envelope/TaskInboxEnvelopeContext.ts
copy to packages/runtime-tools-process-enveloped-components/src/formDetails/envelope/FormDetailsEnvelopeContext.ts
index 10aa2d0636c..d60efc5d2a1 100644
--- a/packages/runtime-tools-process-enveloped-components/src/taskInbox/envelope/TaskInboxEnvelopeContext.ts
+++ b/packages/runtime-tools-process-enveloped-components/src/formDetails/envelope/FormDetailsEnvelopeContext.ts
@@ -1,4 +1,4 @@
-/**
+/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,7 +7,7 @@
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -16,8 +16,9 @@
* specific language governing permissions and limitations
* under the License.
*/
+
/**
* This is a convenience class that the Envelope view can use.
*/
// eslint-disable-next-line @typescript-eslint/no-empty-interface
-export interface TaskInboxEnvelopeContext {}
+export interface FormDetailsEnvelopeContext {}
diff --git a/packages/runtime-tools-process-enveloped-components/src/processForm/envelope/ProcessFormEnvelopeView.tsx b/packages/runtime-tools-process-enveloped-components/src/formDetails/envelope/FormDetailsEnvelopeView.tsx
similarity index 52%
copy from packages/runtime-tools-process-enveloped-components/src/processForm/envelope/ProcessFormEnvelopeView.tsx
copy to packages/runtime-tools-process-enveloped-components/src/formDetails/envelope/FormDetailsEnvelopeView.tsx
index 6c3e53bff08..2cecce79022 100644
--- a/packages/runtime-tools-process-enveloped-components/src/processForm/envelope/ProcessFormEnvelopeView.tsx
+++ b/packages/runtime-tools-process-enveloped-components/src/formDetails/envelope/FormDetailsEnvelopeView.tsx
@@ -1,4 +1,4 @@
-/**
+/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,7 +7,7 @@
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -16,48 +16,50 @@
* specific language governing permissions and limitations
* under the License.
*/
+
import React, { useImperativeHandle, useState } from "react";
import { MessageBusClientApi } from "@kie-tools-core/envelope-bus/dist/api";
-import { ProcessDefinition, ProcessFormChannelApi } from "../api";
+import { FormDetailsChannelApi } from "../api";
+import FormDetails from "./components/FormDetails/FormDetails";
import "@patternfly/patternfly/patternfly.css";
-import ProcessForm from "./components/ProcessForm/ProcessForm";
-import { ProcessFormEnvelopeViewDriver } from "./ProcessFormEnvelopeViewDriver";
+import FormDetailsContextProvider from "./components/contexts/FormDetailsContextProvider";
+import { FormInfo } from "@kie-tools/runtime-tools-shared-gateway-api/dist/types";
-export interface ProcessFormEnvelopeViewApi {
- initialize: (processDefinitionData: ProcessDefinition) => void;
+export interface FormDetailsEnvelopeViewApi {
+ initialize: (formData?: FormInfo) => void;
}
interface Props {
- channelApi: MessageBusClientApi<ProcessFormChannelApi>;
+ channelApi: MessageBusClientApi<FormDetailsChannelApi>;
targetOrigin: string;
}
-export const ProcessFormEnvelopeView = React.forwardRef<ProcessFormEnvelopeViewApi, Props>((props, forwardedRef) => {
+export const FormDetailsEnvelopeView = React.forwardRef<FormDetailsEnvelopeViewApi, Props>((props, forwardedRef) => {
const [isEnvelopeConnectedToChannel, setEnvelopeConnectedToChannel] = useState<boolean>(false);
- const [processDefinition, setProcessDefinition] = useState<ProcessDefinition>();
+ const [formData, setFormData] = useState<FormInfo>({} as FormInfo);
useImperativeHandle(
forwardedRef,
() => ({
- initialize: (processDefinitionData: ProcessDefinition) => {
- setProcessDefinition(processDefinitionData);
+ initialize: (form: FormInfo) => {
+ setFormData(form);
setEnvelopeConnectedToChannel(true);
},
}),
[]
);
- if (!processDefinition) {
- return <></>;
- }
-
return (
- <ProcessForm
- isEnvelopeConnectedToChannel={isEnvelopeConnectedToChannel}
- processDefinition={processDefinition}
- driver={new ProcessFormEnvelopeViewDriver(props.channelApi)}
- targetOrigin={props.targetOrigin}
- />
+ <React.Fragment>
+ <FormDetailsContextProvider>
+ <FormDetails
+ isEnvelopeConnectedToChannel={isEnvelopeConnectedToChannel}
+ channelApi={props.channelApi}
+ formData={formData}
+ targetOrigin={props.targetOrigin}
+ />
+ </FormDetailsContextProvider>
+ </React.Fragment>
);
});
-export default ProcessFormEnvelopeView;
+export default FormDetailsEnvelopeView;
diff --git a/packages/runtime-tools-process-enveloped-components/src/formDetails/envelope/components/FormDetails/FormDetails.tsx b/packages/runtime-tools-process-enveloped-components/src/formDetails/envelope/components/FormDetails/FormDetails.tsx
new file mode 100644
index 00000000000..8c61853abbb
--- /dev/null
+++ b/packages/runtime-tools-process-enveloped-components/src/formDetails/envelope/components/FormDetails/FormDetails.tsx
@@ -0,0 +1,233 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { KogitoSpinner } from "@kie-tools/runtime-tools-components/dist/components/KogitoSpinner";
+import { ServerErrors } from "@kie-tools/runtime-tools-components/dist/components/ServerErrors";
+import { componentOuiaProps, OUIAProps } from "@kie-tools/runtime-tools-components/dist/ouiaTools";
+import { Card } from "@patternfly/react-core/dist/js/components/Card";
+import {
+ Drawer,
+ DrawerContent,
+ DrawerContentBody,
+ DrawerHead,
+ DrawerPanelContent,
+} from "@patternfly/react-core/dist/js/components/Drawer";
+import { Tab, Tabs, TabTitleText } from "@patternfly/react-core/dist/js/components/Tabs";
+import isEmpty from "lodash/isEmpty";
+import React, { useEffect, useRef, useState, useCallback } from "react";
+import { Form, FormInfo } from "@kie-tools/runtime-tools-shared-gateway-api/dist/types";
+import { FormDetailsDriver } from "../../../api/FormDetailsDriver";
+import FormDisplayerContainer from "../../containers/FormDisplayerContainer/FormDisplayerContainer";
+import FormEditor from "../FormEditor/FormEditor";
+import { useFormDetailsContext } from "../contexts/FormDetailsContext";
+import { MessageBusClientApi } from "@kie-tools-core/envelope-bus/dist/api";
+import { FormDetailsChannelApi } from "../../../api";
+
+export interface FormDetailsProps {
+ isEnvelopeConnectedToChannel: boolean;
+ channelApi: MessageBusClientApi<FormDetailsChannelApi>;
+ formData: FormInfo;
+ targetOrigin: string;
+}
+
+export interface ResizableContent {
+ doResize: () => void;
+}
+
+const FormDetails: React.FC<FormDetailsProps & OUIAProps> = ({
+ isEnvelopeConnectedToChannel,
+ channelApi,
+ formData,
+ ouiaId,
+ ouiaSafe,
+ targetOrigin,
+}) => {
+ const [activeTab, setActiveTab] = useState<number>(0);
+ const [formContent, setFormContent] = useState<Form>({} as Form);
+ const [error, setError] = useState<any>(null);
+ const [isLoading, setIsLoading] = useState<boolean>(true);
+ const editorResize = useRef<ResizableContent>({} as ResizableContent);
+ const appContext = useFormDetailsContext();
+
+ const init = useCallback(async () => {
+ try {
+ if (formData) {
+ const response = await channelApi.requests.formDetails__getFormContent(formData.name);
+ setFormContent(response);
+ setIsLoading(false);
+ }
+ } catch (error) {
+ setError(error);
+ }
+ }, [channelApi.requests, formData]);
+
+ useEffect(() => {
+ if (isEnvelopeConnectedToChannel) {
+ init();
+ }
+ }, [init, isEnvelopeConnectedToChannel]);
+
+ const saveContent = useCallback(
+ (args: { isSource?: boolean; isConfig?: boolean }) => (content: string) => {
+ try {
+ setFormContent((prev) => {
+ if (args.isSource) {
+ const newForm = { ...prev, source: content };
+ channelApi.requests.formDetails__saveFormContent(formData.name, newForm);
+ appContext.updateContent(newForm);
+ return newForm;
+ }
+ if (args.isConfig) {
+ const newForm = { ...prev, configuration: { ...prev.configuration, resources: JSON.parse(content) } };
+ channelApi.requests.formDetails__saveFormContent(formData.name, newForm);
+ appContext.updateContent(newForm);
+ return newForm;
+ }
+ return prev;
+ });
+ } catch (error) {
+ setError(error);
+ }
+ },
+ [appContext, channelApi.requests, formData.name]
+ );
+
+ const onTabSelect = useCallback((_event: any, tabIndex: number): void => {
+ setActiveTab(tabIndex);
+ }, []);
+
+ const getSource = useCallback(() => {
+ if (!isEmpty(formContent)) {
+ return formContent?.source ?? "";
+ }
+ return "";
+ }, [formContent]);
+
+ const getType = useCallback(() => {
+ if (!isEmpty(formData)) {
+ return formData.type;
+ }
+ return "";
+ }, [formData]);
+
+ const getConfig = useCallback(() => {
+ if (!isEmpty(formContent)) {
+ return JSON.stringify(formContent?.configuration.resources, null, 2);
+ }
+ return "";
+ }, [formContent]);
+
+ const getFormLanguage = useCallback((args: { formType?: string; isSource?: boolean; isConfig?: boolean }) => {
+ if (args.isSource && args.formType) {
+ if (args.formType.toLowerCase() === "tsx") {
+ return "typescript";
+ }
+ if (args.formType.toLowerCase() === "html") {
+ return "html";
+ }
+ }
+ if (args.isConfig) {
+ return "json";
+ }
+ return "txt";
+ }, []);
+
+ return error ? (
+ <ServerErrors error={error} variant={"large"} />
+ ) : (
+ <div {...componentOuiaProps(ouiaId, "form-details", ouiaSafe)} style={{ height: "100%" }}>
+ {!isLoading ? (
+ <Drawer isStatic>
+ <DrawerContent
+ panelContent={
+ <DrawerPanelContent
+ isResizable
+ defaultSize={"800px"}
+ onResize={() => {
+ editorResize?.current?.doResize();
+ }}
+ >
+ <DrawerHead style={{ height: "100%" }}>
+ {formContent && Object.keys(formContent)[0] && Object.keys(formContent)[0].length > 0 && (
+ <span>
+ <FormDisplayerContainer formContent={formContent} targetOrigin={targetOrigin} />
+ </span>
+ )}
+ </DrawerHead>
+ </DrawerPanelContent>
+ }
+ >
+ <Tabs isFilled activeKey={activeTab} onSelect={onTabSelect}>
+ <Tab
+ eventKey={0}
+ title={<TabTitleText>Source</TabTitleText>}
+ id="source-tab"
+ aria-labelledby="source-tab"
+ >
+ <DrawerContentBody
+ style={{
+ padding: "0px",
+ background: "var(--pf-c-page__main-section--BackgroundColor)",
+ }}
+ >
+ {activeTab === 0 && (
+ <FormEditor
+ textContent={getSource()}
+ saveContent={saveContent({ isSource: true })}
+ formLanguage={getFormLanguage({ formType: getType(), isSource: true })}
+ ref={editorResize}
+ />
+ )}
+ </DrawerContentBody>
+ </Tab>
+ <Tab
+ eventKey={1}
+ title={<TabTitleText>Connections</TabTitleText>}
+ id="config-tab"
+ aria-labelledby="config-tab"
+ >
+ <DrawerContentBody
+ style={{
+ padding: "0px",
+ background: "var(--pf-c-page__main-section--BackgroundColor)",
+ }}
+ >
+ {activeTab === 1 && (
+ <FormEditor
+ textContent={getConfig()}
+ saveContent={saveContent({ isConfig: true })}
+ formLanguage={getFormLanguage({ isConfig: true })}
+ ref={editorResize}
+ />
+ )}
+ </DrawerContentBody>
+ </Tab>
+ </Tabs>
+ </DrawerContent>
+ </Drawer>
+ ) : (
+ <Card>
+ <KogitoSpinner spinnerText="Loading form ..." />
+ </Card>
+ )}
+ </div>
+ );
+};
+
+export default FormDetails;
diff --git a/packages/runtime-tools-process-enveloped-components/src/formDetails/envelope/components/FormEditor/FormEditor.tsx b/packages/runtime-tools-process-enveloped-components/src/formDetails/envelope/components/FormEditor/FormEditor.tsx
new file mode 100644
index 00000000000..10e4263c8d1
--- /dev/null
+++ b/packages/runtime-tools-process-enveloped-components/src/formDetails/envelope/components/FormEditor/FormEditor.tsx
@@ -0,0 +1,103 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { EditorTheme } from "@kie-tools-core/editor/dist/api";
+import { Button } from "@patternfly/react-core/dist/js/components/Button";
+import { Tooltip } from "@patternfly/react-core/dist/js/components/Tooltip";
+import { UndoIcon } from "@patternfly/react-icons/dist/js/icons/undo-icon";
+import { SaveIcon } from "@patternfly/react-icons/dist/js/icons/save-icon";
+import { RedoIcon } from "@patternfly/react-icons/dist/js/icons/redo-icon";
+import React, { useEffect, useImperativeHandle, useMemo, useRef, useState, useCallback } from "react";
+import { ResizableContent } from "../FormDetails/FormDetails";
+import "../styles.css";
+import { FormEditorEditorApi, FormEditorEditorController } from "./FormEditorController";
+
+function FormEditorControl(props: {
+ toolTipText: string;
+ onClick: () => void;
+ ariaLabel: string;
+ icon: React.ReactNode;
+}) {
+ return (
+ <Tooltip content={<div>{props.toolTipText}</div>}>
+ <Button onClick={props.onClick} variant="control" aria-label={props.ariaLabel}>
+ {props.icon}
+ </Button>
+ </Tooltip>
+ );
+}
+
+export interface FormEditorProps {
+ formLanguage: string;
+ textContent: string;
+ saveContent: (content: string) => void;
+}
+
+export const FormEditor = React.forwardRef<ResizableContent, FormEditorProps>(
+ ({ textContent, formLanguage, saveContent }, forwardedRef) => {
+ const [content, setContent] = useState<string>(textContent);
+ const container = useRef<HTMLDivElement>(null);
+
+ const controller: FormEditorEditorApi = useMemo<FormEditorEditorApi>(() => {
+ return new FormEditorEditorController(textContent, (args) => setContent(args.content), formLanguage, false);
+ }, [textContent, formLanguage]);
+
+ useEffect(() => {
+ if (container.current) {
+ controller.show(container.current, EditorTheme.LIGHT);
+ }
+
+ return () => {
+ controller.dispose();
+ };
+ }, [controller]);
+
+ useImperativeHandle(forwardedRef, () => controller, [controller]);
+
+ const onSaveFormContent = useCallback(() => {
+ saveContent(content);
+ }, [content, saveContent]);
+
+ const onUndo = useCallback(() => {
+ controller.undo();
+ }, [controller]);
+
+ const onRedo = useCallback(() => {
+ controller.redo();
+ }, [controller]);
+
+ return (
+ <>
+ <div>
+ <FormEditorControl
+ icon={<SaveIcon />}
+ ariaLabel="Save form"
+ toolTipText="Save form"
+ onClick={() => onSaveFormContent()}
+ />
+ <FormEditorControl icon={<UndoIcon />} ariaLabel="Undo changes" toolTipText="Undo changes" onClick={onUndo} />
+ <FormEditorControl icon={<RedoIcon />} ariaLabel="Redo changes" toolTipText="Redo changes" onClick={onRedo} />
+ </div>
+ <div className={"kogito-form-editor-container"} ref={container} style={{ height: "700px" }} />
+ </>
+ );
+ }
+);
+
+export default FormEditor;
diff --git a/packages/runtime-tools-components/src/common/components/RequestDataEditor/RequestDataEditorController.ts b/packages/runtime-tools-process-enveloped-components/src/formDetails/envelope/components/FormEditor/FormEditorController.tsx
similarity index 85%
rename from packages/runtime-tools-components/src/common/components/RequestDataEditor/RequestDataEditorController.ts
rename to packages/runtime-tools-process-enveloped-components/src/formDetails/envelope/components/FormEditor/FormEditorController.tsx
index e3b2bdd71d9..db95a40fffe 100644
--- a/packages/runtime-tools-components/src/common/components/RequestDataEditor/RequestDataEditorController.ts
+++ b/packages/runtime-tools-process-enveloped-components/src/formDetails/envelope/components/FormEditor/FormEditorController.tsx
@@ -16,13 +16,12 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+import React from "react";
import { EditorTheme } from "@kie-tools-core/editor/dist/api";
import { getOperatingSystem, OperatingSystem } from "@kie-tools-core/operating-system";
import { editor, KeyCode, KeyMod } from "monaco-editor";
-import { FileLanguage } from "@kie-tools/json-yaml-language-service/dist/api";
-export interface RequestDataEditorApi {
+export interface FormEditorEditorApi {
editor: editor.IStandaloneCodeEditor | undefined;
show: (container: HTMLDivElement, theme?: EditorTheme) => editor.IStandaloneCodeEditor;
undo: () => void;
@@ -32,33 +31,35 @@ export interface RequestDataEditorApi {
setTheme: (theme: EditorTheme) => void;
forceRedraw: () => void;
dispose: () => void;
+ doResize: () => void;
}
-export enum RequestDataEditorOperation {
+export enum FormEditorEditorOperation {
UNDO,
REDO,
EDIT,
}
-export interface RequestDataEditorInstance {
+export interface FormEditorEditorInstance {
instance: editor.IStandaloneCodeEditor;
}
-export class RequestDataEditorController implements RequestDataEditorApi {
+export class FormEditorEditorController implements FormEditorEditorApi {
private readonly model: editor.ITextModel;
public editor: editor.IStandaloneCodeEditor | undefined;
constructor(
content: string,
- private readonly onContentChange: (args: { content: string; operation: RequestDataEditorOperation }) => void,
+ private readonly onContentChange: (args: { content: string; operation: FormEditorEditorOperation }) => void,
+ private readonly language: string | undefined,
private readonly isReadOnly: boolean
) {
- this.model = editor.createModel(content, FileLanguage.JSON);
+ this.model = editor.createModel(content, language);
this.model.onDidChangeContent((event) => {
if (!event.isUndoing && !event.isRedoing) {
this.editor?.pushUndoStop();
- onContentChange({ content: this.model.getValue(), operation: RequestDataEditorOperation.EDIT });
+ onContentChange({ content: this.model.getValue(), operation: FormEditorEditorOperation.EDIT });
}
});
}
@@ -88,7 +89,7 @@ export class RequestDataEditorController implements RequestDataEditorApi {
this.editor = editor.create(container, {
model: this.model,
- language: FileLanguage.JSON,
+ language: this.language,
scrollBeyondLastLine: false,
automaticLayout: true,
fontSize: 14,
@@ -97,16 +98,16 @@ export class RequestDataEditorController implements RequestDataEditorApi {
});
this.editor.addCommand(KeyMod.CtrlCmd | KeyCode.KeyZ, () => {
- this.onContentChange({ content: this.model.getValue(), operation: RequestDataEditorOperation.UNDO });
+ this.onContentChange({ content: this.model.getValue(), operation: FormEditorEditorOperation.UNDO });
});
this.editor.addCommand(KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyZ, () => {
- this.onContentChange({ content: this.model.getValue(), operation: RequestDataEditorOperation.REDO });
+ this.onContentChange({ content: this.model.getValue(), operation: FormEditorEditorOperation.REDO });
});
if (getOperatingSystem() !== OperatingSystem.MACOS) {
this.editor.addCommand(KeyMod.CtrlCmd | KeyCode.KeyY, () => {
- this.onContentChange({ content: this.model.getValue(), operation: RequestDataEditorOperation.REDO });
+ this.onContentChange({ content: this.model.getValue(), operation: FormEditorEditorOperation.REDO });
});
}
@@ -125,6 +126,10 @@ export class RequestDataEditorController implements RequestDataEditorApi {
this.editor?.render(true);
}
+ public doResize() {
+ this.forceRedraw();
+ }
+
private getMonacoThemeByEditorTheme(theme?: EditorTheme): string {
switch (theme) {
case EditorTheme.DARK:
diff --git a/packages/runtime-tools-process-enveloped-components/src/formDetails/envelope/components/contexts/FormDetailsContext.tsx b/packages/runtime-tools-process-enveloped-components/src/formDetails/envelope/components/contexts/FormDetailsContext.tsx
new file mode 100644
index 00000000000..6ba25898ade
--- /dev/null
+++ b/packages/runtime-tools-process-enveloped-components/src/formDetails/envelope/components/contexts/FormDetailsContext.tsx
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import React, { useContext } from "react";
+import { Form } from "@kie-tools/runtime-tools-shared-gateway-api/dist/types";
+
+export interface FormDetailsContext {
+ updateContent(formContent: Form): void;
+ onUpdateContent(listener: UpdateContentListener): UnSubscribeHandler;
+}
+
+export interface UpdateContentListener {
+ onUpdateContent: (formContent: Form) => void;
+}
+
+export interface UnSubscribeHandler {
+ unSubscribe: () => void;
+}
+
+export class FormDetailsContextImpl implements FormDetailsContext {
+ private readonly updateContentListeners: UpdateContentListener[] = [];
+
+ updateContent(formContent: Form): void {
+ if (formContent) {
+ this.updateContentListeners.forEach((listener) => listener.onUpdateContent(formContent));
+ }
+ }
+
+ onUpdateContent(listener: UpdateContentListener): UnSubscribeHandler {
+ this.updateContentListeners.push(listener);
+
+ return {
+ unSubscribe: () => {
+ const index = this.updateContentListeners.indexOf(listener);
+ if (index > -1) {
+ this.updateContentListeners.splice(index, 1);
+ }
+ },
+ };
+ }
+}
+
+const RuntimeToolsFormDetailsContext = React.createContext<FormDetailsContext>({} as FormDetailsContext);
+
+export default RuntimeToolsFormDetailsContext;
+
+export const useFormDetailsContext = () => useContext<FormDetailsContext>(RuntimeToolsFormDetailsContext);
diff --git a/packages/runtime-tools-process-enveloped-components/src/processDefinitionList/api/ProcessDefinitionListApi.ts b/packages/runtime-tools-process-enveloped-components/src/formDetails/envelope/components/contexts/FormDetailsContextProvider.tsx
similarity index 63%
copy from packages/runtime-tools-process-enveloped-components/src/processDefinitionList/api/ProcessDefinitionListApi.ts
copy to packages/runtime-tools-process-enveloped-components/src/formDetails/envelope/components/contexts/FormDetailsContextProvider.tsx
index e70ba3170d7..b577fe1e61c 100644
--- a/packages/runtime-tools-process-enveloped-components/src/processDefinitionList/api/ProcessDefinitionListApi.ts
+++ b/packages/runtime-tools-process-enveloped-components/src/formDetails/envelope/components/contexts/FormDetailsContextProvider.tsx
@@ -1,4 +1,4 @@
-/**
+/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,7 +7,7 @@
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -17,7 +17,18 @@
* under the License.
*/
+import React from "react";
+import RuntimeToolsFormDetailsContext, { FormDetailsContextImpl } from "./FormDetailsContext";
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
-export interface ProcessDefinitionListApi {
- // process definition list api
-}
+interface IOwnProps {}
+
+const FormDetailsContextProvider: React.FC<IOwnProps> = ({ children }) => {
+ return (
+ <RuntimeToolsFormDetailsContext.Provider value={new FormDetailsContextImpl()}>
+ {children}
+ </RuntimeToolsFormDetailsContext.Provider>
+ );
+};
+
+export default FormDetailsContextProvider;
diff --git a/packages/runtime-tools-components/src/common/components/BulkList/index.ts b/packages/runtime-tools-process-enveloped-components/src/formDetails/envelope/components/styles.css
similarity index 85%
copy from packages/runtime-tools-components/src/common/components/BulkList/index.ts
copy to packages/runtime-tools-process-enveloped-components/src/formDetails/envelope/components/styles.css
index d2e3ca60a5a..3ee994ea7cc 100644
--- a/packages/runtime-tools-components/src/common/components/BulkList/index.ts
+++ b/packages/runtime-tools-process-enveloped-components/src/formDetails/envelope/components/styles.css
@@ -17,4 +17,10 @@
* under the License.
*/
-export * from "./BulkList";
+.pf-c-code-editor__controls > button:nth-child(1) {
+ color: #06c !important;
+}
+
+.kogito-form-details-container {
+ height: 100%;
+}
diff --git a/packages/runtime-tools-process-enveloped-components/src/formDetails/envelope/containers/FormDisplayerContainer/FormDisplayerContainer.tsx b/packages/runtime-tools-process-enveloped-components/src/formDetails/envelope/containers/FormDisplayerContainer/FormDisplayerContainer.tsx
new file mode 100644
index 00000000000..799ae9c13c8
--- /dev/null
+++ b/packages/runtime-tools-process-enveloped-components/src/formDetails/envelope/containers/FormDisplayerContainer/FormDisplayerContainer.tsx
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import React, { useEffect, useState } from "react";
+import { v4 as uuidv4 } from "uuid";
+import { Form } from "@kie-tools/runtime-tools-shared-gateway-api/dist/types";
+import { useFormDetailsContext } from "../../components/contexts/FormDetailsContext";
+import { buildTestContext } from "./utils/utils";
+import { EmbeddedFormDisplayer, FormDisplayerApi } from "../../../../formDisplayer";
+
+interface FormDisplayerContainerProps {
+ formContent: Form;
+ targetOrigin: string;
+}
+
+const FormDisplayerContainer: React.FC<FormDisplayerContainerProps> = ({ formContent, targetOrigin }) => {
+ const [displayerKey, setDisplayerKey] = useState<string>(uuidv4());
+ const appContext = useFormDetailsContext();
+ const formDisplayerApiRef = React.useRef<FormDisplayerApi>({} as FormDisplayerApi);
+
+ useEffect(() => {
+ const unsubscribeUserChange = appContext.onUpdateContent({
+ onUpdateContent(formContent) {
+ setDisplayerKey(uuidv4());
+ },
+ });
+ return () => {
+ unsubscribeUserChange.unSubscribe();
+ };
+ }, [appContext]);
+
+ return (
+ <EmbeddedFormDisplayer
+ targetOrigin={targetOrigin}
+ envelopePath={"resources/form-displayer.html"}
+ formContent={formContent}
+ context={buildTestContext(formContent)}
+ ref={formDisplayerApiRef}
+ key={displayerKey}
+ />
+ );
+};
+
+export default FormDisplayerContainer;
diff --git a/packages/runtime-tools-process-enveloped-components/src/taskForm/embedded/EmbeddedTaskFormChannelApiImpl.ts b/packages/runtime-tools-process-enveloped-components/src/formDetails/envelope/containers/FormDisplayerContainer/utils/utils.ts
similarity index 54%
copy from packages/runtime-tools-process-enveloped-components/src/taskForm/embedded/EmbeddedTaskFormChannelApiImpl.ts
copy to packages/runtime-tools-process-enveloped-components/src/formDetails/envelope/containers/FormDisplayerContainer/utils/utils.ts
index a5b2d7ebe8d..0b9a8e97f87 100644
--- a/packages/runtime-tools-process-enveloped-components/src/taskForm/embedded/EmbeddedTaskFormChannelApiImpl.ts
+++ b/packages/runtime-tools-process-enveloped-components/src/formDetails/envelope/containers/FormDisplayerContainer/utils/utils.ts
@@ -1,4 +1,4 @@
-/**
+/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,7 +7,7 @@
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -16,25 +16,32 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { Form } from "@kie-tools/runtime-tools-shared-gateway-api/dist/types";
-import { TaskFormChannelApi, TaskFormDriver } from "../api";
-
-export class EmbeddedTaskFormChannelApiImpl implements TaskFormChannelApi {
- constructor(private readonly driver: TaskFormDriver) {}
-
- taskForm__doSubmit(phase?: string, payload?: any): Promise<any> {
- return this.driver.doSubmit(phase, payload);
- }
- taskForm__getTaskFormSchema(): Promise<Record<string, any>> {
- return this.driver.getTaskFormSchema();
- }
-
- taskForm__getCustomForm(): Promise<Form> {
- return this.driver.getCustomForm();
- }
+import { Form } from "@kie-tools/runtime-tools-shared-gateway-api/dist/types";
+import { v4 as uuidv4 } from "uuid";
- taskForm__getTaskPhases(): Promise<string[]> {
- return this.driver.getTaskPhases();
- }
+export function buildTestContext(form: Form) {
+ return {
+ user: {
+ id: "test",
+ groups: ["group1", "group2"],
+ },
+ schema: JSON.parse(form.configuration.schema),
+ task: {
+ id: uuidv4(),
+ description: "task description",
+ name: "TaskName",
+ referenceName: "Task Name",
+ priority: "1",
+ processInstanceId: uuidv4(),
+ processId: "process",
+ rootProcessInstanceId: null,
+ rootProcessId: null,
+ state: "Ready",
+ completed: null,
+ started: Date.now(),
+ lastUpdate: Date.now(),
+ },
+ phases: ["abort", "claim", "complete", "skip"],
+ };
}
diff --git a/packages/runtime-tools-components/src/common/components/BulkList/index.ts b/packages/runtime-tools-process-enveloped-components/src/formDetails/envelope/index.ts
similarity index 95%
copy from packages/runtime-tools-components/src/common/components/BulkList/index.ts
copy to packages/runtime-tools-process-enveloped-components/src/formDetails/envelope/index.ts
index d2e3ca60a5a..343a9741d95 100644
--- a/packages/runtime-tools-components/src/common/components/BulkList/index.ts
+++ b/packages/runtime-tools-process-enveloped-components/src/formDetails/envelope/index.ts
@@ -17,4 +17,4 @@
* under the License.
*/
-export * from "./BulkList";
+export * from "./FormDetailsEnvelope";
diff --git a/packages/runtime-tools-process-enveloped-components/src/processDefinitionList/index.ts b/packages/runtime-tools-process-enveloped-components/src/formDetails/index.ts
similarity index 94%
copy from packages/runtime-tools-process-enveloped-components/src/processDefinitionList/index.ts
copy to packages/runtime-tools-process-enveloped-components/src/formDetails/index.ts
index 0fd0e2c0033..9ec2b34e9d1 100644
--- a/packages/runtime-tools-process-enveloped-components/src/processDefinitionList/index.ts
+++ b/packages/runtime-tools-process-enveloped-components/src/formDetails/index.ts
@@ -1,4 +1,4 @@
-/**
+/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,7 +7,7 @@
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+
export * from "./api";
export * from "./embedded";
export * from "./envelope";
diff --git a/packages/runtime-tools-components/src/common/contexts/BrandContext/BrandContext.ts b/packages/runtime-tools-process-enveloped-components/src/formDisplayer/api/FormDisplayerApi.ts
similarity index 73%
copy from packages/runtime-tools-components/src/common/contexts/BrandContext/BrandContext.ts
copy to packages/runtime-tools-process-enveloped-components/src/formDisplayer/api/FormDisplayerApi.ts
index 0acaacdc957..5cfb9b2c471 100644
--- a/packages/runtime-tools-components/src/common/contexts/BrandContext/BrandContext.ts
+++ b/packages/runtime-tools-process-enveloped-components/src/formDisplayer/api/FormDisplayerApi.ts
@@ -17,13 +17,12 @@
* under the License.
*/
-import React, { useContext } from "react";
+import { FormDisplayerInitArgs, FormSubmitContext, FormSubmitResponse } from "./types";
-export interface Brand {
- imageSrc: string;
- altText: string;
-}
+export interface FormDisplayerApi {
+ init: (args: FormDisplayerInitArgs) => void;
... 15051 lines suppressed ...
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org