5 Replies Latest reply on Dec 15, 2014 7:46 AM by Iftach Priel

    Trigger a file to move through one workflow via another workflow

    Chris Bassett

      I have two workflows: CAD Files and ECR. 

      Is there a way that if a drawing in the CAD Files workflow was at the Production Approved state (this is how one of the final stages in our workflow for CAD files)  to another state, such as Work In Progress, all from the ECR workflow.


      So, basically, what I want to do is if an ECR (Engineering Change Request) is approved on a production approved part, I want the PDM to take that specific part and move it back into a Work in Process state in the CAD Files workflow.


      Here is a brief summary of what I'm looking to accomplish:


      a.) Part A is in the Production Approved state in the CAD Files workflow.

      b.)  Someone issues an ECR requesting a change to Part A.

      c.)  The ECR is approved by the Engineering staff and an ECO is issued (Engineering Change Order).


      What I would like to have happen is that when the ECR is approved, it automatically moves Part A From the Production Approved state in the CAD Files workflow into the Work In Process state automatically on its own when the ECR is approved.


      Any ideas on what is needed to do something like this?   I'm aware of the workflow links, but am not sure if I'll get the results I want from that...

        • Re: Trigger a file to move through one workflow via another workflow
          Steve Ostrovsky

          Just use the Workflow link to send files from one workflow to another. RMB in space and select New workflow link, then specific what workflow to go to and what state. Stick a transition between and you're good.


          EPDM Workflow Link.JPG

          • Re: Trigger a file to move through one workflow via another workflow
            Jeff Sweeney

            Is the ECR linked to Part A? I am assuming the ECR is (or could be) in a different workflow?


            Typically you'll need an addin to keep them linked. However if you are clever about the transition names, you can make this work.


            Imagine your Part and ECN are in different states in different workflows. Now imagine coming out of each of those states is a transition named "Approved" (doesn't really matter the transition name, as long as they are the same.)


            Assuming the ECN is the parent, you can RMB click, change state of the ECN and choose "Approve" and since both files can go through a transition named Approved, both files can be moved to there prospective new workflow states.

              • Re: Trigger a file to move through one workflow via another workflow
                Brian Dalton

                This is a method that I've used for this purpose and it's very effective, with one BIG caveat.


                Creating a parent/child relationship between the ECR document and the drawing(s) it controls is done by creating an internal reference via 'Paste As Reference'.  This reference exists only within the EPDM database but it is interpreted by EPDM exactly like an actual file SW reference of the type that binds parts to assemblies that contain them.  The problem is that EPDM wants to treat all references as if they were SW file references that relate an assembly to its parts, consequently when you change the state of a file that has references, it will always attempt to change the state of every file it refers to, if possible, whether you want it to or not.


                For example, if you have an ECR that is intended to control the release of an assembly, when you change the state of the ECR, the assembly file will be changed as well (if the transition names match), but so will every part and sub-assembly in the tree if they are in a similar state.  The only way to be sure that only the one assembly file changes state is to diligently study the Change State dialog box line-by-line and uncheck any files that are not related to the ECR you're transitioning.  For large assemblies, this can be rather tedious.


                Worse, if a user fails to diligently un-check unwanted files, you'll have a group of files that are moved to a new state by mistake.  This causes the EPDM admin (me) to have to roll back each and every unwanted file individually, which is again rather tedious and it can often be quite tricky to identify which files were transistioned by mistake and which were supposed to be transitioned.


                Education is the only weapon against this, but it can be very difficult to get busy engineers and designers to pay attention to details like these.  After 1.5 years I'm still constantly fighting this problem.


                Just a head's up...

                • Re: Trigger a file to move through one workflow via another workflow
                  James Santangelo

                  So it's the workflow transition and not necessarily the state that needs to be the same for the parent object to move the child object?

                • Re: Trigger a file to move through one workflow via another workflow
                  Iftach Priel


                  There may be something you can try. I didn't test it, and maybe someone out there can help you improve it:

                  1. Add a variable to your CAD files called "ECR Status" (or something like this).

                  2. From the CAD workflow "approved" state, make an automatic transition to "work in process", with a condition that the variable "ECR Status" = Approved

                  3. On your ECR files add a variable like "Related CAD File Name". I'm guessing you have something like this anyway.

                  4. Build a simple dispatch that runs when any ECR file goes into approved state. Have the dispatch check out the "Related CAD File Name", set its "ECR Status" variable to Approved, and check it back in.

                  I think it should do the job, two things though:

                  1. In order for this to work, you'll need to save the ECR file in the same folder as the CAD file, or find a smarter way to let the dispatch know the path to the CAD file.

                  2. It only works if an ECR file refers to a single CAD file...


                  hope this helps...