Skip to main content
avillanueva
23-Emerald I
23-Emerald I
July 23, 2025
Solved

Votes on SignatureLink class has been changed. Cannot find notes on this.

  • July 23, 2025
  • 1 reply
  • 512 views

I have a report that pulls votes from esigned workflow tasks that is not working properly in version 13. I check the database in the SignatureLink table and noticed the following:

avillanueva_0-1753304278380.png

Signatures created in 13 are stored differently so my checks are failing in code:

//get signatures for ECN
 QueryResult result=PersistenceHelper.manager.navigate(ecn,SignatureLink.SIGNATURE_ROLE,SignatureLink.class,false);
 logger.debug("Got signatures:" + result.size());
 boolean override=false;
 SignatureLink link=null;
 //check to see if override signature exists
 while(result.hasMoreElements()) {
 link=(SignatureLink)result.nextElement();
...
//is vote from CCB Review or Chairperson decision task
 else if ((link.getVote().equalsIgnoreCase("approve"))||(link.getVote().equalsIgnoreCase("amend"))||(link.getVote().equalsIgnoreCase("reject"))) //ignore sigs from override task

Since SignatureLink is not in the JavaDoc, its likely that this is not a supported class, so if there is another supported method to retrieve this data, I am all ears. I like making improvements like this. What does not make sense is they arbitrarily changed how the data was stored without a note in the knowledge base. If they were going to do that, they should have created a migrator to make all the previous data uniform. I know the vote might be also stored in WFBallot but its done as a vector in a BLOB. I am sure I can fix my code to account for this but did I miss the what's new that discuss this change?

Best answer by avillanueva

I added this method to clean vote value. Now, I have not validated if multiple values would be stored in SignatureLink vote column but I suspect that is what the aim was when they modified to include the brackets. Possibly something with json or other parsing. I will hold this open for a bit to see if PTC folks chime in. 

 private static String removeBracketsFromVote(String vote)
 {
 	return vote.replace("[","").replace("]", "");
 }

 

1 reply

avillanueva
23-Emerald I
avillanueva23-Emerald IAuthorAnswer
23-Emerald I
July 24, 2025

I added this method to clean vote value. Now, I have not validated if multiple values would be stored in SignatureLink vote column but I suspect that is what the aim was when they modified to include the brackets. Possibly something with json or other parsing. I will hold this open for a bit to see if PTC folks chime in. 

 private static String removeBracketsFromVote(String vote)
 {
 	return vote.replace("[","").replace("]", "");
 }

 

HelesicPetr
22-Sapphire II
22-Sapphire II
August 6, 2025

Hi @avillanueva 

My experience is that PTC can change what ever they want without any announcement in the classes that are not supported. 

It is common that if you use class that is not in the JavaDoc you have to check this class every single update if there is no change. 

 

It is same with the database storage value format.

 

PetrH

avillanueva
23-Emerald I
23-Emerald I
August 6, 2025

True but changing the method of storage WITHOUT having a migrator that fixes past entries is just terrible. They would have had to write code at some level to deal with the difference. Bad design IMHO. This is a core object level class so strange it would be listed as not supported.