# Using Spring Expression Language to invoke static methods in Flowable

**URL:** https://forum.flowable.org/t/using-spring-expression-language-to-invoke-static-methods-in-flowable/2990
**Category:** Flowable Engine
**Created:** [December 4, 2018, 6:54pm UTC](https://forum.flowable.org/t/using-spring-expression-language-to-invoke-static-methods-in-flowable/2990 "2018-12-04T18:54:36Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![PascalSchumacher](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/pascalschumacher/32/336_2.png) [@PascalSchumacher](https://forum.flowable.org/u/PascalSchumacher)
#### Post date: [December 4, 2018, 6:54pm UTC](https://forum.flowable.org/t/using-spring-expression-language-to-invoke-static-methods-in-flowable/2990/1 "2018-12-04T18:54:36Z")

</div>

While using Spring Expression Language in flowable to invoke non-static methods works fine, e.g.

`#{VariableName.matches('\\s+\\w+\\s+')}`

it does not seem possible to invoke static methods, e.g.

`#{T(java.time.LocalDateTime).parse(VariableName).isAfter(T(java.time.LocalDateTime).now())}`

fails with:

`org.flowable.common.engine.impl.javax.el.ELException: Could not resolve function 'T'`

Am I doing it wrong or is it just not possible?

Thank you very much in advance!

**Edit** :

As workaround I tried using constructors, e.g.

`#{new java.text.SimpleDateFormat('yyyy-MM-ddHH:mm:ss').parse(VariableName).after(new java.util.Date())}`

but this fails with:

`org.flowable.common.engine.impl.de.odysseus.el.tree.TreeBuilderException: Error parsing '#{new java.text.SimpleDateFormat('yyyy-MM-ddHH:mm:ss').parse(VarAttr01).after(new java.util.Date())}': syntax error at position 6, encountered 'java', expected '}'`

---

<div class="post-metadata">

### Author: ![PascalSchumacher](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/pascalschumacher/32/336_2.png) [@PascalSchumacher](https://forum.flowable.org/u/PascalSchumacher)
#### Post date: [February 15, 2019, 9:43am UTC](https://forum.flowable.org/t/using-spring-expression-language-to-invoke-static-methods-in-flowable/2990/2 "2019-02-15T09:43:47Z")

</div>

To answer my own question: Only the bean part of the Spring Expression language is awailable in Flowable.

---

<div class="post-metadata">

### Author: ![joram](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/joram/32/26_2.png) [@joram](https://forum.flowable.org/u/joram)
#### Post date: [February 15, 2019, 10:25am UTC](https://forum.flowable.org/t/using-spring-expression-language-to-invoke-static-methods-in-flowable/2990/3 "2019-02-15T10:25:38Z")

</div>

In expressions, Juel is currently the expression language that is being used.

If you want to swap that with Spring Expression, you’d have to swap the low-level expression factories, manager, etc. on the engine level.
