cancel
Showing results for 
Search instead for 
Did you mean: 

java.lang.ClassCastException: java.lang.Double cannot be cast to java.lang.Integer when setting workflow priority

douglascrp
World-Class Innovator
World-Class Innovator
I'm trying to change a running workflow's priority as described at this Alfresco's forum post https://forums.alfresco.com/forum/developer-discussions/workflow/javalangclasscastexception-javalang...

Please, anyone can take a look at this and try to give an idea on how to fix or any workaround for this?

Thank you in advance.
7 REPLIES 7

jbarrez
Star Contributor
Star Contributor
Ok, even though it's wrong that it's stored as a double … did you try casting it to an int, just to make it run?

douglascrp
World-Class Innovator
World-Class Innovator
Yes, I tried that too, but it doesn't matter which data type I use, it always saves that property as double into the database.
Only the first save, which is when the workflow is started, set's the workflow priority as integer into the database.

At the moment, I'm trying to reimplement my task logic using a custom Java TaskListener.

jbarrez
Star Contributor
Star Contributor
Hmmm i see. The task listener approach in Java should indeed be safer, as the type is explicit

douglascrp
World-Class Innovator
World-Class Innovator
Everything worked using Java.
So this is the way to go…

But I think the execution javascript root object should be able to deal correctly with ootb properties.
Maybe including a new parameter for execution.setVariable method, like:

execution.setVariable("variable", "value", "type");

jbarrez
Star Contributor
Star Contributor
That would indeed be a possibility that would solve the issues. Interesting thought.

douglascrp
World-Class Innovator
World-Class Innovator
Do you think we can wait for something like that?

jbarrez
Star Contributor
Star Contributor
Well, the cheesy answer is that we happily accept pull requests 😉 That's the quickest way to get it in. Otherwise, it will have to battle with other priorities … and frankly at the moment there are some other areas that need a lot of love right now :s
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.