39 Replies Latest reply on Mar 8, 2019 4:25 PM by Tom Helsley

    "Invalid Arguements" during Workflow Export

    Dan Harlan

      When exporting one of my workflows I receive a warning/error that says "An invalid argument was given to the method".

       

      Any idea how I figure out what this invalid argument is? Is their a log file created somewhere with the export that I can use to troubleshoot? Using PDM Pro 2016.

          • Re: "Invalid Arguements" during Workflow Export
            Dan Harlan

            Thanks Jim, my search didn't return that thread, but it still doesn't help because both of those issues listed there were resolved by 2013.

             

            Investigating Joy's suggestion she just posted now about deleted users in workflow notifications.

              • Re: "Invalid Arguements" during Workflow Export
                Dan Harlan

                There does not appear to be any notifications sent to a specific user. All notifications go to one or more groups.There are users who have been deleted in the past. Not sure what that would impact in this case.

                 

                Any other suggestions?

                  • Re: "Invalid Arguements" during Workflow Export
                    Joy Garon

                    Hi Dan,

                     

                    Now it's a process of elimination - try exporting a piece at a time.

                    Users and Groups, workflows, templates, etc.

                     

                    Joy

                      • Re: "Invalid Arguements" during Workflow Export
                        Dan Harlan

                        Thanks Joy,

                         

                        Seems everything exports (users, groups, variables, cards, etc) except two templates, both for SW parts. Gives me an error about invalid Serial Numbers. Not sure if this would have that impact?

                          • Re: "Invalid Arguements" during Workflow Export
                            Joy Garon

                            Dan -

                             

                            Check the templates. Look at the template variables and see if it's getting its value from a serial number (make sure serial number exists) - then check to see if template variables are being written to data cards.

                             

                            File based templates should be fairly simple to recreate, but, I'd want to figure out what was broke first :-)

                             

                            Joy

                              • Re: "Invalid Arguements" during Workflow Export
                                Dan Harlan

                                When I go into one of the templates that fails, I am getting a warning that concerns me and I'm not sure what to do with it.

                                From in the Template I go to; 'Template Cards > Template Variables' and select one of the variables and get the error;

                                "Serial numbers read from the files are no longer supported. Please open the serial number 'PART NUMBER' in the Administration tool and resave it as a list serial number"

                                 

                                I have tried to change the Template Variable to point to a valid Serial number, but I'm not allowed to change it.

                                If I look at the variable (Drawing Number) in the variables, it does not look special, but also in that interface there is no way to assign what serial number it comes from (as expected).

                                 

                                Now, if I look in the Template Card (New Part File) the Drawing Number Variable is linked to the Serial number "RK NUMBER" which is different that what is linked in the Template...

                                 

                                Do I delete the template and recreate it?

                                Do I create a new Serial Number (PART NUMBER) and then try to change it to RK NUMBER?

                                How might this impact users and current data?

                                  • Re: "Invalid Arguements" during Workflow Export
                                    Joy Garon

                                    Dan -

                                    Have you make a complete backup of the vault?

                                    If yes, delete the template and recreate it. However, I do NOT think it is the reason the workflow is not exporting.

                                     

                                    Back to templates, not sure why you are getting that message. It appears you can still create serial number lists (although I would never do it).

                                    Is the template variable getting it's value from a serial number?

                                     

                                    Here are some typical template variable mappings... (this is a file template - folders are different)

                                    Is it is mapped to the card as shown above, change it to <Not copied> - this is the 1st step to backing it out of the template.

                                    Refer to Lessons 9 and 10 in the training manual (hopefully you took training?) for more information on templates.

                                    call your VAR

                                    BTW... this is agony trying to debug in a forum - you really should call your VAR :-)

                                     

                                    Joy

                                      • Re: "Invalid Arguements" during Workflow Export
                                        Dan Harlan

                                        An export of the complete database fails, similar errors (invalid arguments and invalid serial numbers). IT tells me there is a backup at the server level, but since I have not validated that yet, I can't assume it would be useful.

                                         

                                        The template is pointing to a invalid serial number, but not sue how I can change it. Note I'm on 2016 Pro and my UI looks different than yours. And I can't post images either. I think I'm going to have to delete the templates and recreate them. Any warnings or concerns on doing that?

                                         

                                        I have called our VAR, They have provided some help (the SQL script) but due to security, they are in a similar situation as I am with the forums I do appreciate your extensive help. Actually the help from everyone, but especially you and Tom have been exceptional

                        • Re: "Invalid Arguements" during Workflow Export
                          Charley Saint

                          I think the log file in the administration tool will tell you what SQL command failed which is a pretty good indication of what it's trying to export that's probably been deleted.

                           

                          • Re: "Invalid Arguements" during Workflow Export
                            Sam Sam

                            Hi,

                             

                            First, check Export manually - if there are no problems, then, for not to duplicate records, I will repeat the link:

                            Workflow Export Error

                            • Re: "Invalid Arguements" during Workflow Export
                              Tom Helsley

                              I don't know if it is also true for exporting, but I have had trouble saving workflows with transition actions that changed a variable that was deleted or didn't exist.  This was usually from transitions copied from one vault to another, or deleting a variable after it was added to a transition action.  In those cases, the transition action will show the first variable in your list of variables.

                               

                              I noticed that once the error appears, you're hosed - the error doesn't clear until you close the workflow and re-open it.  So, I have to remember to save early and often.

                                • Re: "Invalid Arguements" during Workflow Export
                                  Kamil Wilkosz

                                  Dan Harlan, that what Tom Helsley said can be a reson.

                                  For example, you will notice the same error if you will try to export a template which is using template datacard which were removed or its name were changed.

                                   

                                  Let's check if all data in workflow are up to date. May you changed some name of variable, revision component, task or conditions which couldn't be updated automatically and PDM is trying to collect related data which are no longer avalaible?

                                   

                                  BR,

                                  Kamil

                                    • Re: "Invalid Arguements" during Workflow Export
                                      Dan Harlan

                                      @Kamill Wilkosz, not sure what you mean by "if all data in workflow are up to date."

                                       

                                      I've inherited this system and it is undocumented. So it is very possible that variables have been added, removed, and deleted.

                                       

                                      Are their any SQL queries that would tell me this? Going through the WF manually is prone for error.

                                        • Re: "Invalid Arguements" during Workflow Export
                                          Tom Helsley

                                          Dan Harlan wrote:

                                          Are their any SQL queries that would tell me this? Going through the WF manually is prone for error.

                                          There might be, but I have no clue how to put that one together.  Sounds like a job for super SQL guy Tor Iveroth.  He knows the DB and SQL probably better than anyone else in the SolidWorks realm.

                                           

                                          Otherwise, you have to go to each transition, view the details of each variable changing action and see if the variable it lists matches the description (if the prior admin was diligent about documenting the config well), and/or the "selected" variable is the first in the pull-down list, and does it make sense.

                                           

                                          Alternatively, like Joy said in her first post, you could try it by process of elimination.

                                          1. Create a new query.
                                          2. Copy the states from the problem workflow, to the new workflow.
                                          3. Test saving and exporting.
                                          4. If there are no problems, copy and paste the transitions (one at a time, or half at a time), then repeat step 3.
                                          5. If there are problems, then remove one of the recent pasted states or transitions and repeat step 3.
                                          6. Repeat steps 2-5 until you have either found the problem item, or you have gone through the workflow (hopefully not the later).
                                          7. Whatever element is causing the problem, edit it and look at the actions, conditions, etc.
                                      • Re: "Invalid Arguements" during Workflow Export
                                        Dan Harlan

                                        We are also having trouble with data card variables, so let me check on this. Thanks @Tom Helsey

                                      • Re: "Invalid Arguements" during Workflow Export
                                        Martin Solem

                                        How are Templates, File Cards and Serial Numbers tied to workflows?

                                        If i export all my workflows (RMB - Workflows - Export) in my testvault, the contents are:

                                        If i can export every one of these on their own, i should also be able to Export the whole Workflow.

                                        (I've had my share of errors exporting entire vaults though, stopping on Templates where the source template file is renamed, moved or deleted. Pain in the ah-bum to figure out when there are some 60 templates.... )

                                        • Re: "Invalid Arguements" during Workflow Export
                                          Sam Sam

                                          If you cannot export Workflow - then surely check lists of receivers of notifications - it is necessary to delete nonexistent.

                                          Most likely a problem in it. Check users - possibly among them there are not existing any more.

                                          (Duplicated from other branch - Workflow Export Error )

                                          • Re: "Invalid Arguements" during Workflow Export
                                            Dan Harlan

                                            As a point of reference, in this case the issue is not related to a notification to a deleted user. We ran the SQL query per S-073862 and it came back clean (returned no deleted users associated to transitions).

                                              • Re: "Invalid Arguements" during Workflow Export
                                                Dan Harlan

                                                Let me add that the SQL script above may not find all notification issues. I found after using the suggestion method of creating a new workflow and copy states into it and attempting to save and export I found 3 State based notifications that the SQL script did not indicate yet prevented me from exporting.

                                                 

                                                (Now onto testing the ~100 transitions in the same way)

                                                  • Re: "Invalid Arguements" during Workflow Export
                                                    Sam Sam

                                                    I think, it is improbable that the problem can be solved only with the help of reports, scripts or logic.

                                                    I think that export of Workflow is only a part of a problem.

                                                     

                                                    Therefore, I can offer the following actions which in most cases I managed to solve similar problems.

                                                     

                                                    1. Try export of all Vault. There will be error messages.

                                                    Consider how many will be these messages (so many problems will need to be solved). It is necessary to solve all!

                                                     

                                                    2. If after everything there is any file of export - save it or make the screenshot - for identification of problem places.

                                                    If the file of export did not manage to be received - try export according to sections.

                                                    More probable places of problems (at least at me) are: Workflows, Templates, Cards.

                                                    More probable causes: Variables, Notifications, Conditions, Properties, Categories, Path Names, Actions, etc.

                                                     

                                                    3. Double-check lists of receivers Notifications, query - it is good, but to check having deleted all Notifications (if it is possible) - it is more reliable. I had cases when it was possible to reveal problems - only when delete users. Visually problems were not was visible.

                                                     

                                                    Check all Variables whether correctly they are configured also by delete those that are not used anywhere.

                                                     

                                                    Check observance of different requirements of syntax - for example, used of dividers and characters-; / \% of spaces, etc.

                                                     

                                                    If it is possible - destroy all deleted files - in all vault. Especially created by other users. Make it as Admin.

                                                     

                                                    Check two tables for SQL Server - dbo.BroadcastEvents and dbo.DocumentsActionsInfo - they should be empty.

                                                    Look in Administration - local Logs and Server Logs (click on Server).

                                                    There can be useful information.

                                                    Perhaps, something can be found out by means of Report Generator.

                                                     

                                                    Export that is possible in test Vault - and the rest try to add and repeat manually.

                                                    • Re: "Invalid Arguements" during Workflow Export
                                                      Tom Helsley

                                                      Dan Harlan wrote:

                                                      ... (Now onto testing the ~100 transitions in the same way)

                                                      Whoa!  That's a lot of transitions.  I can see how this is such a bear to tackle.  I broke my workflows into 4 different ones and added workflow links between them at various points.  That makes problems like this much easier to troubleshoot and tackle.

                                                       

                                                      If you are just trying to export the workflow, and the problem doesn't seem to be in the states or transitions, then you might try making a duplicate workflow by copying all the states and transitions from your old one, to the new one, then just exporting it.  Not sure what the goal of exporting the workflow is, but if you are making a duplicate vault for testing or training, then you at least have a way forward.