cancel
Showing results for 
Search instead for 
Did you mean: 

JS how create FromData in .bpmn20.xml using Nashorn(JDK 8)

bearson
Champ in-the-making
Champ in-the-making
Hello, dear community.
I tried to use js in .bpmn20.xml. Now I know, that using JDK 8, I using Nashorn JavaScript engine. But how create new FormData in JS with Nashorn?
I tried, like that:
<javascript>var data = new org.activiti.engine.form.FormData();</javascript>
but get error: Cannot create new object with constructor org.activiti.engine.form.FormData.

What is the right way to create FormData? And with Nashorn can I use normal JS code? How to load package which need to JS?
Before is was simply use Rhino in older JDK.

Sorry for a lot of questions and thanks for understanding
2 REPLIES 2

vasile_dirla
Star Contributor
Star Contributor
Hi,
1. org.activiti.engine.form.FormData is an interface, so this could not be instantiated.
2. Depends what you understand by "normal javascript code", if it contains, window. or document. etc.. (browser specific things) will not work because there is not a browser context to have such objects. (if it's just javascript language but not browser related it should work because this is supposed to do a javascript engine)

bearson
Champ in-the-making
Champ in-the-making
Hello, thank you for you answer, and is it possible to send XmlHttpRequest from JS? Any possibilities to do that?
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.