Recently, I have been going to understand the workflow. After investigation, OsWorkflow is light and flexible, from it. Memorant a few conceptual stuff. STEP
Roughly equivalent
The location where the process is located. For example, an annual inspection, an annual inspection report counts a STEP in the business bureau, counts the second STEP in the Industrial and Commercial Bureau, and calculates the third STEP at the review window. Each STEP can have a number of states (STATUS) and multiple action (Actions), using Workflow.getCurrentsteps () You can get all current STEPs (if there is a side-by-side process, you may have multiple steps at the same time, such as once an annual inspection) Located in the "first review" Step and "Advertising Business Qualification Review" Step).
STATUS
The state of the process is in a STEP. It is easy to understand, such as "to be recognized", "review is not passed". The status of OSWORKFLOW is completely customized by developers. The status is purely string comparison, flexibility is quite strong, and you can do a definition file very good.
Action
Action that causes the process state change. An Action is typically consisting of two parts: Conditions that can be performed, and the result of this action is performed. Conditions can be judged by Beanshell scripts, so there is a lot of flexibility, almost anything related to the process can be used to make judgments.
Result
Execute the result after the action. This is a more important concept. Result is divided into two, Conditional-Result and Unconditional-Result. After performing an action, first determine if all Conditional-Result conditions are met, the result is usually used; if there is no Contidional-Result to meet the condition, use UNCONDITITIONAL-RESULT. UNCONDITIONAL-RESULT needs to specify two parties: Old-status, indicating what "what is the state of the current STEP"; subsequent state, may be specified in SPLIT or JOIN with STEP STATUS.
Conditional-result is very useful. Or the annual inspection is an example, it is also a statement of the annual inspection report, "unmissive" and "returned" are different states. On the basis of these two states, the "submission" action is performed, the results are "first submission" and "return" Then submit it again. " At this time, you can consider using Conditional-Result on the "Submit" action.
Split / Join
Process split and fusion. Very simple concept, split offers multiple Result; Join judges the state of multiple Current Step, providing a result.