Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds workflow publishing validation enhancements.
=== auto-pr-body ===
Summary:
This pull request includes the following enhancements:
Func<TSuccess, Task>/Action<TSuccess>
andFunc<TFailure, Task>/Action<TFailure>
.[CascadingParameter]
attribute to the DragDropManager property,[Parameter]
attributes to the workflow definition and workflow definition updated properties, and constructor and properties to ActivityDisplaySettings class.Task<WorkflowDefinition>
toTask<Result<WorkflowDefinition, ValidationErrors>>
and added two new properties to DefaultActivityColors class.OnFileSelected
to set the_isDirty
flag tofalse
, andOnCreateWorkflowClicked
to use theResult
object to handle the result from theCreateNewDefinitionAsync
operation.List of Changes:
Func<TSuccess, Task>/Action<TSuccess>
andFunc<TFailure, Task>/Action<TFailure>
.[CascadingParameter]
attribute to the DragDropManager property,[Parameter]
attributes to the workflow definition and workflow definition updated properties, and constructor and properties to ActivityDisplaySettings class.Task<WorkflowDefinition>
toTask<Result<WorkflowDefinition, ValidationErrors>>
and added two new properties to DefaultActivityColors class.OnFileSelected
to set the_isDirty
flag tofalse
, andOnCreateWorkflowClicked
to use theResult
object to handle the result from theCreateNewDefinitionAsync
operation.Refactoring Target:
Func<TSuccess, Task>
andAction<TSuccess>
andFunc<TFailure, Task>
andAction<TFailure>
into their own functions for improved readability.Func<TSuccess, Task>
andAction<TSuccess>
andFunc<TFailure, Task>
andAction<TFailure>
to be more expressive and descriptive of the functionality they represent.SaveChangesAsync
method for both theSaveAsync
andPublishAsync
methods, that receives abool readDiagram
,bool showLoader
andbool publish
parameter, and returns aResult<WorkflowDefinition, ValidationErrors>
type.SaveAsync
,PublishAsync
andRetractAsync
methods.NotifyWorkflowChangedAsync
method to indicate the task it performs (e.g. 'InitializeWorkflowAsync`) and include all the logic it previously contained (selecting the activity, etc.).OnCreateWorkflowClicked
to ensure that the result of theCreateNewDefinitionAsync
operation is handled properly.RetractAsync
operation inOnRetractClicked
to handle any potential errors.