-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from jxnkwlp/feature/definition-import-export
💡 workflow definition batch import & export
- Loading branch information
Showing
32 changed files
with
2,272 additions
and
1,163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
...nd.Abp.ElsaModule.Application.Contracts/WorkflowDefinitions/WorkflowDefinitionBasicDto.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System; | ||
using Elsa.Models; | ||
using Volo.Abp.Application.Dtos; | ||
|
||
namespace Passingwind.Abp.ElsaModule.WorkflowDefinitions; | ||
|
||
public class WorkflowDefinitionBasicDto : AuditedEntityDto<Guid> | ||
{ | ||
public string Name { get; set; } | ||
|
||
public string DisplayName { get; set; } | ||
|
||
public string Description { get; set; } | ||
|
||
public int LatestVersion { get; set; } | ||
|
||
public int? PublishedVersion { get; set; } | ||
|
||
public bool IsSingleton { get; set; } | ||
|
||
public bool DeleteCompletedInstances { get; set; } | ||
|
||
public string Channel { get; set; } | ||
|
||
public string Tag { get; set; } | ||
|
||
public WorkflowPersistenceBehavior PersistenceBehavior { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
...lsaModule.Application.Contracts/WorkflowDefinitions/WorkflowDefinitionExportRequestDto.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
using System; | ||
|
||
namespace Passingwind.Abp.ElsaModule.WorkflowDefinitions; | ||
|
||
public class WorkflowDefinitionExportRequestDto | ||
{ | ||
public Guid[] Ids { get; set; } | ||
//public string Format { get; set; } | ||
} |
12 changes: 12 additions & 0 deletions
12
...lsaModule.Application.Contracts/WorkflowDefinitions/WorkflowDefinitionImportRequestDto.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System.ComponentModel.DataAnnotations; | ||
using Volo.Abp.Content; | ||
|
||
namespace Passingwind.Abp.ElsaModule.WorkflowDefinitions; | ||
|
||
public class WorkflowDefinitionImportRequestDto | ||
{ | ||
[Required] | ||
public IRemoteStreamContent File { get; set; } | ||
|
||
public bool Overwrite { get; set; } | ||
} |
45 changes: 45 additions & 0 deletions
45
...ElsaModule.Application.Contracts/WorkflowDefinitions/WorkflowDefinitionImportResultDto.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace Passingwind.Abp.ElsaModule.WorkflowDefinitions; | ||
|
||
public class WorkflowDefinitionImportResultDto | ||
{ | ||
public int TotalCount { get; set; } | ||
public int SuccessCount { get; set; } | ||
public int FailedCount { get; set; } | ||
|
||
public List<WorkflowImportResult> Results { get; set; } | ||
|
||
public class WorkflowImportResult | ||
{ | ||
public string FileName { get; set; } | ||
public bool HasError { get; set; } | ||
public string ErrorMessage { get; set; } | ||
public WorkflowDefinitionBasicDto Workflow { get; set; } | ||
} | ||
|
||
public WorkflowDefinitionImportResultDto() | ||
{ | ||
Results = new List<WorkflowImportResult>(); | ||
} | ||
|
||
public void Add(string fileName, WorkflowDefinitionBasicDto workflow) | ||
{ | ||
Results.Add(new WorkflowImportResult | ||
{ | ||
Workflow = workflow, | ||
HasError = false, | ||
FileName = fileName, | ||
}); | ||
} | ||
|
||
public void Add(string fileName, string errorMessage) | ||
{ | ||
Results.Add(new WorkflowImportResult | ||
{ | ||
HasError = true, | ||
ErrorMessage = errorMessage, | ||
FileName = fileName, | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.