-
Notifications
You must be signed in to change notification settings - Fork 302
Expand file tree
/
Copy pathassemble-in-background.yml
More file actions
51 lines (51 loc) · 1011 Bytes
/
assemble-in-background.yml
File metadata and controls
51 lines (51 loc) · 1011 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
metadata:
title: Assemble a document in the background
example start: 1
example end: 8
documentation: "https://docassemble.org/docs/background.html#ui_notification"
---
mandatory: True
code: |
need(sweetheart)
if the_task.ready():
final_screen
else:
waiting_screen
---
question: |
What is the name of your
sweetheart?
fields:
- Name: sweetheart
---
code: |
the_task = background_action('assembly_task', 'refresh')
---
event: assembly_task
code: |
background_response_action('assembly_done', document=the_document)
---
attachment:
name: A letter
filename: letter
variable name: the_document
content: |
${ sweetheart }, will you
marry me?
---
event: assembly_done
code: |
the_letter = action_argument('document')
background_response()
---
event: waiting_screen
question: |
Please wait...
---
event: final_screen
question: |
Document created
subquestion: |
Don't read this letter, just send
it to ${ sweetheart } immediately.
attachment code: the_letter