Skip to content

Instantly share code, notes, and snippets.

@dcarneiro
Created November 24, 2017 15:32
Show Gist options
  • Save dcarneiro/ff499e602c645d80a2eed17d30002b75 to your computer and use it in GitHub Desktop.
Save dcarneiro/ff499e602c645d80a2eed17d30002b75 to your computer and use it in GitHub Desktop.
Flow 2
### Flow 2.0
#### Sequence Diagrams
##### When Invoice is transmitted
###### Sequence
```sequence
ScheduleFirstRequestEmailJob->InvoiceEventScheduler: schedule_first_request
Note right of InvoiceEventScheduler: Decide the 1st request date
Note right of InvoiceEventScheduler: Schedule the event without a channel
InvoiceEventScheduler-->ScheduleFirstRequestEmailJob: Ok!
```
###### Flow
```flow
st=>start: When invoice is transmitted!
async=>operation: ScheduleFirstRequestEmailJob.perform_async
schedule_first_request=>operation: Invoice::EventScheduler#schedule_first_request
first_request_date=>operation: Decide the first_request_date based on the message profile
schedule_event=>end: schedule_event without channel
st->async->schedule_first_request->first_request_date->schedule_event
```
> Written with [StackEdit](https://stackedit.io/).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment