-
1. Re: Is there a way to make ksession aware service task running in web console?
brucecui Jun 30, 2011 8:57 AM (in response to brucecui)Here are some of my findings:
The exception is threw out by the WorkItemInfo class's update method. From there I found that the code is trying to marshal the parameter map. And the marshal strategies are set in the EnvironmentImpl object when EnvironmentFactory instantiats the instance. The only currently used strategy is a serialize strategy, which requires all objects implements java.io.Serializable interface, which is not by either the StatefulKnowledgeSessionImpl class, or the ProcessRuntimeImpl class. Therefore, it threw out IOException while trying to serialize them into stream.
I'm thinking, if I put one strategy before the serialize strategy, which only accept StatefulKnowledgeSessionImpl or some high level interface, and it doesn't perform serialization, it might be able to avoid this exception.
I found that there are some other strategies, such like IdentityPlaceholderResolverStrategy, defined in the the MarshallerProvider. But the actually used marshal strategy is hardcoded in the EnvironmentFactory. I'm wondering if there is a way to change the strategy array in a declarative way, or I have to change some code to make this happen?