LogoLogo
User DocsAPI Docsatfinity.swiss
  • 🚀Atfinity: No-Code Process Automation
  • Guides
    • Getting Started
      • Introduction
      • 1. Create Ontologies and Roles
      • 2. Create Information
      • 3. Create and Configure a Document
      • 4. Create a Rule
      • 5. Create a Process
      • 6. Put Live
      • Summary and Next Steps
    • Advanced Topics
      • Extending a Workflow
      • Customizing Names of Cases and Instances
      • Automatically Calculating Information Values
      • Using Built in Integrations
    • Troubleshooting
      • Why is a question not asked?
      • Why is a question asked?
      • The value of my calculated field has a strange format
      • Why is my Proof never asked for?
      • Why is my Rule not executed?
      • Why are some options missing in a dropdown?
      • Case Errors
    • Glossary
      • Case
      • Process
      • Workflow
      • Ontology
      • Instance
      • Role
      • Information
      • Document
      • Document Section
      • Document Template
      • Rules
      • Scheduled Rules
      • Information Types
      • Tab
      • Category
      • Taxonomy
      • Proof
      • RuLa Functions
      • Constants
  • Rule Language (RuLA)
    • ℹ️What is RuLa?
    • Declarations
      • is
      • is with where
      • is all
      • is all with min max
      • Role Choices
    • Expressions
    • Operators
      • Boolean Operators
        • =
        • !=
        • >
        • >=
        • <
        • <=
        • and
        • and then
        • not
        • or
        • or else
        • matches (~=)
      • Date Operators
        • NOW
        • IS_DATE
        • TODAY
        • FORMAT_DATE
        • DAYS
        • WEEKDAYS
        • ADD_DAYS
        • ADD_WEEKDAYS
        • ADD_MONTH
        • ADD_YEARS
        • SUBTRACT_YEARS
        • AFTER
        • DATE_EQUAL
        • DATETIME_EQUAL
        • AFTER_EQUAL
        • BEFORE
        • BEFORE_EQUAL
        • DAYS_AGO
        • MONTHS_AGO
        • YEARS_AGO
      • Known Operators
        • unknown
        • known
        • SNEAKY
        • AVG_OF_ANY
        • LIST_OF_ANY
        • MAX_OF_ANY
        • MIN_OF_ANY
        • SUM_OF_ANY
        • CONCAT_OF_ANY
        • UNION_OF_ANY
        • JOIN_OF_ANY
      • List Operators
        • [ , ] (create)
        • [] (access)
        • in
        • not in
        • contains
        • contains any
        • contains only
        • COUNT
        • SORT
        • CUSTOM_MAX
        • REVERSE
        • FIRST_ELEMENT
        • ALL
        • SOME
        • UNION (or |)
        • SET_DIFFERENCE
        • INTERSECTION
        • MAP
        • FILTER
        • FILTER_FALSE
        • FILTER_UNKNOWN
        • SET
      • Dictionary Operators
        • {} (create)
        • [] (access)
        • in
        • keys()
        • FLATTEN
      • Mathematical Operators
        • + - / *
        • %
        • **
        • //
        • AVG
        • CEIL
        • FLOOR
        • MAX
        • MIN
        • ROUND
        • SUM
        • SUM_PRODUCT
        • SQRT
      • String Operators
        • LEN
        • LOWER
        • UPPER
        • TRIM
        • TRIM_LEFT
        • LEFT
        • RIGHT
        • SLICE
        • REPLACE
        • REPLACE_CHARS
        • format
        • calculated_name
        • CONCAT
        • markdown_table
        • make_filename
        • JOIN
        • uuid
      • Special Operators
        • :=
        • ensure
        • get_attr
        • get_translated_attr
        • has_attr
        • get_properties
        • instances
        • instances_exist
        • is
        • ontology
        • Translate (.$)
        • translate_string
        • roles
        • self
        • name_and_log (debug)
    • Conditional Expressions
      • case
      • if-then-else
      • switch
    • Comments
    • Information about the case
    • Accessing the outcome instance
    • Information about documents
    • Recipes
  • Document XML (ADX)
    • ℹ️What is ADX?
    • ADX Elements
      • Body
      • Text
      • Image
      • Columns
      • Field
      • Checkbox
      • Table
      • Rect
      • Line
      • Space
      • KeepTogether
      • Template
      • Style
      • Page Number
      • QR Code
      • HR Code
    • Jinja Templating
      • Instances
      • Case Meta Information
      • Custom Translations
      • Functions
      • Jinja filters
    • Font support
  • API
    • ℹ️What is the Atfinity API?
    • Generate API Keys
    • API Documentation
    • Calling your APIs within Cases
    • External Data Sources (e.g. CRM)
  • Deploying
    • Deploying on-site
      • Kubernetes
      • Docker Compose
    • Management commands
    • Security Logging
    • LDAP User Backend
    • Single Sign On
  • Integrations
    • Avaloq
    • Worldcheck
  • Releases
    • Release Notes
      • Version 11.x
      • Version 10.x
      • Version 9.x and earlier
    • Release Schedule
Powered by GitBook
On this page
  • Getting Started
  • Document Structure
  • Displaying Case Information

Was this helpful?

  1. Document XML (ADX)

What is ADX?

PreviousRecipesNextADX Elements

Last updated 1 year ago

Was this helpful?

The Atfinity Document XML (ADX) format is a way to describe what should be on a document and how it should be rendered. It's design is loosely inspired by HTML, so if you are familiar with HTML you will probably feel right at home quickly.

ADX documents are just documents that are templated with to display case information where you need it. To write ADX it helps if you are familiar with XML and Jinja.

Getting Started

Document Structure

An ADX template needs to at least contain a root tag and a body. For everything but testing, you probably also want to add content within the body. A very simple ADX would look like this:

<adx>
  <body>
    <text>
      Hello World! This is an ADX document rendered by Atfinity.
    </text>
  </body>
</adx>

In most cases, you also want to customise the template your content is printed on. You do this by defining a template and then using it, like this:

<adx>
  <pageTemplates>
    <template
      id="simple_header"
      pageSize="A4"
      pageMargins="10cm 2cm 5cm 2cm"
    >
        <text
          bottom="287mm"
          left="20mm"
          width="190mm"
          height="10mm"
          color="blue"
          fontSize="80"
        >
            Header
        </text>
    </template>
  </pageTemplates>
  <body template="simple_header">
    <text>
      Hello World! This is an ADX document rendered by Atfinity.
    </text>
  </body>
</adx>

Above we define a template with the id simple_header and then use it later by setting the template of body to the same id.

Displaying Case Information

To connect such a document to a case, we add some Jinja instructions to place information values and fields. The matches instances of a document conditions are available to you, so you can place information like this:

<adx>
  <body>
    <text>
      Hello World! Here is a field from a person matched in the case {{p.first_name}}
    </text>
  </body>
</adx>

If you want to display a field, you can combine this with a field tag like this:

<adx>
  <body>
    <field title="First Name" type="box_below">
      {{p.first_name}}
    </field>
    <field title="Last Name" type="box_below">
      {{p.last_name}}
    </field>
  </body>
</adx>

As you can see, Jinja instructions are within {{...}} blocks. They follow a syntax very similar to Python (head to the for details).

ℹ️
XML
Jinja
Jinja documentation