网络工作流程方法
我想在我正在开发的新网站上实现工作流程系统。基本上都有 订单对象(将来可能有更多对象)可以具有不同的状态,即初始、已分配、已派发、已取消等。在这种情况下,订单只能从一种状态变为另一种状态,例如可以从已分配变为已派发,但是不能从初始到调度等。我希望也许有人可以给我一种对于这样的事情最好采取的方法??????
I want to implement a workflow system on a new website which i am developing. Basically have
an order object (in future may have many more objects) which can have different statuses i.e. initial,assigned,dispatched,cancelled etc. It is the case that the order can only go from one status to another e.g can go from assigned to dispatched but cant go from initial to dispatched etc. i am hoping that maybe someone can give me an approach which is best to take for something like this??????
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试Windows Workflow Foundation,它对于您的应用程序来说可能有点大材小用。
如果您的 WF 系统那么简单并且您不希望它有太大发展,您可以使用具有枚举类型或字典/状态列表的常规对象。
类型和值一起将为您提供当前状态和可用操作的列表。 WF 对象的持久化也将非常容易。
Try Windows Workflow Foundation, it might be overkill for your application.
If you your WF system is that simple and you do not expect it to evolve much, you could use regular objects with an enumerated type or a dictionary / list of statuses.
Type and value together will give you current status and a list of available actions. Persistence of WF objects will also be very easy.