0 Replies Latest reply on Aug 22, 2012 2:29 PM by Darin Wilcox

    Human Tasks showing Marshalled Objects in FTL

    Darin Wilcox Newbie

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

       

      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:

       

      Inline image 3

       

      Is this a bug or have I done something incorrect?