Trello company business process automation using semantic modeling technology
In recent years, Trello has been increasingly talked about as an excellent tool for organizing and planning. For 3 years now, we have been using Trello in our company to plan many processes, starting from vacations, business trips and agreeing contracts, and ending with project management.
Unfortunately, not everything is so beautiful in Trello. You can’t do a custom workflow on it. That is, we need to occupy one employee who will drag cards with his hands in various boards. How can this employee be transferred to another, more interesting and creative work?
Of course, you say, you can write a script that will do all this for us. But there is a problem. A script can only be written by a programmer or a person who understands how to do this. He will have to maintain the script. We found a simpler and more logical solution - this is semantic modeling.
Semantic modeling allows you to write all the logic of the board in Trello in natural language.
Take the simplest process: matching travel and vacations. According to our regulations, every employee who plans to take a vacation or go on a business trip publishes a request to Trello. The application falls into the “For approval” sheet.

As soon as the application is approved (in fact, this means that the head of the employee and / or representative of the financial department checked the checkbox), they are moved to the “Agreed Travel” list. An application for leave falls respectively in “Agreed Leave”, etc. After that, you need to notify the employee that his application has been agreed.
Suppose we want to automate this process so that the application, after approval, moves to the desired sheet automatically, and the employee receives a notification about the change in the status of the application. Consider what we need for this.
To develop the model, we chose ide from the Jetbrains MPS (Meta Programming System). As a language for modeling, the d0SL language is used - Delta0 semantic language, created on the basis of semantic (logical) models.
The whole process of installing Jetbrains MPS and the necessary plug-ins is fully described here: https://d0sl.github.io/en/quick/installation/ .
You can install the finished Trello board model at the link: https://d0sl.github.io/en/quick/trello/ .
Let's see what the resulting semantic model of Trello boards looks like. It contains our rules:

The model has a predicate checkBoard, which is called for each card in the board. The identifier of the card, the name of the user who performed the last operation with the card, the sheet from which the card was moved, and the sheet in which it is now located are transferred to it. Further in checkBoard we can set the rules by which we plan to process our applications.

Note that semantic modeling allows you to put all the logical business rules into one document and write these rules in the language of the subject area, “native language” for users of the model.
The ability to do something with the card is provided by the base TrelloBoard model, which is as follows:

If we run the model, as soon as the application in the “For approval” sheet passes the approval process,

The system will move it to the appropriate section and notify the card maker of the change in the application status.

If, however, an application that has not been agreed to be tried to be moved manually, the system will send it to the place and write an angry comment.
The basic TrelloBoard model is essentially an interface that we implement in Java (in this case, in the class com.gav.semanticTrelloBoard.TrelloBoardDSL).
It looks like this:

We assign function names using decorators and implement them.
We also have the AiTrelloBoard class, which allows us to work with Trello. It contains java implementations of functions such as start:

In the trelloBoard.properties file, we hold all the trello api parameters (such as application_key, board_id, etc.) and last_update_timestamp - timestamp of the last update.
Thus, at the cost of not too much effort, we can automate the necessary business processes in Trello. Using and maintaining this solution is much more convenient than program code.
Obviously, the possibilities of semantic modeling are not limited to solving this problem. After all, if in the classical approach to solving problems the analyst first creates specifications, on the basis of which developers subsequently implement the architecture and write the code, then when using the semantic modeling language d0sl, the analyst can create task specifications in the formal logical language, which are converted into executable code without human intervention. This can significantly reduce the cost of developing, deploying and testing new services.
We made the solution for working with Trello open and put it on github .
We would like not only to provide a tool for process modernization in Trello, but also to demonstrate on this simple example the advantages of using such a modern approach as semantic modeling. We will be glad if you can add something of your own to this case, and share your experience in using our solution.
Read more about the semantic modeling language d0sl here .
The mathematical foundations of semantic modeling are outlined here .
Unfortunately, not everything is so beautiful in Trello. You can’t do a custom workflow on it. That is, we need to occupy one employee who will drag cards with his hands in various boards. How can this employee be transferred to another, more interesting and creative work?
Of course, you say, you can write a script that will do all this for us. But there is a problem. A script can only be written by a programmer or a person who understands how to do this. He will have to maintain the script. We found a simpler and more logical solution - this is semantic modeling.
Semantic modeling allows you to write all the logic of the board in Trello in natural language.
Travel and vacation coordination
Take the simplest process: matching travel and vacations. According to our regulations, every employee who plans to take a vacation or go on a business trip publishes a request to Trello. The application falls into the “For approval” sheet.

As soon as the application is approved (in fact, this means that the head of the employee and / or representative of the financial department checked the checkbox), they are moved to the “Agreed Travel” list. An application for leave falls respectively in “Agreed Leave”, etc. After that, you need to notify the employee that his application has been agreed.
Suppose we want to automate this process so that the application, after approval, moves to the desired sheet automatically, and the employee receives a notification about the change in the status of the application. Consider what we need for this.
Necessary tools
To develop the model, we chose ide from the Jetbrains MPS (Meta Programming System). As a language for modeling, the d0SL language is used - Delta0 semantic language, created on the basis of semantic (logical) models.
The whole process of installing Jetbrains MPS and the necessary plug-ins is fully described here: https://d0sl.github.io/en/quick/installation/ .
You can install the finished Trello board model at the link: https://d0sl.github.io/en/quick/trello/ .
Semantic model. What happened?
Let's see what the resulting semantic model of Trello boards looks like. It contains our rules:
- Is checkbox checked - Checks if the checkbox named requiredCheckBoxName is checked in the card with id cardId. This way we can check whether our Application is approved or not.
- moveCard - Moves the cardId card to list and adds a comment to the application for the user

The model has a predicate checkBoard, which is called for each card in the board. The identifier of the card, the name of the user who performed the last operation with the card, the sheet from which the card was moved, and the sheet in which it is now located are transferred to it. Further in checkBoard we can set the rules by which we plan to process our applications.

Note that semantic modeling allows you to put all the logical business rules into one document and write these rules in the language of the subject area, “native language” for users of the model.
The ability to do something with the card is provided by the base TrelloBoard model, which is as follows:

If we run the model, as soon as the application in the “For approval” sheet passes the approval process,

The system will move it to the appropriate section and notify the card maker of the change in the application status.

If, however, an application that has not been agreed to be tried to be moved manually, the system will send it to the place and write an angry comment.
And what's under the hood?
The basic TrelloBoard model is essentially an interface that we implement in Java (in this case, in the class com.gav.semanticTrelloBoard.TrelloBoardDSL).
It looks like this:

We assign function names using decorators and implement them.
We also have the AiTrelloBoard class, which allows us to work with Trello. It contains java implementations of functions such as start:

In the trelloBoard.properties file, we hold all the trello api parameters (such as application_key, board_id, etc.) and last_update_timestamp - timestamp of the last update.
Thus, at the cost of not too much effort, we can automate the necessary business processes in Trello. Using and maintaining this solution is much more convenient than program code.
Obviously, the possibilities of semantic modeling are not limited to solving this problem. After all, if in the classical approach to solving problems the analyst first creates specifications, on the basis of which developers subsequently implement the architecture and write the code, then when using the semantic modeling language d0sl, the analyst can create task specifications in the formal logical language, which are converted into executable code without human intervention. This can significantly reduce the cost of developing, deploying and testing new services.
We made the solution for working with Trello open and put it on github .
We would like not only to provide a tool for process modernization in Trello, but also to demonstrate on this simple example the advantages of using such a modern approach as semantic modeling. We will be glad if you can add something of your own to this case, and share your experience in using our solution.
useful links
Read more about the semantic modeling language d0sl here .
The mathematical foundations of semantic modeling are outlined here .