[jbpm-users] Human Tasks showing marshalled arguments in FTL

Darin Wilcox zoikks at gmail.com
Wed Aug 22 14:21:49 EDT 2012


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):

[image: Inline image 2]


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:

[image: Inline image 3]

Is this a bug or have I done something incorrect?

Thanks,

- Darin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jbpm-users/attachments/20120822/8a5bf3a9/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 18697 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/jbpm-users/attachments/20120822/8a5bf3a9/attachment-0002.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 12473 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/jbpm-users/attachments/20120822/8a5bf3a9/attachment-0003.png 


More information about the jbpm-users mailing list