error:using JavaScript in .bpmn20.xml

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2016 09:46 AM
Hi dear community, I tried to use JS like that:
This xml uploaded perfect, but when I try Start Process, I have error:
<javascript>Reference Error:"console" is not defined at line 3</javascript>
Also I tried create new Form in js:
And again I have the same error.
What I`m doing wrong? In what this error?
Thank you for help
<process id="test_model" isExecutable="true"> <startEvent id="414-013"></startEvent> <scriptTask id="javascriptScript" name="jsTask" scriptFormat="JavaScript" activiti:autoStoreVariables="false"> <script><![CDATA[ var my = "Bla bla bla"; console.log(my); ]]></script> </scriptTask> <endEvent id="0DC2EF"></endEvent> </process>
This xml uploaded perfect, but when I try Start Process, I have error:
<javascript>Reference Error:"console" is not defined at line 3</javascript>
Also I tried create new Form in js:
var form = new FormData();
And again I have the same error.
What I`m doing wrong? In what this error?
Thank you for help
Labels:
- Labels:
-
Archive
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2016 05:21 AM
The javascript interpreter in the JDK does not have the 'console' object, like in a browser.
Use java.lang.System.out.println() (you can do some imports to get away with the code)
Also, js doesn't know anything about the packages. You probably need to add the package before FormData to make it work.
Use java.lang.System.out.println() (you can do some imports to get away with the code)
Also, js doesn't know anything about the packages. You probably need to add the package before FormData to make it work.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2016 05:21 AM
The javascript interpreter in the JDK does not have the 'console' object, like in a browser.
Use java.lang.System.out.println() (you can do some imports to get away with the code)
Also, js doesn't know anything about the packages. You probably need to add the package before FormData to make it work.
Use java.lang.System.out.println() (you can do some imports to get away with the code)
Also, js doesn't know anything about the packages. You probably need to add the package before FormData to make it work.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2016 06:23 AM
thanks a lot, will try to do same, but with import packages.
But what package need for FormData?
Am I right, that all js methods will interpreted in Java to JVM?
But what package need for FormData?
Am I right, that all js methods will interpreted in Java to JVM?
