I tried that. So in my Process parameters definition in the property sheet for the Process I entered
myContext as an Object type and the fully qualified class name.
Then in the "Parameter Mapping" section of my custom WorkItem I put the same "Parameter" name "myContext" and the fully qualified class name again in the "Variable" part.
I get this
Caused by: java.lang.ClassCastException: java.lang.Class cannot be cast to com.example.tdm.AClass
Ed