cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Translate the entire conversation x

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

avillanueva
23-Emerald I

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

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?

ACCEPTED SOLUTION

Accepted Solutions

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("]", "");
    }

 

View solution in original post

4 REPLIES 4

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
(To:avillanueva)

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

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.

HelesicPetr
22-Sapphire II
(To:avillanueva)

@avillanueva 

Agree it is a bad design but what can you do with it? Nothing 😄 so you have to adapt to that state like me 😄  

PetrH

Announcements
Top Tags