7 Replies Latest reply on Apr 3, 2013 12:38 AM by Tim Webb

    Tasks: set and clear watermark on drawing

    Joy Garon

      Hi All,

       

      I ran into an interesting issue today. We have been successfully setting and clearing watermarks on a drawing as it transitions through a workflow. Until today :-(

      For example, we have a property named watermark in our drawing templates (set to Not for Production). When we transition to Pending Approval we have several actions:

      - set revision variable

      - clear watermark (for drawings using set variable)

      - export XML (for parts/assemblies)

      - run Task to create PDF

       

      The PDF's were created on each users machine.

       

      All worked well until we moved the PDF generation task to a dedicated machine.

      Now the watermark is not being cleared until after the PDF is generated? Anyone else experiencing this type of problem?

       

      SW 2012 SP4 / EPDM 2012 SP4

       

      Thanks,

      Joy

        • Re: Tasks: set and clear watermark on drawing
          Peer Larson

          Hi Joy,

           

          Thanks for bringing this to up.  Some questions that come to mind for me would be: Could this be related to the inability to order actions in specific order (introduced in a previous version) so perhaps the task is running first?  Or would you say that the PDF Machine is simply not getting the updates to its local files but is occurring after the variable change?

           

          Thanks!

           

          Sincerely,

          Peer

            • Re: Tasks: set and clear watermark on drawing
              Joy Garon

              Hi Peer -

               

              It might be or it may need time to finish the task before starting the next...

              I'm exploring the option of somehow putting a wait in the script so the set variable command can finish before the PDF creation begins. The fact that it works on the local machine leads me to believe it might be timing.

               

              Joy

               

              p.s. kind of defeats the purpose of us buying a seat of SW to offload the PDF creation

            • Re: Tasks: set and clear watermark on drawing
              Tim Webb

              Joy, my apologies for the radio silence on this one. I want to study what you've done but won't have the time to dedicate to it until this weekend.

               

              I've done this before, just not exactly.

               

              Tim

              • Re: Tasks: set and clear watermark on drawing
                Tim Webb

                Hi again Joy,

                 

                Made time since this is for you pal!

                 

                I have had issues with the convert task working consistently between machines and I like the idea of moving it to a dedicated machine. Good call.

                 

                My solution was to add a secondary automatic transition to a dummy state which would kick off a dispatch vbs script and wait 1500ms (1.5s) to allow all the background stuff to settle.

                 

                Without the wait, the program would step all over itself on different CPU machines. Bad part was the problem was not always consistent so it would behave in about 3 distinct ways.

                 

                The only way I've found to handle it:

                1. Create dummy state with transition to it allowing only %.slddrw files through
                2. Create a file called "waiter.vbs" in notepade and enter this code "wscript.sleep 1500"
                3. Create a dispatch to execute a shell execute with an argument of the "waiter.vbs"
                4. Set the dispatch to "Halt execution of script until Shell command is completed."

                 

                Adjust the wscript.sleep "1500" parameter to adjust the time the program sleeps. The minimum I was able to get away with was 500ms or 0.5s.

                 

                Please let me know if this resolves it.

                 

                Tim CEPA

                http://www.equivaq.com

                  • Re: Tasks: set and clear watermark on drawing
                    Joy Garon

                    Hi Tim,

                     

                    I'm note sure I follow you completely... Take a look in our Dropbox folder and look at the Prototype workflow and you'll understand the challenge... Pay particular attention to the transition actions when moving from In Design WIP to Pending Approval.

                    My hope was to embed the wait in the 'Advanced Scripting Option' of the PDF generation task.

                    (I put a video in there too)

                     

                    Thanks for taking a look and BTW, no urgency...the funny thing is I tested it on a test vault and it didn't exhibit the problem initially until I looked more closely...

                     

                    Joy