I want to resolve this problem i have to display a message of alert that is going to show based on a expiration date, when the date reach 3 days before expiration the message has to be shown to the user.
Assuming you need this in your GUI (i.e. a section rule), here's how you can solve it. Add two date properties to your case type - the expiration date as well as a reference date. The latter one could default to today's date, or the date your case was created. You can use a declare expression to modify the current date (e.g. subtract n days since you want to warn before your something expires).
** edit: just realized I switched reference date with expiration date - the logic stays the same though **
Here's an example - this uses the current date minus three days:
Then, in your section rule, add a label that contains the warning and set its visibility condition to a When rule. Create that rule and configure it as follows:
Here's the whole thing in action:
Keep in mind that this does not automatically trigger an action (what if your users don't perform this action?). Depending on your use case, SLAs can be more useful here (e.g. send notifications when goods turn bad soon, wish I had that for my fridge).
Thanks for the quick reply, the only thing that I'm going to be missing is that the Expiration Date at the beginning will take the value of -3 for today, tomorrow has to be -2, the day after has to be -1 and so on.