[jboss-user] [jBPM] - Human Tasks showing Marshalled Objects in FTL

Darin Wilcox do-not-reply at jboss.com
Wed Aug 22 14:30:02 EDT 2012


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&th=1394f91a913aa7c0&attid=0.1&disp=emb&realattid=ii_1394f66a5f06c59b&zw&atsh=1  https://mail.google.com/mail/u/0/?ui=2&ik=3d9e494abb&view=att&th=1394f91a913aa7c0&attid=0.1&disp=emb&realattid=ii_1394f66a5f06c59b&zw&atsh=1 


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&th=1394f91a913aa7c0&attid=0.2&disp=emb&realattid=ii_1394f90e84522884&zw&atsh=1  https://mail.google.com/mail/u/0/?ui=2&ik=3d9e494abb&view=att&th=1394f91a913aa7c0&attid=0.2&disp=emb&realattid=ii_1394f90e84522884&zw&atsh=1 

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&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120822/330b1a77/attachment.html 


More information about the jboss-user mailing list