10 Replies Latest reply on Sep 2, 2014 9:05 AM by Brian McEwen

    Entering Data During a Workflow

    Jason Hogue

      Is is possible to prompt a user to enter variable data as a file passes through a workflow.  What I want to do is for certain files (those with no revisions present) allow the user to manually enter the revision as the file reaches a certain transition.

       

      What I have done so far is

      - Set up an import work flow

      - For file with either Alpha or Numeric revision, these files go down certain paths to reach the correct state in my Engineering workflow

      - For files with no revision set, I am forcing these down a No Revision transition

      - In the No revision transition, a task is executed.  This task brings up a data card where the user can enter in the correct revision for the file

       

      Unfortunately, the revision variable is not being populated.

       

      Any ideas??

       

      Thanks,

       

      Jason

        • Re: Entering Data During a Workflow
          Jason Hogue

          As an alternative, if I could just get the data card to pop up when I need it to to allow me to modify the revision, this would work.

           

          At the moment when I save my files for the first time, the part, drawing or assembly data card appears so that I can populate certain fields.  Subsequent saves to not prompt the cards to appear.  Can someone tell me how I can get these cards to appear when I need them??

           

          Jason

          • Re: Entering Data During a Workflow
            Tim Read

            Have you tired using Dispatch?

              • Re: Entering Data During a Workflow
                Jason Hogue

                Tim,

                 

                No haven't tried dispatch yet.  Saw it in the Admin guide so will have a read today.  Thanks.

                 

                Jason

                • Re: Entering Data During a Workflow
                  Jason Hogue

                  Found the perfect command in Dispatch, "Set Variable".....Unfortunately you have to have the files checked out for this action to run.  I need it to run when a file changes state which only happens when the file is checked in...Need to keep researching...

                    • Re: Entering Data During a Workflow
                      Brian McEwen

                      Dispatch can check-out and check-in to set variables.  The easiest Dispatch script you can write would simply block files that have no Revision variable value. That would use the Cancel Command action and a Jump (basically If-Then). You can also block just with a Condition on your workflow transition, but the advantage of Dispatch is it will give a better message to users. 

                       

                      What are you using to automatically bring up a data card?

                        • Re: Entering Data During a Workflow
                          Jason Hogue

                          Brian,

                           

                          At the moment I am bringing up a card by executing a task in a transition.  This task has a card associated with it where the user can enter in a value for the revision.  This blank box is mapped to the Revision attribute.  The trouble is, this value is not being actually written to the attribute. 

                           

                          As for Dispatch checking in and out.  The way I am trying to get this workflow to run is

                           

                          For all files in the Import folder

                          - If Rev = blank

                               Send the file to through a No Revision transition    

                               Call up a card where the user can enter the correct revision

                               Write this revision to the Revision attribute

                               This file will then go through my normal Import workflow to set the EPDM revision and send the file to the correct state in my Engineering Workflow

                          Imported Workflow.JPG

                            • Re: Entering Data During a Workflow
                              Brian McEwen

                              Interesting, I never tried that... so I'm skeptical that tasks are meant for that kind of thing. But it is a clever way to get an input data card. Only tasks I've used are modified Convert and Print. Do you have to put something in the Script? By default it (the generic task) seems to launch SolidWorks in the background, probably don't want that.

                               

                              You remembered to Enable the Task Host  on the computers you are running it on?  (And then select in Execution Method.) Just thinking of things that could go wrong...

                              ... I'd triple check variable mapping. I had one recently where it would write to the card but not to SolidWorks because of typo in my file extension ("slddprt").

                               

                              It does seem like your method should work.

                            • Re: Entering Data During a Workflow
                              Jason Hogue

                              HI Brian,

                               

                              I have had another look at Dispatch and it looks like it can do a hell of a lot more than I originally thought.  Have tried to write an action to handle my revisions but its not working yet.  Will keep reading and tweaking tomorrow.  At the moment I am

                              - Looking for any files being checked in from my Import directory and run this action BEFORE check-in to allow me to use the Set Variable command later

                              - Checking the current revision and if there is something there, Jumping to the end

                              - If there is nothing in Revision, get the user to enter a revision which is mapped a temporary runtime variable Temp Revision

                              - Set my card variable Revision = Temp Revision

                               

                              Thanks for your input Brain and Tim, it is appreciated.

                               

                              Jason

                              Dispatch.JPG

                                • Re: Entering Data During a Workflow
                                  Jason Hogue

                                  Just realised I should not have put the wildcard in there.  Removed it but it didn't fix it anyway.

                                   

                                  Jason

                                  • Re: Entering Data During a Workflow
                                    Brian McEwen

                                    One thing I remembered about Dispatch for check-in... if you do it, it will require lots of testing - try it on assembly files.  I have a Dispatch script that would quickly set the Revision variable with a menu command, it would check-out,  Set Variable and Check-in. Similar to what you are doing but run manually instead of during a transition. But I realized on check-in that it was doing a bunch of referenced files too! Not just the file I selected. Once I realized that I simply removed the check-in step, and made that manual.  I don't fully understand how it decided what to include. I don't know but it may depend on some of the default settings (Try to check-out referenced files when referenced file is checked-out, which is off now).

                                     

                                    The other thing to be aware of is configurations. Is your Revision variable "Updates All Configurations" on the the data card? Dispatch will do all configs unless you specify.

                                     

                                    For debugging Dispatch you can throw in an OK Message box and show all the variables you are using - to see if they are populated the way you think.

                                     

                                    Here is a Dispatch example to give you some ideas (I actually have it turned off).  It doesn't have an input box. You will need the loop (Block Start, Block End) If you run multiple files at once (but in your case they would need to all be at the same Revision).

                                     

                                    dispatch eco example.JPG