The process in normal operation sometimes encounters some conditional processing. For example, if certain conditions are met, the process can continue to flow. Otherwise, the process will be suspended and wait here. For example, in some voting processes, when the number of voters exceeds the set value, it means that the user agrees that the process will continue to flow. Otherwise, the process will be suspended at the current position, or even treated as a natural termination.

The above figure defines an intermediate condition event node, which means that after running Task001, the current process will stay at the condition node and wait for the condition variable. If the condition variable is updated and the condition expression is satisfied, the process can flow to The position of Task003 below , otherwise the process will remain stuck. The conditional expression on the node is defined as follows:

C:\Users\lg\AppData\Roaming\Tencent\Users\47743901\QQ\WinTemp\RichOle\A7TO}YM@6$TDNXI)ZSPA90P.png


Conditional expression: @days1-@days2>3, where @days1 and @days2 represent process variables. This variable needs to be read from the process variable table (WfProcessVariable). The update and detection of process variables is done through the background job of HangFire. Processed by polling. When the automatic job checks the values of the two variables @day1 and @day2 of the process, it then parses the conditional expression. If it is met, the process flows downward normally. Otherwise, continue to wait and stay.