-
Hi devs, with version 1.9 i have noticed this kind of condition (which id didnt noticed in previous version may be so i think about it right now) BT-161-NoticeResult condition specificaly first part is pretty wild How to cut it from part to part to get true or false ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hello,
Parsing this yourself is indeed challenging and not recommended, the best way to deal with all EFX conditions would be to use EFX: I recommend you start by looking at the sdk1 unit tests: If you use EFX you will benefit from our updates and bug fixes. We have some ideas to demo things like this in the editor demo project but we do not really have time to do it right now. We already demo the use of CVS except that currently the output is only SVRL xml. There is some work to use the meta info found in the SVRL and transform it to JSON to send back to the front-end: |
Beta Was this translation helpful? Give feedback.
The easiest solution would be to create a minimal Java server using Spring Boot + Maven, and use OpenJDK to run it, add dependencies to EFX toolkit, have one API end-point accepting HTTP requests with EFX text and responding with true or false.
Maybe the editor demo could have an API call like that, which you could call on localhost, currently the editor demo is not yet using EFX toolkit, but it could be an idea for later.
Another possibility is to start from the ANTLR grammar provided in the SDK: https://github.com/OP-TED/eForms-SDK/tree/develop/efx-grammar, but that is more difficult than trying to reuse the EFX toolkit.