-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MVP fix #788 - basic background processing of assembly with examples
- Loading branch information
1 parent
8e9aa14
commit 7a6b187
Showing
3 changed files
with
172 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
docassemble/AssemblyLine/data/questions/test_aldocument_background_assembly.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
--- | ||
include: | ||
- assembly_line.yml | ||
--- | ||
metadata: | ||
title: ALDocument Background Processing | ||
--- | ||
mandatory: True | ||
code: | | ||
intro_screen | ||
# if not al_user_bundle.generate_downloads_task.ready(): # Without DOCX | ||
if not al_user_bundle.generate_downloads_with_docx_task.ready(): # With DOCX | ||
al_download_waiting_screen | ||
download_screen | ||
--- | ||
continue button field: intro_screen | ||
question: | | ||
Intro screen | ||
--- | ||
id: download | ||
event: download_screen | ||
question: | | ||
Download the documents | ||
subquestion: | | ||
Your documents are ready for download. | ||
${ al_user_bundle.download_list_html(use_previously_cached_files=True, include_full_pdf=True) } | ||
--- | ||
objects: | ||
- al_user_bundle: ALDocumentBundle.using( | ||
elements = [pdf_1, docx_1], | ||
title = "Background processed bundle", | ||
enabled = True, | ||
filename = "background_processed_bundle", | ||
) | ||
--- | ||
objects: | ||
- pdf_1: ALDocument.using( title="PDF 1 with a lot of text for the title of this document", filename="pdf_doc_1", enabled=True, has_addendum=False ) | ||
- docx_1: ALDocument.using( title="Docx 1 also with a lot of text for the title of this document", filename="docx_doc_1", enabled=True, has_addendum=False ) | ||
--- | ||
attachment: | ||
variable name: pdf_1[i] | ||
pdf template file: test_aldocument_pdf_1.pdf | ||
filename: pdf_1 | ||
fields: | ||
- "sample_field": "Sample input" | ||
--- | ||
attachment: | ||
variable name: docx_1[i] | ||
docx template file: test_aldocument_docx_1.docx | ||
filename: docx_1 |