24 Replies Latest reply on Mar 6, 2009 7:02 PM by Corey Hinman

    Failed to save workflow

    Corey Hinman
      I'm having a very frustrating problem....I have a workflow, with a LOT of transitions, maybe 60+. Every 2nd or 3rd time I try to save it I get

      "failed to save workflow "x" to the database.
      Cause: Could not access the item in the database.


      Other workflows don't seem to be giving me this issue. Can anyone help?
        • Failed to save workflow
          Corey Hinman
          Is there a limit to the number of OR conditions on a transition? I'm using a transition to keep a file at a specific state if any conditions aren't met (using the or function).....when I add another Or condition is when I get the failed to save error.
          • Failed to save workflow
            Ben Kalinowski
            You might not find something written on it, but you might be pushing the limits on the transition count in a single workflow. There likely isn't a "limit", but it seems like there would be alot of database power consumed if it has a big workflow to keep track of. This is just my opinion, of course.

            You might want to consider breaking this workflow up into a couple of smaller ones. I started out with a big workflow and found it awkward to work with. I moved to a "Main" workflow which was the first place files landed and then they transitioned out (automatically and manually) to the proper sub-workflow.

            Plus, with a workflow that big, you must be going crazy managing those arrows! ;.)

            Good luck!
            • Failed to save workflow
              Here is what tech support told me when my customer ran across the same issue.

              The error in the sql database indicates that the maximum number of table names is being exceeded (256).
              • Failed to save workflow
                When you save the workflow, behind the scene EPDM is creating a SQL function that runs when you are using the workflow. The 256 limit is the number of table names in this SQL function. In this case there were 60 conditions in the workflow when he got the error message.
                • Failed to save workflow
                  If you want to see the function that it is trying to save, in the admin tool, right mouse on the Archive Server and "Show the Archive Server log". Find the error with description "SQL-query failed: Create Function". Double click on it and you can see the full function in the description area of the dialog box.
                    • Failed to save workflow
                      Jason Ebersole
                      I don't know if this is related to your problem, but it reminds me of something that I think would make the notification process alot more flexible.

                      Wouldn't it make sense to have the ability to use a variable in the notification settings instead of hard coding users or groups? Corey, I know you are getting around this by doing alot of looping in your workflows, but this seems obvious to me.

                      As it applies to EC, you could define key users on an EC file card using drop down boxes at EC creation; these selections set variables that are then called from the workflow notifications at the appropriate transitions.

                      I'm not a programmer, but it seems this would be a pretty easy thing for Solidworks to add. Right?


                        • Failed to save workflow
                          Corey Hinman
                          Yes, and I've put in an enhancement request in the past to read variables from a data card to populate a notification email.

                          It is SUCH a PITA right now to allow parallel approvers with endless combinations of approvers.
                            • Failed to save workflow
                              Jason Ebersole
                              I just submitted a workflow notification enhancement request:

                              I think it would greatly enhance Workflow if variables (set to userIDs) could be used in configuring notifications. For Engineering Change purposes, this would enable the ability to set key individuals on an EC filecard (in turn setting variables), and then using these variables as the SENDTO person for notifications at the appropriate workflow transition.

                              Does this about sum it up?

                                • Failed to save workflow
                                  Corey Hinman
                                  yes, with the primary purpose being the need to send pinpointed email notifications with some flexibility. Otherwise needless group emails are sent.
                                    • Failed to save workflow
                                      That is a nice enhancement, but not really needed in Enterprise 2009 for sending email to selected users. In 2009 you have dynamic notifications. For the transition, set your group to dynamic. Then when a file passes through this transition a list of users in that group appear. The user selects the person that needs to be notified and only that person gets the notification. Another nice feature in 2009 notifications is that if you move an assemblies and all of it's parts through a transition at the same time, only one notification is sent that lists all of the files. In 2008, if you had ten people in a group and you approved an assembly with 99 parts, you would send out 1000 notifications. In 2009, it would only be one.
                                        • Failed to save workflow
                                          Jason Ebersole
                                          I'm running PDM2009 SP2 and I do not see this Dynamic checkbox.
                                            • Failed to save workflow
                                              Jason Ebersole
                                              Oops. I was looking in the wrong place. It's only on transitions; not states.
                                              • Failed to save workflow
                                                Corey Hinman
                                                Wayne...the problems I saw with Dynamic notifications after reviewing it with my VAR.

                                                1- First and foremost this does not facilitate a parallel approve process. I have a lot of hard coded variable checking in Enterprise, but I would offer a friendly challenge to anyone with 2009 (I'm running 2007) to show me a more flexible, parallel approval system from an end-users perspective. Def more work for the admin.

                                                Dynamic notifications are a nice step, but they don't cross the goal line.

                                                2- Many times in the lifecycle of an ECN the person that passes the file(s) through that transition will not know all of the required approvers. As an example, in our company the Engineer has "ownership" of the ECN and assigns the needed approvers at the beginning of the process. The ECN is then sent to a prepatory state, CAD, ERP work etc must be completed. The ECN waits until those prep tasks are complete, whoever happens to be "last one done" pushes the ECN to the actual Approval step. SO they might not know the needed approvers, or will need to enter the information a second time (the engineer did it once before).

                                                3- I'm not sure "backup" approvals would be possible. Each user has a transition which will set the ECN as "Approved" by them. In some cases if the person is unavailable for a week or so, their boss will need to approve. This is done by giving the supervisor Permit access to the transition.
                                  • Failed to save workflow
                                    How many approvals are required out of the 100 potential?
                                      • Failed to save workflow
                                        Corey Hinman
                                        I would say the most being 8-10, generally. But they vary based on the customer, the affected facility, etc.

                                          • Failed to save workflow
                                            Corey Hinman
                                            Take a look at the Data Card/ECN form I'm working on.

                                            The user selects who they want to notify, and if they are an approver, or are only to be notified.

                                            Once submitted the check box and the "na" in the date field will get wiped, (if they are notify-only the checkbox will remain checked) and when the users select change state=approve by chinman it will set the check box to and enter the date. Once all the check boxs = 1 the ECN will flow to the next step.
                                              • Failed to save workflow
                                                It would be possible using the API.

                                                I've written a forum to handle our ECR's and ECN's. (Well, I didn't write the whole forum but I used an open source solution and modified it to work with EPDM.) One of our scenarios includes delegating the ECN to a specific user, and the users are read from an EPDM group.

                                                I used our old workflow for when we handled ECN's in EPDM. To perform various actions, I have variables set in the workflow that is read from the forum software. I was contemplating writing my own workflow API, but I figured since it is already there, why not use it? I did remove some transitions and states as the variables take care of redundant actions.

                                                It's worked out quite well. Attached are some screenshots of what I have done. With some imagination and patience I am pretty sure handling multiple approvals is possible.

                                                  • Failed to save workflow
                                                    Corey, I found a workaround for the limitation of conditions on your parallel approval workflow. Basically I used a revision number as a counter. to count the number of people that have approved the document. Then my transition condition is if the counter has reached to correct number. I attached a test workflow for 2 approvals on. The workflow is for files with .xyz extensions and I included a card for this file type.

                                                    The one negative with this workaround that I see is that when someone approves, it adds the current counter as a revision. When you right mouse on the file and "Get Version" you will see the counter as a revision.

                                                    I just remembered, the attached file is Enterprise 2009 Not sure if you can import it in 2007 Enterprise.
                                                      • Failed to save workflow
                                                        Corey Hinman
                                                        Thanks for the idea Wayne.

                                                        I think I was able to circumvent yesterday. I had a transition that would automatically take the file back to "waiting" if every users approval var did not =1. Well that got to be too many Or conditions. So instead I send the file to a sub-workflow with 4 transitions (one for each facility) that checks the Or conditions in smaller chunks. If they are not all complete it goes back to the "waiting" state. once all are complete it moves forward.That seems to be working, though I'm not quite finished yet.

                                                        That being said I'll see if I can import your workflow, have a great weekend.
                                              • Failed to save workflow
                                                Wow Corey, you do have a challenging problem. You are right the dynamic notifications offer no improvements in a parallel workflow process. You are having to send emails at the state, not the transition. With your parallel approval situation, the only option might be using the API. And I am not certain that that is even a solution. InFlow Technologies does have an add-in they developed for sending email notifications. Not sure what Razorleaf has.