1 / 16

Early Completion of the Flow Activity - A proposal -

Early Completion of the Flow Activity - A proposal -. Scenario. In many cases the process does not need to wait for all the concurrent activities to complete in order to reach the overall goal

cassady-roy
Download Presentation

Early Completion of the Flow Activity - A proposal -

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Early Completion of the Flow Activity- A proposal -

  2. Scenario • In many cases the process does not need to wait for all the concurrent activities to complete in order to reach the overall goal • Example: A process is waiting in parallel for 3 reviews of a paper. If 2 positive reviews are received the paper will be accepted. Otherwise, all 3 reviews will be collected and the rejection including the responses from reviewers should be sent to the authors.

  3. Requirements • A way to express that the desired goal has been achieved is needed • All active concurrent activities that are considered as “unnecessary” should be terminated • Ability to support various flavors of conditions used to specify when the desired goal has been achieved: • Wait for N out of M • Wait until after condition C evaluates to true • The condition is evaluated immediately after one branch has completed

  4. Proposal Consists of two parts: • Activity <complete> • Specifies a way to explicitly complete a <flow> activity • Includes termination of the active concurrent activities • Completion condition for the <flow> activity • Hides a part of the early completion pattern (e.g. counter for completed branches)

  5. Proposal (cont’d) • Targeting <flow> activity only – not <scope> • Most common cases for early completion: 80-20 rule • All flow branches MUST be <scope> based • Encapsulate the effect and work of early completion to each branch. E.g.: Enabling self clean up of branches • Allow differentiation of branch-based completion conditions • 1 + 2 together • avoid the need of <completionHandler> at <scope> • <completionHandler> not easy to understand and define

  6. Activity <complete>: Syntax <complete target="flow-activity-name" /> Example:<flow name="F1"> <scope name="scopeA"> <sequence> … <switch> <case><condition> … </condition> <complete target="F1" /> … </scope> <scope name="scopeB"> … other parallel action … </scope> <scope name="scopeC"> … other parallel action … </scope> </flow>

  7. scopeA scopeC scopeB TH TH TH CH CH CH seq seq seq Activity <complete>: Diagram Flow F1 TH =termination handler CH =compensation handler … early completionsignal … … complete termination signal

  8. Activity <complete>: Semantics • <complete> activity (at ‘ScopeA’) sends early-completion signal to the target flow activity ‘F1’ • Flow ‘F1’ sends termination signal to scope-based branches which are still running – ‘ScopeB’ and ‘ScopeC’ • TH of ‘ScopeB’ and ‘ScopeC’ are activated • TH may invoke CH • Reach end of the flow, after TH are finished

  9. Completion condition: Syntax <flow> <completionCondition> ? <branches expressionLanguage="URI"? countCompletedScopesOnly="yes|no"?> an-integer-expression </branches>? <booleanExpression expressionLanguage="URI"?> a-boolean-expression </booleanExpression>? </completionCondition> </flow>  

  10. Completion condition: Semantics <flow name=“f1”> <completionCondition> <booleanExpression> a-boolean-expression </booleanExpression> </completionCondition> <scope name="s1"> … </scope> <scope name="s2"> … </scope> </flow> …Would be translated into ->

  11. Completion condition: Semantics (cont.) <flow name="f1"> <scope name="s1"> <sequence> activity-X <switch> <case> <condition> a-boolean-expression </condition> <complete target="f1" /> </case> </switch> </sequence> </scope> <scope name="s2"> <sequence>activity-Y <switch> … similar switch … </switch> </sequence> </scope> </flow>

  12. Completion condition: Semantics (cont.) <flow name=“f1”> <completionCondition> <branches countCompletedScopesOnly="yes"> 2 </branches> </completionCondition> <scope name="s1"> … </scope> <scope name="s2"> … </scope> <scope name="s3"> … </scope> </flow> …Would be translated into ->

  13. Completion condition: Semantics (cont.) <flow name="f1"> <scope> <sequence> <scope name="s1"> … </scope> <assign>branch=branch+1</assign> <switch> <case> <condition> “branch=2” </condition> <complete target="f1"/> </case> </switch> </sequence> </scope> … </flow>

  14. New standard fault • completionConditionFailure: After all scopes branches ends, if the completionCondition is still evaluated to false, the fault MUST be thrown.

  15. Open issues • Do we need to allow <complete> activity to perform an early completion against a <flow> activity which is not the inner most <flow> activity in the ancestor chain?

  16. Activity <complete>: Cascade Effect Flow F1 Flow F2 … … complete target=F1 … … early completionsignal termination signal

More Related