How can I set up the Business Rules Engine (BRE) to color-code the text based on the work status?

I need to display the text indicating the status of a ticket, such as “Pending” or “Completed,” in different colors based on the status. For example, “Pending” should be displayed in red, and “Completed” should be displayed in green.

Screenshot from 2024-07-17 11-15-51

1 Like
  • First, map your service that provides the status of the work.

  • Next, you can place the colored text on the canvas, as shown in the below image:

    Screenshot from 2024-07-17 11-23-59

  • Then, create the Business Rules Engine (BRE) for both colors, such as: OBJ(status) == static(Completed) for green and OBJ(status) != static(Completed) for red.

  • Map this BRE to the visible part in the properties section of the text elements (where data is received from the service).

    Screenshot from 2024-07-17 11-26-28

  • Now, if the status is “Completed,” the text will be displayed in green; otherwise, it will be displayed in red.
    Screenshot from 2024-07-17 11-26-56

3 Likes