Honestly I don’t like XML when developing metadata driven applications, as that would separate the code of a piece of logic into two different files. While this defect can be bridged with the use of design tools, just as what .NET WF and jBPM does, both of them provide visualized workflow definition tool. While my framework will keep it simple, without introducing any graphical tools to assist designing the workflow. Therefore, I choose using annotation instead of XML as the metadata language when designing workflows.
In a state workflow definition, one of the core concept is activity. e.g. in commercialized workflows, we have code activity, “if…else…” activity, while loop activity, invoke web service activity, etc. Some activities hold the business logic, while some others are only used for linking other activities to form a whole procedure, just like the “if…else…” activity. In Hyperion, all these activities are simplified into one type, which is the “code activity”, as I believe everything that can be achieved by predefined activities can also be written in code. So why we still need workflow definition? That’s because we still need to handle state transitions.
Continue reading →