Coefficient provides a workflow engine to help guide projects through their development cycle.
The workflow allows a user to define a set of states, state transitions, rules, and actions. States allow a user to define which modules will be visible when in that state. They also allow definition of any number of State Transitions. A State Transition allows a user to define a set of Rules that will cause the workflow to move into a different state. They also allow the user to define any actions that should be taken on moving from the current state. Rules can specify Comparators that allow a user to compare values that can be specified in a hard-coded manner or specified by an Action. Comparators can be any java object that implements a compare method. If the user defines a custom comparator then it must be in the applications classpath and must be specified in the xml. Actions are java class method invocations or module method invocations. They can be used to dynamically retrieve information that can be evaluated or to request that the system does things such as creating Tasks. Actions can be performed on state entry and state exit and can be an element within a rule. If all the rules evaluate to true then a transition will be made, otherwise the workflow will stay in the current state.
The system defines a simpleWorkflow example. This workflow forces a project to first add 2 members to the project. No other modules are visible until this has been completed. Once completed the workflow creates a task for the user to complete and makes the task module viewable. Once completed the workflow make a fileUpload item for the content created by the task. The task module is not viewable but the file upload is. Once a file has been uploaded the workflow creates a vote to see if the upload is acceptable. If 60% of the vote is positive the workflow moves into an open project state where all modules are viewable. If 60% of the vote is negative it moves back to the Task state.
These powerful mechanisms allows a user to create a workflow that will guide the user through stages of content creation without the project user having to know all the domain knowledge that the workflow writer has. The workflow is utilized by the coefficient architecture and is based on the csir-workflow project (a LGPL project).