Which commands can I configure in Athento?

Tabla de contenidos

Below are some of the most common commands according to the type of automation they enable.

In the article How to schedule automatic tasks? , it describes how to configure them.

 

Notifications

Sending notifications for user-type fields

A user-type metadata field can be configured to send a user notification when a value is assigned to that field. For these notifications to be sent, the following command must be enabled:

notify_users_assigned_metadata

The recommended frequency for this command is “Every minute”.

 

Life cycles

Executing operations when the SLA of a life cycle state expires

When the life cycle of a state for a certain document expires, it is possible to execute some operations on that document; the operations to be executed must have the following value assigned as category:

life_cycle_state_sla_expired

When it is necessary to execute those operations, the following command must be configured:

action_on_documents_with_sla_expired

The recommended frequency for this command is “Every hour”, although it can be reduced if the SLAs to be monitored are less than this time.

 

Document upload

Uploading documents via email

When configuring email mailboxes by spaces, we will need to configure the command:

load_mails

The recommended frequency for this command is “Every minute”, although it may depend on the functional need.

This command loads the emails from all spaces in which the option “Load documents / Cargar documentos” has been enabled.

 

Queues

Executing queue operations

It is possible to execute operations on the documents that are in the queues. To do so, the following command can be configured:

run_operations_queues

The recommended frequency for this command is “Every 5 minutes”, although it may depend on the functional need.

 

Reports

Mass generation of reports (CSV) for all form types

Athento allows generating a CSV file with the documents’ metadata, in a general way, for all form types and all teams that have it enabled.

For those CSV reports to be generated, the following command must be configured:

massive_export_doctype_report_native

The recommended frequency in this case is “Every day” or “Every 12 hours”. 

If a much lower frequency is desired, there is also another command that can be configured every 5 or 10 minutes; that command is:

massive_export_doctype_report_delta_native

If you only need to activate the report for a specific doctype, and a frequency of every 5 or 10 minutes, that command is: 

export_doctype_report_native --name (doctype name )--max 50000 --days_ago 365

 

Mass generation of reports (CSV) for life cycle change logs in all form types

Athento allows generating a CSV file with the state change logs in the life cycle for the documents of all document types that have it enabled. To do this, the following command must be used.

massive_export_doctype_life_cycle_report

The recommended frequency for this case is “Every day”.

 

Mass export

Command to download documents in bulk

Athento allows performing a bulk download of documents by applying a filter similar to that of search. This download also includes the download of a .csv file with the information of the downloaded documents. To do this, the following command must be used.

export_generate_export_zip

The recommended frequency for this case is “Every day”.

Operations

Command to run operations in bulk

The command to execute the bulk operations that can be configured according to How to execute operations on a set of documents? is the following:

launch_bulk_work

 

Maintenance

Command to recover email reception

In some cases, the connection to the mailboxes may suffer some blockage due to communication problems, etc. In that case, it is advisable to schedule the following command in crontab:

* */2 * * * root cd /var/www/athentose; run-one ./manage.py recover_load_mails > /var/log/athentose/recover_load_mails.log

 

Command to recover processing in case of blockage

 

In some cases, document processing may become blocked; to automatically unblock it, it is advisable to apply the following command

 

27 * * * * root cd /var/www/athentose; run-one ./manage.py unlock_blocked_commands