[From the sandbox] Trello business process automation using semantic modeling technology

[From the sandbox] Trello business process automation using semantic modeling technology

In recent years, Trello is increasingly spoken of as an excellent tool for organizing and planning. In our company, we have been using Trello for 3 years for planning many processes, starting with vacations, business trips and negotiating contracts and ending with project management.

Unfortunately, not everything is so beautiful in Trello. It is impossible to make a custom workflow. That is, we need to take one employee who will be dragging cards with hands on different boards. How to make this employee can 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. The script can be written only by a programmer or a person who understands how to do this. Support the script will have to him. We have 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.

Approval of travel and vacations

Take the simplest process: the coordination of travel and vacations. According to our existing regulations, every employee who plans to take a vacation or go on a business trip, publishes an application to Trello. The application is on the list & amp; laquoAt the agreement & amp; raquo.

As soon as the application is approved (in fact, this means that the head of the employee and/or a representative of the finance department ticked the required checkbox), she is moved to the list & amp; lao Coordinated trips & amp; raquo. The application for the leave falls accordingly in & amp; laquoConsistent leave & amp; raquo, 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 will move to the desired sheet automatically, and the employee will be notified of the change in the status of the application. Consider what we need to do this.

Required Tools

To develop the model, we chose the ide from Jetbrains MPS (Meta Programming System). The language used for modeling is the language d0SL - Delta0 semantic language created on the basis of semantic (logical) models.

The entire process of installing Jetbrains MPS and the necessary plugins is fully described here: https://d0sl.github.io/en/quick/installation/.

You can install the finished Trello board model via the link: https://d0sl.github.io/en/quick/trello/.

Semantic model. What happened?

  Let's see what the resulting semantic model of the Trello board looks like. It contains our rules:

  • Is checkbox checked - Checks whether the checkbox with the name requiredCheckBoxName in the card with id cardId is checked. This way we can check whether our application is approved or not.
  • moveCard - Moves the cardId card to the list and adds a user comment to the Application.

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

Note that the semantic modeling allows you to make all the logical business rules in one document and write these rules in the language of the subject area, the "native language" for users of the model.

The ability to do something with the card is provided by the basic TrelloBoard model, which looks like this:

If we run the model, then as soon as the application in the list & amp; laquo; For approval & amp; raquo will pass the approval process,

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

If the request that was not agreed, try to move it manually, the system will send it to the site and write an angry comment.

And what's under the hood?

The base TrelloBoard model is essentially an interface that we implement in Java (in this case, in the com.gav.semanticTrelloBoard.TrelloBoardDSL class).

It looks like this:

We set the names of the functions with the help of decorators and implement them.
We also have a class AiTrelloBoard, which allows you to work with Trello. It features java-based implementation of functions such as start:

In the trelloBoard.properties file, we keep all the parameters of the trello api (such as application_key, board_id, etc.) and last_update_timestamp — the last update’a timestamp.

Thus, at the cost of not too much effort, we can automate the necessary business processes in Trello. It is much more convenient to use and maintain this solution than the program code.

It is obvious that the possibilities of semantic modeling are not limited to the solution of 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 code, then using the semantic modeling language d0sl, the analyst can create task specifications in a formal logical language that will be converted into executable code without human intervention. This significantly reduces the cost of developing, deploying and testing new services.

We made the decision to work with Trello open and put it on a githab .
We wanted not only to provide a tool for modernizing processes in Trello, but to demonstrate the advantages of using such a modern approach as semantic modeling with this simple example. We will be happy if you can add something of your own to this case and share your experience using our solution.

Useful Links

You can read more about the d0sl semantic modeling language by reference .
The mathematical foundations of semantic modeling are outlined here .

Source text: [From the sandbox] Trello business process automation using semantic modeling technology