Deepomatic Platform
  • Overview
  • Release notes
    • January 2025
    • November 21, 2024
    • October 17, 2024
    • September 19, 2024
    • July 18, 2024
    • June 27, 2024
    • May 23, 2024
    • April 18, 2024
    • March 21, 2024
    • February 22, 2024
    • January 18, 2024
    • December 13, 2023
    • October 26, 2023
    • July 20, 2023
    • June 29, 2023
    • May 29, 2023
    • April 27, 2023
    • March 30, 2023
    • February 17, 2023
    • January 19, 2023
    • December 22, 2022
    • November 18, 2022
    • October 19, 2022
    • September 19, 2022
    • July 27, 2022
    • June 26, 2022
    • May 17, 2022
    • April 13, 2022
    • March 17, 2022
    • February 10, 2022
    • December 21, 2021
    • October 26, 2021
  • Getting started
  • ADMIN & USER MANAGEMENT
    • Invite and manage users
      • Invite group of users at once
      • SSO
        • Azure Active Directory
  • Deepomatic Engage
    • Integrate applications
      • Deepomatic vocabulary
      • Deepomatic connectors
        • Set-up
        • Camera Connector
        • Work Order Connector
      • API integration
        • Authentication
        • Errors
        • API reference
          • Work order management
          • Analysis
            • Guide field workers
            • Perform an analysis
            • Correct an analysis
          • Data retrieval
          • Endpoints' list
      • Batch processing
        • Format
        • Naming conventions
        • Processing
        • Batch status & errors
      • Data export
    • Use the mobile application
      • Configure a mobile application
      • Create & visualize work orders
      • Complete work orders
      • Offline experience
    • Manage your business operations with customisable solutions
      • Roles
      • Alerting
      • Field services
        • Reviewing work orders
        • Exploring work orders
        • Grouping work orders
        • Monitoring assets performance
      • Insights
  • Security
    • Security
    • Data Protection
Powered by GitBook
On this page
  • Context Validation method
  • Main method
  • Task methods

Was this helpful?

  1. Deepomatic Drive
  2. Configuring Visual Automation Applications
  3. Assembling workflows
  4. Workflow implementation

Write the task-group implementation

Each task group are implemented in their own python file under task-groups/<task_group_name>.py and each task-group herits from a TaskGroup class, with multiple methods to be implemented:

Context Validation method

The context_validation method, if it exists for this task-group, is executed first. It is passed all the entries. It can only return a boolean which will be set as the value of the task associated to context_validation in the specs.yaml file. If True is not returned, the execution will stop.

Main method

The main method is executed first or right after the context_validation if it exists. It should be used to do common inferences that will be used by different tasks.

Task methods

Tasks are implemented as methods, decorated using the @task decorator. They are also passed all the entries, and are executed after the main function, in the order they are listed in the specs.yaml file.

Every task declared in the specs.yaml file must be implemented.

Tasks can either return a value of the correct type, or raise a TaskConformityError with an error message that will be provided as an "hint" to the user. All the other exceptions are considered implementation errors and will be forwarded to the user as an "error".

For now the TaskConformityError are not at all forwarded to the client, they are filtered by the CustomerAPI and replaced by a "None" task (as it is at first initialisation). This part is still no completely finished, but for now please raise a TaskConformityError when you don't want to output a value for a specific task.

Last updated 1 year ago

Was this helpful?