任何人都可以推荐一个.Net开源替代Windows Workflow?

前端之家收集整理的这篇文章主要介绍了任何人都可以推荐一个.Net开源替代Windows Workflow?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
.Net堆栈中的 Windows Workflow有哪些替代方案?如果您已经使用了这些解决方案,那么您可以通过Windows Workflow选择它们,这是一个不错的选择.

更新:

我选择了Nicholas Blumhardt创造的stateless.这是一种非常简单的方法来对域中的状态进行建模.以下是google提供的示例代码

  1. var phoneCall = new StateMachine<State,Trigger>(State.OffHook);
  2.  
  3. phoneCall.Configure(State.OffHook)
  4. .Allow(Trigger.CallDialed,State.Ringing);
  5.  
  6. phoneCall.Configure(State.Ringing)
  7. .Allow(Trigger.HungUp,State.OffHook)
  8. .Allow(Trigger.CallConnected,State.Connected);
  9.  
  10. phoneCall.Configure(State.Connected)
  11. .OnEntry(t => StartCallTimer())
  12. .OnExit(t => StopCallTimer())
  13. .Allow(Trigger.LeftMessage,State.OffHook)
  14. .Allow(Trigger.HungUp,State.OffHook)
  15. .Allow(Trigger.PlacedOnHold,State.OnHold);
  16.  
  17. phoneCall.Configure(State.OnHold)
  18. .SubstateOf(State.Connected)
  19. .Allow(Trigger.TakenOffHold,State.Connected)
  20. .Allow(Trigger.HungUp,State.OffHook)
  21. .Allow(Trigger.PhoneHurledAgainstWall,State.PhoneDestroyed);

如您所见,状态机使用泛型来对状态及其各自的触发器进行建模.换句话说,您可以使用枚举,整数,字符串等来满足您的需求.状态机的每个状态都可以配置条件触发器,这些条件触发器将根据特定条件触发.

Windows Workflow Foundation在某些情况下,对我来说感觉像是一个过分的杀手.然后,实现自己的工作流引擎变得更加容易和简单.

样品参考:

> Simple State Machine project on CodePlex
> Stateless on Google Code

猜你在找的Windows相关文章