Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
Well, hopefully this will help get you started. This simply gets a list of all the signatures for an object and prints their name, vote and comments to stdout.
public static void printAllSignatures(WTObject primaryBusinessObject) {
LifeCycleManaged lcm = null;
if (primaryBusinessObject instanceof LifeCycleManaged) {
lcm = (LifeCycleManaged) primaryBusinessObject;
Vector vector = LifeCycleHelper.service.getAllSignatures(lcm);
if (vector.size() != 0) {
for (Enumeration enumeration = vector.elements(); enumeration.hasMoreElements();) {
LifeCycleSignature signature = (LifeCycleSignature) enumeration.nextElement();
System.out.println("Signed by: " + signature.getSignerName());
System.out.println("Vote: " + signature.isVote());
System.out.println("Comments: " + signature.getComments());
}
}
}
}
How are you gathering comments from your users in the default task? Are you simply using a String variable on the task, which then provides a text box on the task page? If so, you should just be able to extract the text from that variable in your routing method.
-Tom
Many thanks to those who replied and helped me to get this working. Attached is a sample workflow that takes the routing and comments from the Activity 1 and displays it in variable in Activity 2. The results aren't formatted pretty. I just put the different methods in the variable to see what output I could get.
Exactly what I was looking for :).
Thanks a lot!!
Hi Stephen,
I'm trying to modify the weigth and heigth of the comments variable by modifying the task template. As customization guide says, I have updated the following:
<tags:workiteminfo custom_variables="all_activity_variables,comments{width:50;height:5}"/">
<tags:taskpanel propertymodel="${propertyModel}" attrs="comments"/">
but it's not working.
How have you defined your comments textArea in the task form?
regards
Felipe