Filetypes Counter Upgrade Problem

Post Reply
RunDontStop
Member
Posts: 51
Joined: Mon Apr 05, 2021 8:03 pm

Filetypes Counter Upgrade Problem

Post by RunDontStop »

I have an interesting situation. I use FileTypes counter. A LOT. All of my production flows have the element, and then connections reference the private data from the elements further down the line.

So my problem is: a few months ago, I updated from Folder Apps v2 to Folder Apps v3. For some reason this broke all of my production flows. I can't say much more than that - I just remember tons of jobs in the Problem Jobs, and prepress went down. I immediately rolled back to the older version to get us up and running again.

I want to try this upgrade again. But I fear everything will break, and I will be scrambling for a solution.

In the newer version documentation I can see that in addition to private data, Switch creates a dataset. In version 2, I have the private data keys defined. It stands to reason that upgrading the app would hold those same keys and everything should still work. The additional dataset would be added, but I would not be using that because it is not available to me now. I suspect that the upgrade version errors may be Switch attempting to make this dataset and for some reason it fails Who knows?

I am running Switch 2021 Fall on a Mac, running OS Monterey.

I know this is a vague question. Has anyone else experienced this same issue? If not I will just have to break everything and figure out how to get this upgrade working. I don't want to keep using an older version of an app, especially if I upgrade Switch to a newer version.
User avatar
magnussandstrom
Advanced member
Posts: 345
Joined: Thu Jul 30, 2020 6:34 pm
Location: Sweden
Contact:

Re: Filetypes Counter Upgrade Problem

Post by magnussandstrom »

Some apps need to be re-configured after upgrading to a newer version, it's mentioned in the text below the version selection "Be aware that changing the version of your app could break a Switch flow."
laurentd
Member
Posts: 137
Joined: Wed Mar 13, 2019 2:06 pm

Re: Filetypes Counter Upgrade Problem

Post by laurentd »

I wrote the Filetypes Counter app.
Happy to read you use it a lot.

Versions 3 and 4 are now written in Node.js, and add a dataset with all the info.
And indeed, the same private data keys as in v2 are added, so it does not break anything in your flow.

You write jobs go to the Problem jobs folder.
I recently detected this problem can happen, only when you put Filetypes Counter twice (or more) after each other in the flow, with the same dataset name. The second Filetypes Counter can not overwrite the existing dataset.

I have created a v5 with a fix.
Freddy is adding some fixes or new features to other apps of the Folder Apps bundle.
When this is ready, we will release the v5 of Folder Apps.
Laurent De Wilde, Solution Architect @ Enfocus
RunDontStop
Member
Posts: 51
Joined: Mon Apr 05, 2021 8:03 pm

Re: Filetypes Counter Upgrade Problem

Post by RunDontStop »

Thank you! This makes sense. Yes I have instances of the element one after the other. And so these of course would default to the same dataset name, because I currently do not have one. I probably could just change these to something unique immediately after upgrading the app.

I just upgraded to Switch Spring 2022, just a few hours ago. Everything seems to be OK with that and the older version 2 filetypes counter. One of the reasons I was hesitant to upgrade Switch was because of this older app, but the version 2 folder app does appear to be compatible with 2022 spring. I got a message that other apps had to be updated but that was not one of them.

I think some time soon I will take the leap and update Folder Apps to v4 and just go through the elements one by one and make unique dataset identifiers. And of course when v5 is released I will update to that. Thank you for your help.
RunDontStop
Member
Posts: 51
Joined: Mon Apr 05, 2021 8:03 pm

Re: Filetypes Counter Upgrade Problem

Post by RunDontStop »

I wanted to update on this. I installed v4 today. And shortly after I was forced to roll back to version 2.
I isolated one problem (out of many), but I cannot figure out what caused it.
I have a Filetypes counter that counts XMLs in the job. The private data key is "xmlcount"
After the subsequent folder I have 2 outgoing connections. One, "xmlcount.xml.count" is equal to 1. The other, all other jobs.
So the particular job I submitted indeed had only one XML. But, it took the "all other jobs" connection. Before rolling back to the older version, I saw that with this job that went the wrong way, my connection variable clearly stated false - but it should have been true.
After rolling back, the job, when resubmitted, went through on the proper connection.

In other words:

1. Private data key "xmlcount"
2. Version 2: "xmlcount.xml.count" is equal to 1. (boolean, "true")
3. Version 4: "xmlcount.xml.count" is not equal to 1. (boolean, "false")

The job has only one XML. Version 2 is correct. Version 4 is not.
laurentd
Member
Posts: 137
Joined: Wed Mar 13, 2019 2:06 pm

Re: Filetypes Counter Upgrade Problem

Post by laurentd »

When I try your condition "xmlcount.xml.count" is equal to 1, this returns false indeed.
The correct condition is [Job.PrivateData:Key="xmlcount.xml.count"] is equal to 1.
This returns true, and the job goes to the expected connection.
Laurent De Wilde, Solution Architect @ Enfocus
Post Reply