JBoss Community

Re: CustormWorkItemEditor + ObjectDataType("MyDomainClass"): Always getting String instead of MyDomainClass in WorkItem

created by sebb in jBPM - View the full discussion

I just figured, that the problem does not start in the WorkItemHandler:

 

See the code part with the comment: "//get current value from node"?

There it happens also while editing my process. If I press OK to save my ServiceTask I cant open it again, because I dont get myDomainClassInstance, but a String object with the toString() representation of myDomainClassInstance...

 

protected Control createDialogArea(Composite parent) {

[...]

//get current value from node

MyDomainClass mdc = (MyDomainClass) work.getParameter("myParameter");

[...]

This code results to a ClassCastException because work.getParameter("myParameter") returns the above mentioned String.

Reply to this message by going to Community

Start a new discussion in jBPM at Community