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.