Skip to content

Instantly share code, notes, and snippets.

@wmfairuz
Created April 4, 2014 09:44
Show Gist options
  • Save wmfairuz/9971364 to your computer and use it in GitHub Desktop.
Save wmfairuz/9971364 to your computer and use it in GitHub Desktop.
Do calculation in mini lang
<!-- A = B * C -->
<calculate field="A" type="BigDecimal">
<calcop field="B" operator="multiply">
<calcop field="C" operator="get"/>
</calcop>
</calculate>
<!-- A = A / 100 -->
<calculate field="A" type="BigDecimal">
<calcop field="A" operator="divide">
<number value="100"/>
</calcop>
</calculate>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment