fmla_request v1

fmla_request.flow · dandori doc

An employee asks for FMLA leave: the eligibility notice, the certification, the designation, and the leave held in the book until it is taken. From 29 CFR 825.300 and 825.305

flow
falsetruefalsetrueon key_conflicton not_enough_leavetruefalsefmla_request v197 e = eligibility(…)rule fmla_eligibility.ruletimeout, failure → on failure!98 notice = deadlines.notice(…)dates fmla_deadlines.caltimeout, failure → on failure!99 give_eligibility_notice(…)a task you writetimeout, failure → on failure!100 match e.eligible101 succeed outcome = not_eligible103 asked = deadlines.certification(…)dates fmla_deadlines.caltimeout, failure → on failure!104 c = get_certification(…)a task you write, answered by a callbacktimeout, failure → on failure!105 designation = deadlines.notice(…)dates fmla_deadlines.caltimeout, failure → on failure!106 match c.provided108 give_notice_of_no_designation(…)a task you writetimeout, failure → on failure!109 succeed outcome = no_certification111 limit = entitlement(…)rule fmla_entitlement.ruletimeout, failure → on failure!112 open_period(…)book leave.entitle.dokey_conflict → line 113; timeout, failure → on failure!114 hold ← hold_leave(…)book leave.designate.holdstartsnot_enough_leave → line 115; timeout, failure → on failure!116 give_notice_of_no_designation(…)a task you writetimeout, failure → on failure!117 succeed outcome = not_enough_leave118 give_designation_notice(…)a task you writetimeout, failure → on failure!119 ended = wait_for_the_end_of_leave(…)a task you write, answered by a callbacktimeout, failure → on failure!120 match ended.taken122 hold ← take_leave(…)book leave.designate.postsends posttimeout, failure → on failure!123 succeed outcome = taken125 hold ← release_leave(…)book leave.designate.voidsends voidalready_posted, timeout, failure → on failure!126 succeed outcome = not_taken
on failure
heldon failurenoneon already_posted128 on failure129 match hold.state132 hold ← release_leave(…)book leave.designate.voidsends void134 fail NotReleased"the leave held for the request could not be re…leaving holdfails with the same error

Calls

LineCallCallsRetriesTimeoutWhen it failsCase after
97e = eligibility(…)rule fmla_eligibility.rule2 times, after 1 second and 2 (failure, timeout)10 secondstimeout, failure → on failure—
98notice = deadlines.notice(…)the date notice of fmla_deadlines.cal2 times, after 1 second and 2 (failure, timeout)10 secondstimeout, failure → on failure—
99give_eligibility_notice(…)a task you write, idempotent——timeout, failure → on failure—
103asked = deadlines.certification(…)the date certification of fmla_deadlines.cal2 times, after 1 second and 2 (failure, timeout)10 secondstimeout, failure → on failure—
104c = get_certification(…)a task you write, answered by a callback—1 minute to hand the id ontimeout, failure → on failure—
105designation = deadlines.notice(…)the date notice of fmla_deadlines.cal2 times, after 1 second and 2 (failure, timeout)10 secondstimeout, failure → on failure—
108give_notice_of_no_designation(…)a task you write, idempotent——timeout, failure → on failure—
111limit = entitlement(…)rule fmla_entitlement.rule2 times, after 1 second and 2 (failure, timeout)10 secondstimeout, failure → on failure—
112open_period(…)book leave.entitle.do——key_conflict → line 113
timeout, failure → on failure
—
114hold ← hold_leave(…)book leave.designate.hold, starts leave.designate——not_enough_leave → line 115
timeout, failure → on failure
hold: held
116give_notice_of_no_designation(…)a task you write, idempotent——timeout, failure → on failure—
118give_designation_notice(…)a task you write, idempotent——timeout, failure → on failure—
119ended = wait_for_the_end_of_leave(…)a task you write, answered by a callback—1 minute to hand the id ontimeout, failure → on failure—
122hold ← take_leave(…)book leave.designate.post, sends post——timeout, failure → on failurehold: posted
125hold ← release_leave(…)book leave.designate.void, sends void——already_posted, timeout, failure → on failurehold: voided
132hold ← release_leave(…)book leave.designate.void, sends void——already_posted → line 133
timeout, failure → line 134
hold: voided

Ends

LineEndhold
101succeed outcome = not_eligiblenot started
109succeed outcome = no_certificationnot started
117succeed outcome = not_enough_leavenot started
123succeed outcome = takenposted
126succeed outcome = not_takenvoided
134fail NotReleased "the leave held for the request could not be released" leaving holdhanded over as it is: held, posted, voided
134on failure runs to its end, and the workflow fails with the error that started itnot started, or posted, voided