如何处理复杂且不断变化的业务规则

发布于 2024-11-20 00:43:30 字数 293 浏览 4 评论 0原文

我必须想出一个关于如何透明地创建发票的想法。客户多种多样,通常是政府类型的机构。因此,他们对发票的创建及其内容有严格的规则。这些规则非常具体,并且因客户而异。例如:

  • 每 10 件商品,需要开具另一张发票
  • 如果某项特定服务要开具发票,则应排除所使用的材料
  • 有些商品根据合同或法律是免费的
  • 有些非常昂贵的商品必须开具单独的发票

规则IMO 是否过于多样化而无法以传统形式保存在关系数据库中,并且它们过于灵活而无法硬编码到系统中。那么,问题是:您将如何解决这一挑战?

I have to come up with an idea on how to transparently create invoices. Customers are diverse and usually government type institutions. As such, they have strict rules for creating invoices and what goes into them. The rules are very specific and different between customers. For example:

  • For every 10 items, another invoice needs to be created
  • If a specific service is going into invoice, materials used should be excluded
  • Some items are free of charge either by contract or by law
  • Some really expensive items must go into separate invoices

Rules are IMO too diverse to be saved in relational database in a traditional form and they are too flexible to be hard coded into the system. So, the question is: how would you solve this challenge?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

心的憧憬 2024-11-27 00:43:30

Windows Workflow Foundation 旨在解决这些类型的问题。它包含一个表达式引擎,用于根据客户属性等一系列条件评估应采取哪些步骤。

以下是该框架的介绍:链接

以及其规则/表达式引擎的另一个介绍:链接

Windows Workflow Foundation is designed to address these types of problems. It contains an expression engine for evaluating which steps should be taken based on a series of conditions such as customer properties etc.

Here's an introduction to the framework: Link

And another introduction to its rules / expression engine: Link

oО清风挽发oО 2024-11-27 00:43:30

您应该使用业务规则引擎(BRE)。

有几个选项:

You should use a Business Rules Engine (BRE).

There are several options :

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文