4 Replies Latest reply on Feb 26, 2017 12:55 PM by Adrian Velazquez

    Run a task using Dispatch

    Salvador Suniaga

      Hi everybody.


      I want to run a task (lets say, Convert to PDF) using Dispatch. What I have in mind is convert to PDF some files once they are checked-in in the vault. Is this can be possible?



        • Re: Run a task using Dispatch
          Steve Ostrovsky

          Nothing explicitly allows you to run a Task with in Dispatch. I think the closest would be to create an Automatic transition and loop the files in your workflow to a state and then back to the initial state since this would kick off when the files are checked in. That way, the PDF Convert Task will run at the onset of the documents lifecycle.

            • Re: Run a task using Dispatch
              Michael Marshall

              Interesting, Steve...


              The way I've done this in the past is:


              Let's say I have two States, "Review" and "Approved". I want to create a PDF of the drawing when the user executes the Transition from "Review". I would create a third 'temporary' State in between them, called "Published". The user actually executes the Transition from "Review" to "Published", with that one Transition taking care of Incr. Revision, faking the 'State' Custom Property (which shows on our drawing) to "Approved", etc. Then I have several Automatic Transitions from "Published" to "Approved", each set to test the files for Conditions to determine which way to publish the PDFs (storing location, versioning, etc.).


              What you're suggesting...I could just have the user-executed Transition be straight from "Review" to "Approved", then put my Automatic Transitions *after* that to the "Published" State, with an additional Automatic Transition back to "Approved"...and files will just zoom through those two Automatic Transitions and stop when they get back to "Approved"?


              That would be cool. I see some advantages...primarily I wouldn't have to fake in the State Custom Property so my drawings "look correct" when published. May simplify some other things. Plus, if one were to implement the new PDM 2017 feature of over-writing previous Versions, it helps to keep the History clean(er).

              • Re: Run a task using Dispatch
                Adrian Velazquez

                I was just looking into possible Using the Shell Execute option in Dispatch to run the Task dll. In my scenario I'd like to avoid using the Workflow Transition because this Task is to save parts as STL for 3D Printing, and I wanted to be available in everyone of our states no just one or two. This is one of the things the gets on my nerves abour PDM, so powerfull, yet so half done.