This content has been marked as final.
Show 1 reply
-
1. Re: KIE Workbench- Script Task- Writing java code and imports
bungongelo Jun 21, 2018 7:56 AM (in response to suchi052)I know this is bit of a necro, but I had a similar problem and this is the first result I got. So finally managing to solve the type error I wanted to give my solution.
In the script task it seems (somebody can correct me if I'm wrong) that you can't use imports, but always have to use full paths to each class. In my case I was having problems with using Date and Calendar. This was fixed by writing java.util.Date and java.util.Calendar instead of just Date or Calendar. So for example
Date dateVariable = new Date(); Doesn't work, but should be
java.util.Date dateVariable = new java.util.Date();
I hope this helps some other people who might be having the same kind of troubles.