Activities with content blocks exercise

Estimated duration: 1 hour

Introduction

You can generate documents, forms, notes, tasks, and letters (doc, docx, PDF, e-mail) based on data from your Novulo application. Documents are created from so-called activities. Activities are based on activity templates to facilitate the automatic creation of activities. Activity templates can contain re-usable content blocks for addressing, footnotes, layout etc. to easily maintain and enable the generation of consistent looking docs, pdf or emails.

What you are about to learn

  • How to prepare a document template for your doc/e-mail.
  • How to prepare an export definition if you need to use data in your doc/email.
  • How to set up an activity template with content blocks to reuse them in different activities.
  • How to set up an activity and generate a document/e-mail from it.

Prerequisites

  • A personal training environment.

Contact your Novulo consultant if you do not have access to a personal training application for exercises yet. Most exercises only work in combination with a selected set of training data and not in any application.

It’s recommended that you have a basic understanding of Novulo expressions.
This means you have completed:


Exercise

If you get stuck, read the following posts:

A) Add a document template. What (which placeholder) should it contain by default?

B) Create an export definitions for activity template with content blocks:

  1. Add a dataset to the export definition. Make sure to use the correct datatype.
  2. Add “activity_content” and “owner (person)” fields to the dataset.

C) Create a content block template:

  1. Make sure you set a correct export definition.
  2. Make sure the content shows the owner’s name.

D) Create an activity based on an activity template with content blocks:

  1. Make sure it’s for a “Letter” and can output to PDF.
  2. Make sure you use the document template.
  3. Make sure to use the export definition.
    (Hint! Here you set the export definition for the activity template.)
  4. Make sure the template shows the owner’s name.

E) Create an activity using your template.

F) Generate a PDF that shows the name of the owner person.

Solutions

Exercise

A)

%activity_content%

B)
  1. activitycontentblocks (Activity contentblocks).
C)

D)

On the activity template level you need to set the export definition where the first dataset has the datatype activities. For example, you can use an export definition from the previous activity exercise > Activities and classic activity templates exercise*.


Then add a content block and set a content block template:

E)

Don’t forget to set an owner.

F)