9 Replies Latest reply on Apr 16, 2012 3:21 PM by Katie Hughes

    Dispatch Timing Issues

    Katie Hughes

      I am trying to copy a composer file to an external location so that another program can read it and send out to our intranet.  The problem is that the external program needs the file name to be in a specific sequence.  What I wanted to do was use the dispatch to rename the file, then copy it to the external location, then rename the file back to it's original name.  I have tested all of these things separately and the dispatch works great, but when I try to put them together in order so they execute at the release state, the timing issues cause the dispatch action to fail.

       

      I noticed a wait command, but I'm not creating/deleting a file and I'm not working with a registry value.  Is there something I could add that would help with the timing of each command?  I'll attach a screen shot of what I have so far.

       

      Thanks for your time and your help. It is greatly appreciated!

       

      Dispatch-RenameCopy.JPG

        • Re: Dispatch Timing Issues
          Ravi Teja

          Hi Katie,

                      Currently i dont have EPDM...but i guess the problem is with 7,8 Line.

           

          Regards

          Ravi T

          • Re: Dispatch Timing Issues
            Wayne Matus

            Is it a timing issue or a permissions issue. Do you have permission to rename a file in the released state?

            • Re: Dispatch Timing Issues
              Ravi Teja

              Hi Katie,

                         Find the attached Dispatch,

                         I am able to rename,copy,rename a file.

                         I recalculated the Location of newly renamed file.

                        I am coping the file from my local view to D:\

               

               

              Data card have two value "Author","Comment".

               

              Filename  = 1.txt

               

               

               

              Dispatch renames the file to author.txt ,copies it to D: and renames it as commnet.txt

               

               

               

              Havent tested on a Network location.What is the error meesage you're getting?

               

               

               

              Regards

              Ravi T

              • Re: Dispatch Timing Issues
                Katie Hughes

                Wayne,

                I guess it could be a permissions issue, but I thought I had permission for "Can administrate add-ins".  Is there another place I should be checking for permissions?  I'm still on the fence on wether or not it's a permissions issue.  One reason why I think it could be permission issues is because one of the errors says "Error copying file: ... Access is denied.".  However, I'm not sure that it is a permissions thing because if I run all of the steps seperately, everything seems to work just fine.  I'll add picutres of my user settings and error messages below.

                 

                Ravi,

                Thanks for the dispatch file.  I will take a look at it to see if I can get it to work for me.  From a quick glance at it, it looks pretty much like the steps I have taken, but I'll try to use yours to see what I get.

                 

                Thank you both so much for your time and your help! I really appreciate it.

                 

                UserProp-PDM.JPG

                 

                CopyError.JPG

                 

                RenameError.JPG

                  • Re: Dispatch Timing Issues
                    Raghavendra Bhagwan

                    You probably might also have to look for the permission Add / Rename file at the destination & source states.

                     

                    Just my two cents !

                     

                    Cheers !

                    Raghav

                      • Re: Dispatch Timing Issues
                        Katie Hughes

                        Hi Raghav,

                         

                        Thanks for your response! I checked those permissions as well and the Add or Rename file is selected for every state in the workflow (at least they are for now until we can get this dispatch to work correctly).

                         

                        Originally I thought that might be the problem too!

                         

                        Thanks for your suggestion!

                         

                        ComposerWFStatePermissions.JPG

                          • Re: Dispatch Timing Issues
                            Raghavendra Bhagwan

                            Hello Katie !

                             

                            Have you enabled don't allow duplicate file names in the vault ?? Looking at the error messages and the sequence of steps. You are first copying the file to a folder and then renaming it.

                             

                            I guess its not able to copy and hence its failing.

                             

                            Hope this helps !

                             

                            Cheers !

                            Raghav.

                              • Re: Dispatch Timing Issues
                                Katie Hughes

                                Hi Raghav!

                                 

                                I have not enabled the duplicate file names. My goal was to change the current file name, then when the file was copied, I would try to send it to a different location (the destination file and the source file were never the same). Then after the file was copied, I wanted to change the file name back to it's original part number.

                                 

                                The first rename got the file to be in the correct naming convention for our other program. Then the copy was supposed to move the file (with the new name) to another folder so the our other program could read it.  Then I wanted to rename the file again so that our original file name was used in the vault. (If that makes any sense.)

                                 

                                Thanks for your thoughts! It's always nice to have a fresh pair of eyes looking at it.

                        • Re: Dispatch Timing Issues
                          Katie Hughes

                          So I think I made this way more complicated than it needed to be... sorry!!

                           

                          If I do the rename during the copy phase (in the destination file window), I don't need the rename actions.

                           

                          First of all I created a couple of different variables like I had done in my previous attempts.  I made variables for the part number (DwgNumber), the current revision (CrntRev), the method variable (MethodVar), and I created one for the folder path of where I wanted the copy of the file to go (SaveLocation). The first three variables were set to the "Variable value from selected file(s) datacard" type, while the last variable was set to the "Static string" type.  If I tell the "Copy file" command to go to %PathToSelectedFile% for the source file, then I can use the variables I created for the destination file. I used the variables to setup the destination file, which made things a little bit more organized. So my "Copy file" content would look like:

                           

                          %PathToSelectedFile% => %SaveLocation%\%DwgNumber%_%CrntRev%_%MethodVar%.smg

                           

                          I hope that makes sense... I'll add a picture to hopefully make things a little clearer.  This way seems to be working just fine.

                           

                          Thank you all for your time, suggestions, and help! I really appreciate it! Sometimes having a fresh set of eyes or someone with a different way of thinking about it really helps...

                           

                          Thanks again!

                           

                           

                          CopyRenameDispatchWindow.JPG