Darin Wilcox [
https://community.jboss.org/people/zoikks] created the discussion
"Human Tasks showing Marshalled Objects in FTL"
To view the discussion, visit:
https://community.jboss.org/message/755214#755214
--------------------------------------------------------------
Hi,
I'm running jbpm 5.3.0.Final on JBoss 7.1.1 along with an H2 database. Things are
working well, but the arguments being consumed by the HumanTasks are being displayed in
the FTL as marshalled objects (see below):
https://mail.google.com/mail/u/0/?ui=2&ik=3d9e494abb&view=att&...
https://mail.google.com/mail/u/0/?ui=2&ik=3d9e494abb&view=att&...
I had to dig into the code jbpm-gwt-form code and modify the
TaskFormDispatcher.provideForm(FormAuthorityRef ref) near the bottom of the method so it
looks like this:
if (input instanceof Map) {
Map<?, ?> map = (Map) input;
for (Map.Entry<?, ?> entry: map.entrySet()) {
if (entry.getKey() instanceof String) {
MarshalledContentWrapper val =
(MarshalledContentWrapper)entry.getValue();
Environment env = EnvironmentFactory.newEnvironment();
ContentMarshallerContext cmc = new ContentMarshallerContext();
ObjectMarshallingStrategy[] strats =
(ObjectMarshallingStrategy[])env.get(EnvironmentName.OBJECT_MARSHALLING_STRATEGIES);
cmc.addStrategy(strats[0]); // Should only have one option
here...
Object o =
ContentMarshallerHelper.unmarshall("org.drools.marshalling.impl.SerializablePlaceholderResolverStrategy",
val.getContent(), cmc, env);
renderContext.put((String) entry.getKey(), o);
}
}
}
This change now results in:
https://mail.google.com/mail/u/0/?ui=2&ik=3d9e494abb&view=att&...
https://mail.google.com/mail/u/0/?ui=2&ik=3d9e494abb&view=att&...
Is this a bug or have I done something incorrect?
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/755214#755214]
Start a new discussion in jBPM at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]