In the course on the creation and configuration of automatic operations on documents, you can see the different phases in which operations can be executed on a document.
In addition to that, operations can be linked to different events; to do so, you simply have to fill in the "category" field of the operation with the name of the events, which can be seen below:
- When a user accepts a document received for approval. At this moment, the operations whose category has been configured as external_user_accepted are executed.
- When a user rejects a document received for approval. At this moment, the operations whose category has been configured as external_user_rejected are executed.
- When a user sends a required document via the document request email. At this moment, the operations whose category has been configured as document_requested_received are executed.
- If it is necessary for the operation to be executed only if all the required documents are received, then the condition fil.request_document.first().get_pending_document_types() must be added in the "Condition" field of the operation.
- When the binary of a document is updated. At that moment, the operations whose category has been configured as document_binary_updated are executed.
- When the SLA of a state expires for a specific document. At that moment, the operations whose category has been configured as life_cycle_state_sla_expired are executed. This event requires that there be a scheduler programmed with the command action_on_documents_with_sla_expired. IMPORTANT: This command only takes into account documents created in the last 6 months and modified in the last 30 days. If the life cycle has execution times greater than 6 months since the document was created or SLA times greater than 30 days, please consult soporte@athento.com
- When a document is deleted, just before its deletion, operations can be executed if they are linked to the category remove_document.
- When a document version is created, just after its creation, operations can be executed if they are linked to the category create_version.
- When the public form is used to create a document or update a document’s metadata, operations linked to the category document_updated_externally can be executed.
- When the Viafirma callback is performed, operations linked to the category callback_viafirma can be executed.
- When the Viafirma – Documents callback is performed, operations linked to the category callback_viafirma_document can be executed.
- When the document is changed of space. The category is change_serie. In this case, the operations must be installed in the destination space and are executed when the document has already been changed of space.
- When the document’s form is changed. The category is change_serie. In this case, the operations are executed when the document’s form has already been changed.
- When a related document is added. The category is add_related_child. In this case, the operations installed in the space where the child document is located that have this category will be executed on the new related child document. In this case, the parent document must have the option enabled.
- When a related document is removed. The category is remove_related_child. In this case, the operations installed in the space where the child document is located that have this category will be executed on the child document for which the relationship has been removed. In this case, the parent document must have the option "Run operations on added related by user" enabled
- When a related document is added. The category is add_related_parent. In this case, the operations installed in the space where the parent document is located that have this category will be executed on the parent to which the child has been related.
- When the call to the Document.Move service is executed on a document, the operations that have the category api_ecm_move_document are executed on that document.