这个引擎的核心是能够捕获一个线程的执行状态并在过后恢复它.利用Dalma来开发Workflow应用程序能够让你像开发普通程序一样简单而不需要任何样板文件。
Many applications of today need to have a part of the program that waits for other entities. For example, a mailing list manager waits for an e-mail to trigger actions. A web application waits for incoming HTTP requests.
Sometimes those applications are conversational; they not only just receive messages, but also send out messages. Those programs often maintain some state and change it as the conversation progresses. Often there are multiple conversations running concurrently. Those are what we call “workflow” applications.
For example, where I work, I have a little process every Monday. On Sunday night, cron triggers an automated weekly build of our software. Upon a successful build, it sends out an e-mail. On Monday morning, a manager and an engineer replies to those e-mails, authorizing the posting of the build to a publicly visible web server. Another program waits for those authorization e-mails, push the binaries to the server, and then report the result in an e-mail, concluding a conversation. This little ritual happens concurrently for each project in my group.
Today, those applications can be written, but one can’t write it very productively. For one thing, every time an incoming message comes, the program has to retrieve the state information, act on it, and then store it back. This needs a lot of boilerplate code. You also need to write it as an event-driven program, where your application consists of a set of message handlers. This makes it difficult to follow the flow of the logic.
The other approach is to use a special-purpose language like BPEL. While BPEL is indeed useful in certain circumstances, it brings in a considerable complexity, and thus you need a relatively large-scale project to pay it off.
Dalma makes it very easy to write those workflow applications by letting you write it as an ordinary procedural program without any boilerplate.