Seach

Seach

Actions

1. Overview

The "Actions" tool in Mitra enables the automation of processes and operations within the platform through the creation of workflows consisting of sequential steps. These steps are executed in order, allowing for anything from simple data manipulations to complex integrations.

2. How to Create an Action

2.1. Name and Group

When creating a new action, define a name to identify it and group it based on its purpose or context, facilitating organization.

2.2. Adding and Managing Steps

Adding Steps: An action can contain multiple steps, executed in sequence.

Step Order: The order of steps is essential as it determines the execution sequence. To reorder, click and drag the step to the desired position.

Removing Steps: To delete a step, right-click on it and select "Remove."

2.3. Scheduling Actions

Actions can be scheduled for automatic execution using a Cron code (hourly, daily).

2.4. Execution Log

Mitra generates detailed logs recording each action's execution, including information about the user who initiated it, the execution time, and the result of each step (success or failure).

3. Key Action Steps

3.1. Change Relationship

The "Change Relationship" step allows modifying the relationship between records in related tables.

Configuration:

  • Select the primary table.

  • Choose the parent table.

  • Define the content you want to change in the relationship.

Example: To change a task's status to "Completed", the primary table would be "Task", the parent table would be "Status", and the content would be "Completed."

3.2. Call Action

The "Call Action" step enables one action to execute another preconfigured action, allowing you to reuse common workflows across different actions, optimizing development time and simplifying maintenance.

3.3. Navigate to Screen

The "Navigate to Screen" step redirects the user from one screen to another within Mitra.

Configuration:

  • Choose the destination screen.

  • Enable the "Bring Selection" option to carry over filters and selections from the current screen to the new one.

3.4. Refresh Screen

The "Refresh Screen" step is essential when an action modifies data and you want the interface to reflect these changes.

3.5. Filter

The "Filter" step is used to apply filters to tables or records before executing other operations.

Example: In a payroll calculation, you could filter by the "Salaries" category before calculating salaries, then filter by "Benefits" to perform the benefits calculation.

3.6. Filter with Attribute

"Filter with Attribute" allows dynamic filtering based on variables instead of fixed values.

Example: Create an attribute that identifies customers who purchased within the last 12 months and use it to filter your action. This dynamic approach is not possible with common filters, which require manual customer selection.

3.7. Create/Update Record

This step allows the creation of new records or updates to existing records in a table. Refer to the "Create/Update Record" documentation for further details.

3.8. Send Emails

The "Send Emails" step automates the sending of personalized emails using dynamic data. Refer to the "Send Emails" documentation for further details.

3.9. Clear Attribute

The "Clear Attribute" step clears the value of a specific attribute in selected records based on the current action filter.

3.10. Clear Table

"Clear Table" removes records from a table based on the current action filter.

3.11. Execute JAR

"Execute JAR" enables running custom Java code, expanding the platform's capabilities with tailored logic.

3.12. Run Connection

The "Run Connection" step allows executing preconfigured connections within an action, integrating data loading processes into automated workflows.

Reference: For details on configuring connections (via CSV or database), consult the "Connections" documentation.

Use in Actions: You can link and execute connections configured with SQL as part of an action. This is particularly useful for automating large-scale data transfers between systems.

Example Use Case: Daily Data Loading

  • Set up connections to load data from your ERP into Mitra daily.

  • Configure these connections to run in sequence, ensuring all necessary data is imported efficiently.

  • Schedule this action using a Cron code, automating the data loading process without manual intervention.

This approach integrates complex data loading processes directly into your automated workflows, making integration with external sources quick, efficient, and scalable.

3.13. Calculation

The "Calculation" step performs numerical calculations on attributes in tables.

Configuration:

  • Select the target attribute.

  • Define the VIEW to provide the data for the calculation.

  • Apply the desired formula to calculate and populate the numeric attribute.

Example: Calculate the total value of a proposal based on quantity, unit price, and discount percentage.