From 1183aec54864c045a9b282be3f3d64e45f74bdb5 Mon Sep 17 00:00:00 2001 From: Hazim Arafa Date: Thu, 28 Nov 2024 09:43:40 -0800 Subject: [PATCH] fix(dashboard): use tenantId for router.push (#1167) - removed extra code that was merged to examples/ --- .../components/Modals/ExecuteWorkflowRun.tsx | 2 +- .../io/littlehorse/examples/UserTasksExample.java | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/dashboard/src/app/[tenantId]/(diagram)/components/Modals/ExecuteWorkflowRun.tsx b/dashboard/src/app/[tenantId]/(diagram)/components/Modals/ExecuteWorkflowRun.tsx index 6ee63587a..4d8b613b1 100644 --- a/dashboard/src/app/[tenantId]/(diagram)/components/Modals/ExecuteWorkflowRun.tsx +++ b/dashboard/src/app/[tenantId]/(diagram)/components/Modals/ExecuteWorkflowRun.tsx @@ -68,7 +68,7 @@ export const ExecuteWorkflowRun: FC = ({ data }) => { if (!wfRun.id) return toast.success('Workflow has been executed') setShowModal(false) - router.push(`/wfRun/${wfRun.id.id}`) + router.push(`/${tenantId}/wfRun/${wfRun.id.id}`) } catch (error: any) { toast.error(error.message?.split(':')?.[1]) } diff --git a/examples/user-tasks/src/main/java/io/littlehorse/examples/UserTasksExample.java b/examples/user-tasks/src/main/java/io/littlehorse/examples/UserTasksExample.java index 0a1d8cc77..54d32fc49 100644 --- a/examples/user-tasks/src/main/java/io/littlehorse/examples/UserTasksExample.java +++ b/examples/user-tasks/src/main/java/io/littlehorse/examples/UserTasksExample.java @@ -40,17 +40,6 @@ public void wf(WorkflowThread wf) { VariableType.BOOL ); - WfRunVariable temperature = wf.addVariable("temperature", VariableType.INT); - WfRunVariable isActive = wf.addVariable("is_active", VariableType.BOOL); - WfRunVariable price = wf.addVariable("price", VariableType.DOUBLE); - WfRunVariable metadata = wf.addVariable("metadata", VariableType.JSON_OBJ); - WfRunVariable tags = wf.addVariable("tags", VariableType.JSON_ARR); - WfRunVariable timestamp = wf.addVariable("timestamp", VariableType.INT); - WfRunVariable description = wf.addVariable("description", VariableType.STR); - WfRunVariable bytes = wf.addVariable("bytes", VariableType.BYTES); - WfRunVariable count = wf.addVariable("count", VariableType.INT); - WfRunVariable enabled = wf.addVariable("enabled", VariableType.BOOL); - // Get the IT Request UserTaskOutput formOutput = wf.assignUserTask( IT_REQUEST_FORM,