Closed ikarakayali closed 1 month ago
The recent updates focus on enhancing JSON serialization, improving error handling, and transitioning to async operations across various components. Major changes include introducing JSON serialization options in TemplateEngineHelper
and modifying the WorkflowService
to support asynchronous updates and new identity handling logic. The PageComponentMapper
class now uses JsonSerializer
with a specified MaxDepth
, and the Program
file sets JSON serialization settings application-wide.
Files/Paths | Change Summary |
---|---|
amorphie.workflow.core/.../TemplateEngineHelper.cs |
Added jsonOptions and newtonSoftOpt for JSON serialization, adjusted TemplateEngineForm method for better JSON handling, and introduced TemplateEngineFormWithoutJson method. |
amorphie.workflow.core/.../PageComponentMapper.cs |
Changed class visibility, updated ConvertToDynamic method to use JsonSerializer with MaxDepth set to 256. |
amorphie.workflow.service/.../IWorkflowService.cs |
Modified Update method to UpdateAsync returning a Task . |
amorphie.workflow.service/.../WorkflowService.cs |
Added dependency on amorphie.core.Identity , updated constructor, changed Update to UpdateAsync , added logic for versioning in SaveAsync , and included new logic for handling bbtIdentity.UserId and WorkflowEntity updates/deletions. |
amorphie.workflow/.../PageComponentModule.cs |
Configured JSON serialization options with MaxDepth , ensured distinct values in TemplateList responses, and slightly updated exception handling. |
amorphie.workflow/Program.cs |
Configured Newtonsoft.Json and System.Text.Json serialization settings, added WorkflowDBContext service to the DI container. |
sequenceDiagram
participant Client
participant WorkflowService
participant DB
participant Identity
Client->>WorkflowService: SaveAsync(data, token)
alt existing record
WorkflowService->>DB: Fetch existingRecord
WorkflowService->>Identity: Get UserId
Identity-->>WorkflowService: UserId
WorkflowService->>DB: Update existingRecord
else new record
WorkflowService->>Identity: Get UserId
Identity-->>WorkflowService: UserId
WorkflowService->>DB: Insert newWorkflow
end
WorkflowService-->>Client: Response
In the world of JSON, options arise,
Depths set to 256, no more surprise.
Async updates, identities greet,
Workflow shines with every heartbeat.
Mapper and engine, components aligned,
Code evolves, perfectly refined.
🐰✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Issues
3 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
Summary by CodeRabbit
New Features
Improvements
Refactor
Documentation