Skip to content

Commit

Permalink
🐛 fix lost variables when update definition
Browse files Browse the repository at this point in the history
  • Loading branch information
jxnkwlp committed Sep 24, 2023
1 parent 3f6bea4 commit d05e6a9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
Expand Up @@ -29,7 +29,5 @@ public class WorkflowDefinitionCreateOrUpdateDto

public WorkflowPersistenceBehavior PersistenceBehavior { get; set; } = WorkflowPersistenceBehavior.WorkflowBurst;

public WorkflowContextOptions ContextOptions { get; set; }

public Dictionary<string, object> Variables { get; set; }
public WorkflowContextOptions ContextOptions { get; set; }

Check warning on line 32 in src/Passingwind.Abp.ElsaModule.Application.Contracts/WorkflowDefinitions/WorkflowDefinitionCreateOrUpdateDto.cs

View workflow job for this annotation

GitHub Actions / build

Remove trailing white-space. (https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1037)

Check warning on line 32 in src/Passingwind.Abp.ElsaModule.Application.Contracts/WorkflowDefinitions/WorkflowDefinitionCreateOrUpdateDto.cs

View workflow job for this annotation

GitHub Actions / build

Remove trailing white-space. (https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1037)
}
Expand Up @@ -33,7 +33,5 @@ public class WorkflowDefinitionDto : AuditedEntityDto<Guid>

public WorkflowContextOptions ContextOptions { get; set; }

public Dictionary<string, object> Variables { get; set; }

public Dictionary<string, object> CustomAttributes { get; set; }
}
Expand Up @@ -7,11 +7,16 @@ namespace Passingwind.Abp.ElsaModule.WorkflowDefinitions;
public class WorkflowDefinitionVersionCreateOrUpdateDto
{
[Required]
public WorkflowDefinitionCreateOrUpdateDto Definition { get; set; }
public WorkflowDefinitionDto Definition { get; set; }

public List<ActivityCreateOrUpdateDto> Activities { get; set; }

public List<ActivityConnectionCreateDto> Connections { get; set; }

public bool IsPublished { get; set; }

public class WorkflowDefinitionDto : WorkflowDefinitionCreateOrUpdateDto
{
public Dictionary<string, object> Variables { get; set; }
}
}
Expand Up @@ -369,7 +369,7 @@ public virtual async Task<WorkflowDefinitionDto> UpdateDefinitionAsync(Guid id,
input.Tag,
input.PersistenceBehavior,
input.ContextOptions,
input.Variables,
entity.Variables,
entity.CustomAttributes);

// check name
Expand Down

0 comments on commit d05e6a9

Please sign in to comment.