# Implementing the final step

We shall now implement a rule that calculates the total and one that create the subscription we propose to the end user.

![](/files/-M-FW_k29zDpQs2p6634) In the rule above, we have to use custom code as when working with java Bigdecimal class (which we shall use when working with financial amounts) the standard functions do not work.

![](/files/-M-FW_k4dmkLklLkxg8i)

In the second rule, we use the definitive price we create before. in the picture shown below, we can see an example of the test server we shall present in the next tutorial

![](/files/-M-FW_k67qGbVYrUfvVe)

![](/files/-M-FW_k83RyEVq2URbg-)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://nicolas-heron.gitbook.io/droolsonboarding/brms/implementing_the_subscription_step.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
