microsoft / microsoft/RulesEngine

Ef Derived Class concern

Open
#588 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
4.4k
Forks
616
Avg merge
6m
Merged PRs (30d)
2

Description

Discussed in https://github.com/microsoft/RulesEngine/discussions/587

Originally posted by R1Dev February 28, 2024
Hello!
I added the classes to ef as herited classes like https://github.com/alexreich/RulesEngineEditor did.
When I Get the WorkflowData object, I get 2 Rules Properties and Rules Engine wants to have data in (RulesEngine) one

How to proceed to get a single propertie?

public class WorkflowData : RulesEngine.Models.Workflow
{
    public long Id { get; set; }
    public Guid TenantId { get; set; }
    public new IEnumerable<RuleData> Rules { get; set; }
    public new IEnumerable<ScopedParamData> GlobalParams { get; set; }
    public int Seq { get; set; }

}
Capture d'écran 2024-02-28 013537

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with discussion 587 and the WorkflowData type shown in the issue, comparing its inherited Rules and GlobalParams properties with the hidden properties declared using new. Trace how RulesEngine.Models.Workflow is consumed and determine what behavior is expected when the derived EF model is passed to RulesEngine. Done means the workflow exposes one compatible Rules property without the duplicate-property problem described.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend, database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.