From a4f59be5b2f67df40e89a27abf6e6c50ca65853e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marius=20Vasile=20Vu=C8=99can?= Date: Wed, 14 Feb 2024 11:43:25 +0200 Subject: [PATCH 1/9] added includeCompositeRoot on the service --- .../Domain/Contracts/IWorkflowDefinitionService.cs | 2 +- .../Domain/Services/RemoteWorkflowDefinitionService.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/Elsa.Studio.Workflows.Core/Domain/Contracts/IWorkflowDefinitionService.cs b/src/modules/Elsa.Studio.Workflows.Core/Domain/Contracts/IWorkflowDefinitionService.cs index d22555f8..dfe274d1 100644 --- a/src/modules/Elsa.Studio.Workflows.Core/Domain/Contracts/IWorkflowDefinitionService.cs +++ b/src/modules/Elsa.Studio.Workflows.Core/Domain/Contracts/IWorkflowDefinitionService.cs @@ -31,7 +31,7 @@ public interface IWorkflowDefinitionService /// /// Finds all workflow definitions by their IDs. /// - Task> FindManyByIdAsync(IEnumerable ids, CancellationToken cancellationToken = default); + Task> FindManyByIdAsync(IEnumerable ids, bool includeCompositeRoot = false, CancellationToken cancellationToken = default); /// /// Saves a workflow definition. diff --git a/src/modules/Elsa.Studio.Workflows.Core/Domain/Services/RemoteWorkflowDefinitionService.cs b/src/modules/Elsa.Studio.Workflows.Core/Domain/Services/RemoteWorkflowDefinitionService.cs index e9de8370..8cc2c980 100644 --- a/src/modules/Elsa.Studio.Workflows.Core/Domain/Services/RemoteWorkflowDefinitionService.cs +++ b/src/modules/Elsa.Studio.Workflows.Core/Domain/Services/RemoteWorkflowDefinitionService.cs @@ -57,10 +57,10 @@ public async Task> ListAsync(ListWo } /// - public async Task> FindManyByIdAsync(IEnumerable ids, CancellationToken cancellationToken = default) + public async Task> FindManyByIdAsync(IEnumerable ids, bool includeCompositeRoot = false, CancellationToken cancellationToken = default) { var api = await GetApiAsync(cancellationToken); - var response = await api.GetManyByIdAsync(ids.ToList(), true, cancellationToken); + var response = await api.GetManyByIdAsync(ids.ToList(), includeCompositeRoot, cancellationToken); return response.Items; } From 919e368cc8eedfc1b389b6b3ef5fce476e2d0589 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marius=20Vasile=20Vu=C8=99can?= Date: Wed, 14 Feb 2024 16:31:56 +0200 Subject: [PATCH 2/9] Lazy loading draft --- .../WorkflowInstanceViewer/WorkflowInstanceViewer.razor | 4 +++- .../WorkflowInstanceViewer.razor.cs | 9 ++++++++- .../Shared/Components/DiagramDesignerWrapper.razor.cs | 6 ++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/modules/Elsa.Studio.Workflows/Components/WorkflowInstanceViewer/WorkflowInstanceViewer.razor b/src/modules/Elsa.Studio.Workflows/Components/WorkflowInstanceViewer/WorkflowInstanceViewer.razor index f8fa67a1..ef7e7196 100644 --- a/src/modules/Elsa.Studio.Workflows/Components/WorkflowInstanceViewer/WorkflowInstanceViewer.razor +++ b/src/modules/Elsa.Studio.Workflows/Components/WorkflowInstanceViewer/WorkflowInstanceViewer.razor @@ -1,6 +1,7 @@ @inherits StudioComponentBase @using Orientation = Radzen.Orientation + @@ -16,4 +17,5 @@ SelectedWorkflowExecutionLogRecord="SelectedJournalEntry" EditWorkflowDefinition="EditWorkflowDefinition"/> - \ No newline at end of file + + \ No newline at end of file diff --git a/src/modules/Elsa.Studio.Workflows/Components/WorkflowInstanceViewer/WorkflowInstanceViewer.razor.cs b/src/modules/Elsa.Studio.Workflows/Components/WorkflowInstanceViewer/WorkflowInstanceViewer.razor.cs index 7aa0a5e2..9a5b7cab 100644 --- a/src/modules/Elsa.Studio.Workflows/Components/WorkflowInstanceViewer/WorkflowInstanceViewer.razor.cs +++ b/src/modules/Elsa.Studio.Workflows/Components/WorkflowInstanceViewer/WorkflowInstanceViewer.razor.cs @@ -42,7 +42,7 @@ protected override async Task OnInitializedAsync() { var instance = await WorkflowInstanceService.GetAsync(InstanceId) ?? throw new InvalidOperationException($"Workflow instance with ID {InstanceId} not found."); var definitionVersionIds = new[] { instance.DefinitionVersionId }; - var response = await WorkflowDefinitionService.FindManyByIdAsync(definitionVersionIds); + var response = await WorkflowDefinitionService.FindManyByIdAsync(definitionVersionIds,false); _workflowInstances = new List { instance }; _workflowDefinitions = response.ToList(); await SelectWorkflowInstanceAsync(instance); @@ -88,4 +88,11 @@ private Task OnActivitySelected(JsonObject arg) Journal.ClearSelection(); return Task.CompletedTask; } + + public async Task UpdateWorkflowDefinitions() + { + var definitionVersionIds = new[] { "55af853ed220db6e" }; + var response = await WorkflowDefinitionService.FindManyByIdAsync(definitionVersionIds,true); + _workflowDefinitions = response.ToList(); + } } \ No newline at end of file diff --git a/src/modules/Elsa.Studio.Workflows/Shared/Components/DiagramDesignerWrapper.razor.cs b/src/modules/Elsa.Studio.Workflows/Shared/Components/DiagramDesignerWrapper.razor.cs index 95d3a9d2..fa0f39d7 100644 --- a/src/modules/Elsa.Studio.Workflows/Shared/Components/DiagramDesignerWrapper.razor.cs +++ b/src/modules/Elsa.Studio.Workflows/Shared/Components/DiagramDesignerWrapper.razor.cs @@ -10,6 +10,7 @@ using Elsa.Api.Client.Resources.ActivityDescriptors.Models; using Elsa.Api.Client.Shared.Models; using Elsa.Studio.Contracts; +using Elsa.Studio.Workflows.Components.WorkflowInstanceViewer; using Elsa.Studio.Workflows.Designer; using Elsa.Studio.Workflows.Designer.Models; using Elsa.Studio.Workflows.Domain.Contexts; @@ -77,6 +78,9 @@ public partial class DiagramDesignerWrapper /// [Parameter] public Func? GraphUpdated { get; set; } + + [CascadingParameter] + public WorkflowInstanceViewer? WorkflowInstanceViewer { get; set; } /// /// An event raised when the path changes. @@ -335,6 +339,8 @@ private async Task OnActivityDoubleClick(JsonObject activity) // If the activity is a workflow definition activity, then open the workflow definition editor. if (activity.GetWorkflowDefinitionId() != null) { + await WorkflowInstanceViewer.UpdateWorkflowDefinitions(); + await OnActivityEmbeddedPortSelected(new ActivityEmbeddedPortSelectedArgs(activity, "Root")); } } From 579fa59ad88976ff9941fc95d87084c856ddce37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marius=20Vasile=20Vu=C8=99can?= Date: Fri, 16 Feb 2024 16:14:50 +0200 Subject: [PATCH 3/9] Show input and output in the instance viewer and updated edit button to go inside the sub-workflow --- .../Extensions/ServiceCollectionExtensions.cs | 1 - .../Components/WorkflowInstanceDesigner.razor | 2 +- .../WorkflowInstanceDesigner.razor.cs | 35 +++++- .../Components/WorkflowInstanceDetails.razor | 72 ++++++++--- .../WorkflowInstanceDetails.razor.cs | 117 +++++++++++++++++- .../WorkflowInstanceWorkspace.razor | 3 +- .../WorkflowInstanceWorkspace.razor.cs | 7 +- .../WorkflowInstanceViewer.razor.cs | 9 +- .../DiagramDesignerWrapper.razor.cs | 3 - 9 files changed, 209 insertions(+), 40 deletions(-) diff --git a/src/modules/Elsa.Studio.Login/Extensions/ServiceCollectionExtensions.cs b/src/modules/Elsa.Studio.Login/Extensions/ServiceCollectionExtensions.cs index 83a364a5..d89aa0fb 100644 --- a/src/modules/Elsa.Studio.Login/Extensions/ServiceCollectionExtensions.cs +++ b/src/modules/Elsa.Studio.Login/Extensions/ServiceCollectionExtensions.cs @@ -1,4 +1,3 @@ -using Elsa.Api.Client.Contracts; using Elsa.Studio.Contracts; using Elsa.Studio.Login.ComponentProviders; using Elsa.Studio.Login.Contracts; diff --git a/src/modules/Elsa.Studio.Workflows/Components/WorkflowInstanceViewer/Components/WorkflowInstanceDesigner.razor b/src/modules/Elsa.Studio.Workflows/Components/WorkflowInstanceViewer/Components/WorkflowInstanceDesigner.razor index f22cee9e..5c581efe 100644 --- a/src/modules/Elsa.Studio.Workflows/Components/WorkflowInstanceViewer/Components/WorkflowInstanceDesigner.razor +++ b/src/modules/Elsa.Studio.Workflows/Components/WorkflowInstanceViewer/Components/WorkflowInstanceDesigner.razor @@ -10,7 +10,7 @@ + OnClick="@(() => OnEditClicked())"> diff --git a/src/modules/Elsa.Studio.Workflows/Components/WorkflowInstanceViewer/Components/WorkflowInstanceDesigner.razor.cs b/src/modules/Elsa.Studio.Workflows/Components/WorkflowInstanceViewer/Components/WorkflowInstanceDesigner.razor.cs index d0b78f72..08642575 100644 --- a/src/modules/Elsa.Studio.Workflows/Components/WorkflowInstanceViewer/Components/WorkflowInstanceDesigner.razor.cs +++ b/src/modules/Elsa.Studio.Workflows/Components/WorkflowInstanceViewer/Components/WorkflowInstanceDesigner.razor.cs @@ -1,3 +1,4 @@ +using System.Text.Json; using System.Text.Json.Nodes; using Elsa.Api.Client.Extensions; using Elsa.Api.Client.Resources.ActivityDescriptors.Models; @@ -71,6 +72,12 @@ public partial class WorkflowInstanceDesigner : IAsyncDisposable /// [Parameter] public EventCallback EditWorkflowDefinition { get; set; } + /// + /// Gets or sets the current selected sub-workflow. + /// + [Parameter] + public JsonObject? SelectedSubWorkflow { get; set; } = default!; + [Inject] private IActivityRegistry ActivityRegistry { get; set; } = default!; [Inject] private IDiagramDesignerService DiagramDesignerService { get; set; } = default!; [Inject] private IDomAccessor DomAccessor { get; set; } = default!; @@ -100,6 +107,16 @@ private RadzenSplitterPane ActivityPropertiesPane private MudTabs PropertyTabs { get; set; } = default!; private MudTabPanel EventsTabPanel { get; set; } = default!; + /// + /// Updates the selected sub-workflow. + /// + /// + public void UpdateSubWorkflow(JsonObject? obj) + { + SelectedSubWorkflow = obj; + StateHasChanged(); + } + /// protected override async Task OnInitializedAsync() { @@ -254,8 +271,24 @@ private async Task OnResize(RadzenSplitterResizeEventArgs arg) await UpdatePropertiesPaneHeightAsync(); } - private Task OnEditClicked(string definitionId) + private Task OnEditClicked() { + var definitionId = WorkflowDefinition!.DefinitionId; + + if (SelectedSubWorkflow != null) + { + var typeName = SelectedSubWorkflow.GetTypeName(); + var version = SelectedSubWorkflow.GetVersion(); + var descriptor = ActivityRegistry.Find(typeName, version); + var isWorkflowActivity = descriptor != null && + descriptor.CustomProperties.TryGetValue("RootType", out var rootTypeNameElement) && + ((JsonElement)rootTypeNameElement).GetString() == "WorkflowDefinitionActivity"; + if (isWorkflowActivity) + { + definitionId = SelectedSubWorkflow.GetWorkflowDefinitionId(); + } + } + var editWorkflowDefinition = this.EditWorkflowDefinition; if (editWorkflowDefinition.HasDelegate) diff --git a/src/modules/Elsa.Studio.Workflows/Components/WorkflowInstanceViewer/Components/WorkflowInstanceDetails.razor b/src/modules/Elsa.Studio.Workflows/Components/WorkflowInstanceViewer/Components/WorkflowInstanceDetails.razor index 9c6c0c31..06205c19 100644 --- a/src/modules/Elsa.Studio.Workflows/Components/WorkflowInstanceViewer/Components/WorkflowInstanceDetails.razor +++ b/src/modules/Elsa.Studio.Workflows/Components/WorkflowInstanceViewer/Components/WorkflowInstanceDetails.razor @@ -24,33 +24,67 @@ - - - Name - Type - Storage - Value - - - @context.Name - @context.GetTypeDisplayName() - @GetStorageDriverDisplayName(context.StorageDriverTypeName) - @GetVariableValue(context) - - +
+ @if (WorkflowVariableData.Any()) + { + + } + else + { No variables - - + } +
- Input output +
+ Inputs + @if (WorkflowInputData.Any()) + { + + } + else + { + + No inputs + + } +
+
+ Outputs + @if (WorkflowOutputData.Any()) + { + + } + else + { + + No outputs + + } +
+ @if (SubWorkflowInputData.Any()) + { + +
+ Sub-Workflow Inputs + +
+
+ } + @if (SubWorkflowOutputData.Any()) + { + +
+ Sub-Workflow Outputs + +
+
+ }
} \ No newline at end of file diff --git a/src/modules/Elsa.Studio.Workflows/Components/WorkflowInstanceViewer/Components/WorkflowInstanceDetails.razor.cs b/src/modules/Elsa.Studio.Workflows/Components/WorkflowInstanceViewer/Components/WorkflowInstanceDetails.razor.cs index 8e49f264..713a44de 100644 --- a/src/modules/Elsa.Studio.Workflows/Components/WorkflowInstanceViewer/Components/WorkflowInstanceDetails.razor.cs +++ b/src/modules/Elsa.Studio.Workflows/Components/WorkflowInstanceViewer/Components/WorkflowInstanceDetails.razor.cs @@ -1,6 +1,7 @@ using System.Text.Json; using System.Text.Json.Nodes; using Elsa.Api.Client.Extensions; +using Elsa.Api.Client.Resources.ActivityExecutions.Models; using Elsa.Api.Client.Resources.StorageDrivers.Models; using Elsa.Api.Client.Resources.WorkflowDefinitions.Models; using Elsa.Api.Client.Resources.WorkflowInstances.Enums; @@ -39,10 +40,17 @@ public partial class WorkflowInstanceDetails [Parameter] public JsonObject? SelectedSubWorkflow { get; set; } = default!; + /// + /// Gets or sets the current selected sub-workflow executions. + /// + [Parameter] + public ICollection? SelectedSubWorkflowExecutions { get; set; } = default!; + [Inject] private IStorageDriverService StorageDriverService { get; set; } = default!; [Inject] private IWorkflowInstanceObserverFactory WorkflowInstanceObserverFactory { get; set; } = default!; [Inject] private IWorkflowInstanceService WorkflowInstanceService { get; set; } = default!; [Inject] private IActivityRegistry ActivityRegistry { get; set; } = default!; + [Inject] private IActivityExecutionService ActivityExecutionService { get; set; } = default!; private IDictionary StorageDriverLookup { get; set; } = new Dictionary(); @@ -74,21 +82,59 @@ private IDictionary WorkflowInstanceData } } + private Dictionary WorkflowVariableData + { + get + { + if (WorkflowDefinition == null) + return new Dictionary(); + + return WorkflowDefinition.Variables.ToDictionary(entry => entry.Name, + entry => new DataPanelItem(@GetVariableValue(entry))); + } + } + + private Dictionary WorkflowInputData + { + get + { + if (_workflowInstance == null) + return new Dictionary(); + + return _workflowInstance.WorkflowState.Input.ToDictionary(entry => entry.Key, + entry => new DataPanelItem(entry.Value.ToString())); + } + } + + private Dictionary WorkflowOutputData + { + get + { + if (_workflowInstance == null) + return new Dictionary(); + + return _workflowInstance.WorkflowState.Output.ToDictionary(entry => entry.Key, + entry => new DataPanelItem(entry.Value.ToString())); + } + } + private Dictionary WorkflowInstanceSubWorkflowData { get { if (SelectedSubWorkflow == null) - return new (); + return new(); var typeName = SelectedSubWorkflow.GetTypeName(); var version = SelectedSubWorkflow.GetVersion(); var descriptor = ActivityRegistry.Find(typeName, version); - var isWorkflowActivity = descriptor != null && descriptor.CustomProperties.TryGetValue("RootType", out var rootTypeNameElement) && ((JsonElement)rootTypeNameElement).GetString() == "WorkflowDefinitionActivity"; + var isWorkflowActivity = descriptor != null && + descriptor.CustomProperties.TryGetValue("RootType", out var rootTypeNameElement) && + ((JsonElement)rootTypeNameElement).GetString() == "WorkflowDefinitionActivity"; var workflowDefinitionId = isWorkflowActivity ? SelectedSubWorkflow.GetWorkflowDefinitionId() : default; if (workflowDefinitionId == null) - return new (); + return new(); return new() { @@ -101,9 +147,72 @@ private Dictionary WorkflowInstanceSubWorkflowData } } - public void UpdateSubWorkflow(JsonObject? obj) + private Dictionary SubWorkflowInputData + { + get + { + if (SelectedSubWorkflowExecutions == null || SelectedSubWorkflow == null) + return new Dictionary(); + + var execution = SelectedSubWorkflowExecutions.LastOrDefault(); + var inputData = new Dictionary(); + var activityState = execution?.ActivityState; + if (activityState != null) + { + var activityDescriptor = + ActivityRegistry.Find(SelectedSubWorkflow.GetTypeName(), SelectedSubWorkflow.GetVersion())!; + foreach (var inputDescriptor in activityDescriptor.Inputs) + { + var inputValue = activityState.TryGetValue(inputDescriptor.Name, out var value) ? value : default; + inputData[inputDescriptor.Name] = new(inputValue?.ToString()); + } + } + + return inputData; + } + } + + private Dictionary SubWorkflowOutputData + { + get + { + if (SelectedSubWorkflowExecutions == null || SelectedSubWorkflow == null) + return new Dictionary(); + + var execution = SelectedSubWorkflowExecutions.LastOrDefault(); + var outputData = new Dictionary(); + + if (execution != null) + { + var outputs = execution.Outputs; + var activityDescriptor = + ActivityRegistry.Find(SelectedSubWorkflow.GetTypeName(), SelectedSubWorkflow.GetVersion())!; + var outputDescriptors = activityDescriptor.Outputs; + + foreach (var outputDescriptor in outputDescriptors) + { + var outputValue = outputs != null + ? outputs.TryGetValue(outputDescriptor.Name, out var value) ? value : default + : default; + outputData[outputDescriptor.Name] = new(outputValue?.ToString()); + } + } + + return outputData; + } + } + + /// + /// Updates the selected sub-workflow. + /// + /// + public async Task UpdateSubWorkflowAsync(JsonObject? obj) { SelectedSubWorkflow = obj; + SelectedSubWorkflowExecutions = obj == null + ? null + : (await InvokeWithBlazorServiceContext(() => + ActivityExecutionService.ListAsync(WorkflowInstance!.Id, obj.GetNodeId()!))).ToList(); StateHasChanged(); } diff --git a/src/modules/Elsa.Studio.Workflows/Components/WorkflowInstanceViewer/Components/WorkflowInstanceWorkspace.razor b/src/modules/Elsa.Studio.Workflows/Components/WorkflowInstanceViewer/Components/WorkflowInstanceWorkspace.razor index 9afce602..bbc33509 100644 --- a/src/modules/Elsa.Studio.Workflows/Components/WorkflowInstanceViewer/Components/WorkflowInstanceWorkspace.razor +++ b/src/modules/Elsa.Studio.Workflows/Components/WorkflowInstanceViewer/Components/WorkflowInstanceWorkspace.razor @@ -19,6 +19,7 @@ var definition = WorkflowDefinitions.First(x => x.Id == workflowInstance.DefinitionVersionId); - + diff --git a/src/modules/Elsa.Studio.Workflows/Components/WorkflowInstanceViewer/Components/WorkflowInstanceWorkspace.razor.cs b/src/modules/Elsa.Studio.Workflows/Components/WorkflowInstanceViewer/Components/WorkflowInstanceWorkspace.razor.cs index 34bfd34c..f3522ae2 100644 --- a/src/modules/Elsa.Studio.Workflows/Components/WorkflowInstanceViewer/Components/WorkflowInstanceWorkspace.razor.cs +++ b/src/modules/Elsa.Studio.Workflows/Components/WorkflowInstanceViewer/Components/WorkflowInstanceWorkspace.razor.cs @@ -1,5 +1,6 @@ using System.Text.Json.Nodes; using Elsa.Api.Client.Extensions; +using Elsa.Api.Client.Resources.ActivityExecutions.Models; using Elsa.Api.Client.Resources.WorkflowDefinitions.Models; using Elsa.Api.Client.Resources.WorkflowInstances.Models; using Elsa.Studio.Workflows.Components.WorkflowDefinitionEditor.Components; @@ -15,6 +16,7 @@ public partial class WorkflowInstanceWorkspace : IWorkspace { private MudDynamicTabs _dynamicTabs = default!; private WorkflowInstanceDetails _workflowInstanceDetails = default!; + private WorkflowInstanceDesigner _workflowInstanceDesigner = default!; [Parameter] public IList WorkflowInstances { get; set; } = default!; [Parameter] public IList WorkflowDefinitions { get; set; } = default!; @@ -36,7 +38,7 @@ public partial class WorkflowInstanceWorkspace : IWorkspace ActiveTabIndex >= 0 && ActiveTabIndex < WorkflowInstances.Count ? WorkflowInstances.ElementAtOrDefault(ActiveTabIndex) : default; - + private WorkflowDefinition? SelectedWorkflowDefinition { get @@ -66,7 +68,8 @@ private async Task OnActivePanelIndexChanged(int value) private async Task OnPathChanged(DesignerPathChangedArgs args) { - _workflowInstanceDetails.UpdateSubWorkflow(args.CurrentActivity); + await _workflowInstanceDetails.UpdateSubWorkflowAsync(args.CurrentActivity); + _workflowInstanceDesigner.UpdateSubWorkflow(args.CurrentActivity); if (PathChanged != null) await PathChanged(args); diff --git a/src/modules/Elsa.Studio.Workflows/Components/WorkflowInstanceViewer/WorkflowInstanceViewer.razor.cs b/src/modules/Elsa.Studio.Workflows/Components/WorkflowInstanceViewer/WorkflowInstanceViewer.razor.cs index 9a5b7cab..af38ecf1 100644 --- a/src/modules/Elsa.Studio.Workflows/Components/WorkflowInstanceViewer/WorkflowInstanceViewer.razor.cs +++ b/src/modules/Elsa.Studio.Workflows/Components/WorkflowInstanceViewer/WorkflowInstanceViewer.razor.cs @@ -42,7 +42,7 @@ protected override async Task OnInitializedAsync() { var instance = await WorkflowInstanceService.GetAsync(InstanceId) ?? throw new InvalidOperationException($"Workflow instance with ID {InstanceId} not found."); var definitionVersionIds = new[] { instance.DefinitionVersionId }; - var response = await WorkflowDefinitionService.FindManyByIdAsync(definitionVersionIds,false); + var response = await WorkflowDefinitionService.FindManyByIdAsync(definitionVersionIds, true); _workflowInstances = new List { instance }; _workflowDefinitions = response.ToList(); await SelectWorkflowInstanceAsync(instance); @@ -88,11 +88,4 @@ private Task OnActivitySelected(JsonObject arg) Journal.ClearSelection(); return Task.CompletedTask; } - - public async Task UpdateWorkflowDefinitions() - { - var definitionVersionIds = new[] { "55af853ed220db6e" }; - var response = await WorkflowDefinitionService.FindManyByIdAsync(definitionVersionIds,true); - _workflowDefinitions = response.ToList(); - } } \ No newline at end of file diff --git a/src/modules/Elsa.Studio.Workflows/Shared/Components/DiagramDesignerWrapper.razor.cs b/src/modules/Elsa.Studio.Workflows/Shared/Components/DiagramDesignerWrapper.razor.cs index fa0f39d7..fd8a3321 100644 --- a/src/modules/Elsa.Studio.Workflows/Shared/Components/DiagramDesignerWrapper.razor.cs +++ b/src/modules/Elsa.Studio.Workflows/Shared/Components/DiagramDesignerWrapper.razor.cs @@ -4,7 +4,6 @@ using System.Text.Json; using System.Text.Json.Nodes; using System.Threading.Tasks; -using Elsa.Api.Client.Contracts; using Elsa.Api.Client.Extensions; using Elsa.Api.Client.Resources.ActivityDescriptors.Enums; using Elsa.Api.Client.Resources.ActivityDescriptors.Models; @@ -339,8 +338,6 @@ private async Task OnActivityDoubleClick(JsonObject activity) // If the activity is a workflow definition activity, then open the workflow definition editor. if (activity.GetWorkflowDefinitionId() != null) { - await WorkflowInstanceViewer.UpdateWorkflowDefinitions(); - await OnActivityEmbeddedPortSelected(new ActivityEmbeddedPortSelectedArgs(activity, "Root")); } } From a4e1c1bab966c1fd386234e29dcbb66a3f167477 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marius=20Vasile=20Vu=C8=99can?= Date: Fri, 16 Feb 2024 16:19:12 +0200 Subject: [PATCH 4/9] Removed code --- .../WorkflowInstanceViewer/WorkflowInstanceViewer.razor | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/modules/Elsa.Studio.Workflows/Components/WorkflowInstanceViewer/WorkflowInstanceViewer.razor b/src/modules/Elsa.Studio.Workflows/Components/WorkflowInstanceViewer/WorkflowInstanceViewer.razor index ef7e7196..f8fa67a1 100644 --- a/src/modules/Elsa.Studio.Workflows/Components/WorkflowInstanceViewer/WorkflowInstanceViewer.razor +++ b/src/modules/Elsa.Studio.Workflows/Components/WorkflowInstanceViewer/WorkflowInstanceViewer.razor @@ -1,7 +1,6 @@ @inherits StudioComponentBase @using Orientation = Radzen.Orientation - @@ -17,5 +16,4 @@ SelectedWorkflowExecutionLogRecord="SelectedJournalEntry" EditWorkflowDefinition="EditWorkflowDefinition"/> - - \ No newline at end of file + \ No newline at end of file From 1d4b163210ebfec36ff2dc491653fa23274b844a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marius=20Vasile=20Vu=C8=99can?= Date: Fri, 16 Feb 2024 16:23:39 +0200 Subject: [PATCH 5/9] Removed unused code --- .../Shared/Components/DiagramDesignerWrapper.razor.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/modules/Elsa.Studio.Workflows/Shared/Components/DiagramDesignerWrapper.razor.cs b/src/modules/Elsa.Studio.Workflows/Shared/Components/DiagramDesignerWrapper.razor.cs index fd8a3321..6745b08f 100644 --- a/src/modules/Elsa.Studio.Workflows/Shared/Components/DiagramDesignerWrapper.razor.cs +++ b/src/modules/Elsa.Studio.Workflows/Shared/Components/DiagramDesignerWrapper.razor.cs @@ -77,9 +77,6 @@ public partial class DiagramDesignerWrapper /// [Parameter] public Func? GraphUpdated { get; set; } - - [CascadingParameter] - public WorkflowInstanceViewer? WorkflowInstanceViewer { get; set; } /// /// An event raised when the path changes. From d98bf678965d628a48170020a94e9084181c547c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marius=20Vasile=20Vu=C8=99can?= Date: Fri, 16 Feb 2024 16:33:21 +0200 Subject: [PATCH 6/9] Fixed padding --- .../Components/WorkflowInstanceDetails.razor | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/modules/Elsa.Studio.Workflows/Components/WorkflowInstanceViewer/Components/WorkflowInstanceDetails.razor b/src/modules/Elsa.Studio.Workflows/Components/WorkflowInstanceViewer/Components/WorkflowInstanceDetails.razor index 06205c19..c7a35e58 100644 --- a/src/modules/Elsa.Studio.Workflows/Components/WorkflowInstanceViewer/Components/WorkflowInstanceDetails.razor +++ b/src/modules/Elsa.Studio.Workflows/Components/WorkflowInstanceViewer/Components/WorkflowInstanceDetails.razor @@ -67,24 +67,22 @@ } - @if (SubWorkflowInputData.Any()) - { - + + @if (SubWorkflowInputData.Any()) + {
Sub-Workflow Inputs
-
- } - @if (SubWorkflowOutputData.Any()) - { - + } + @if (SubWorkflowOutputData.Any()) + {
Sub-Workflow Outputs
-
- } + } +
} \ No newline at end of file From c536aee1690698c294de34c006d8802bd4bff649 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marius=20Vasile=20Vu=C8=99can?= Date: Mon, 19 Feb 2024 09:07:04 +0200 Subject: [PATCH 7/9] Updated client package --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index ba4698ea..2fcf4956 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -16,7 +16,7 @@ - + From 44a9bb9cf539d7f26427bb175161efb803bbbeb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marius=20Vasile=20Vu=C8=99can?= Date: Mon, 19 Feb 2024 09:27:39 +0200 Subject: [PATCH 8/9] Updated package --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 2fcf4956..aacafd39 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -16,7 +16,7 @@ - + From fcd2383ecd4fd31959512ee13e2f6baa9b88c6a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marius=20Vasile=20Vu=C8=99can?= Date: Mon, 19 Feb 2024 09:37:25 +0200 Subject: [PATCH 9/9] Remove whitespace --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 25a988af..10bf72ee 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -21,7 +21,7 @@ - +