-
1. Re: Is there anybody who know how to get a process variable's value when get a task by userid?
jiang_hoo Dec 4, 2012 8:03 AM (in response to jiang_hoo)Hi,
the print result is like this:
contractno = MarshalledContentWrapper{content=[B@53e36ec6, marshaller=org.drools.marshalling.impl.SerializablePlaceholderResolverStrategy, type=class java.lang.String}
details = MarshalledContentWrapper{content=[B@787db430, marshaller=org.drools.marshalling.impl.SerializablePlaceholderResolverStrategy, type=class java.lang.String}then,how can i translate them to strings?
the "contractno " and "details " are the vars.
By the way, i use JBPM5.3
All help will to be thankful!
-
2. Re: Is there anybody who know how to get a process variable's value when get a task by userid?
thomas.setiabudi Dec 5, 2012 12:26 PM (in response to jiang_hoo)Hi,
Isn't your code similar to this one https://github.com/droolsjbpm/jbpm/blob/master/jbpm-examples/src/main/java/org/jbpm/examples/humantask/HumanTaskExample.java
?
look at this section at that code:
Task task = taskClient.getTask(task4.getId());
Content content = taskClient.getContent(task.getTaskData().getDocumentContentId());
Object result = ContentMarshallerHelper.unmarshall(content.getContent(), null);
Maybe you can use
ContentMarshallerHelper.unmarshall(..) ?
Since you are using jBPM5.3, the
ContentMarshallerHelper.unmarshall(..) will take 3 parameters if I remember correctly, just try with null for second and third parameter.
Regards,
Thomas Setiabudi