23 Replies Latest reply on Jul 7, 2011 11:06 AM by Wayne Matus

    "On-The-Fly" email notifications

    Dwayne Morton
      PDMWE allows automatic email notifications to assigned checkers orapprovers when a file changes state in the vault by"Triggers" set in the documents workflow. This is greatfor large companies that have full time checkers, etc. However, ina small company where you wear many hats, this is not so good.

      I would like to use the PDMWE add-in capability to trigger a"Pop up" when a user changes the file state that willallow selection a persons name from a drop down list, read the nameof the currently selected file, and then envoke a PDMWEnotification to that person that he/she has been assigned to checkor approve the file.

      I am not a programmer but I do know what is needed to make thishappen. I was hoping that some of you CAD programmig Guru's outthere can get me started.
        • "On-The-Fly
          Barry Newlands
          I agree with this. We have specifically asked whether this feature was available with our pending decision to purchase PDME.
            • "On-The-Fly
              Brian Peck

              I've also noticed a need for such an add-in, and decided to goahead and learn some PDMWE API to write it. Our reason for needingthis option are different than yours, we do have full timecheckers, however, they dislike being spammed with notifications tocheck files from other departments, and receiving 30 notificationswhen an assembly needs checking is simply annoying. The add-in Ideveloped aims to rid these issues with a simple pop up assuggested.


              Before installation, tweak the included .config file to yourneeds. The VaultName setting is simply the name of the vault youare using. The UserGroup setting is the name of the group whereyour checkers are located (this eliminates the need for the clientto sort through a list of hundreds of names). Finally, the Statessetting is a list of strings with the state names which wouldtrigger the add-in. If you want it for each state in your workflow,simply add more lines to the code.


              I'm relatively new to add-in development, so I welcome any andall feedback regarding your use of the add-in. Hopefully itprovides the functionality you desire. Enjoy.

                • "On-The-Fly
                  J Garon
                  Hi Brian -

                  Just a heads up. I'm not sure what you used to create your add-in, but, if it's VB6 you will need to update it to .NET in the 2008 version of PDMWorks Enterprise.

                  Best Regards,
                  Joy
                  • "On-The-Fly
                    Eric Martin
                    you wouldn't share your source would you?

                      • "On-The-Fly
                        Eric Martin
                        anyone hear from Brian
                        I tested his dll and it works great. Would like to be able tomodify it to allow a selection of users though and to popupdifferent lists based on state of workflow.
                          • "On-The-Fly
                            Joy Garon
                            Hi Eric -

                            A word of caution. The sample will not work in 2008 as it was done in VB6.

                            So, without the source there is not much you can do.

                            Joy

                            p.s. you might want to contact a company called InFlow.
                            I know they sell a similar add-in.
                            http://www.inflow-tech.com/index.htm
                            http://blog.inflow-tech.com/
                            • "On-The-Fly
                              Lucas Dexter
                              Eric,
                              Brian does not work in this field any more. He was actually a college intern for me last summer when we implimented PDMWE. I am not a programmer, unfortunately, so I can not help you out.
                                • "On-The-Fly
                                  Jeff Sweeney
                                  I think I found a pretty nice solution to this problem. What if you had a transition kick off a program [with the file name as a parameter] that would generate an Outlook message pre-populated with the information you would want the email to say. Then, in the Outlook message, the user chooses who the email should go to and clicks "send"? The .NET code would be pretty simple; it would look something like this:

                                  Imports Microsoft.Office.Interop
                                  Imports Microsoft.VisualBasic
                                  Module modMain
                                  Public Sub Main()
                                  'by Jeff Sweeney, may he live long and prosper
                                  Dim strFileName As String = Interaction.Command()
                                  Dim objOutlook As Outlook.Application
                                  Dim objNameSpace As Outlook.NameSpace
                                  Dim objMailFolder As Outlook.MAPIFolder
                                  Dim objMailItem As Outlook.MailItem
                                  objOutlook = CreateObject("Outlook.application")
                                  objNameSpace = objOutlook.GetNamespace("MAPI")
                                  objMailFolder = objNameSpace.GetDefaultFolder(4)
                                  objMailItem = objMailFolder.Items.Add
                                  objMailItem.Subject = "A file needs your approval"
                                  objMailItem.HTMLBody = strFileName & " has gone through a transition and requires you to do something"
                                  objMailItem.Display()'gives the user a chance to modify
                                  objMailItem = Nothing
                                  objMailFolder = Nothing
                                  objNameSpace = Nothing
                                  objOutlook = Nothing
                                  End Sub
                                  End Module

                                  Feel free to use this as is or tweak it how you like. Just leave the first comment line in .

                                  I suppose I shouldn't get into too much detail here. I went into more detail in my blog if you want more information.
                                    • "On-The-Fly
                                      Christina Seay
                                      Jeff,

                                      Thanks for this program... it works wonderfully!

                                      One question though... is it possible to send an email with this method to a person listed in a variable on a data card?

                                      I'm wanting to send an email to the person that started a file along the workflow. I can set a variable that holds the currently logged in windows user at the beginning of the workflow when a user submits a file for approval, but I can't use that variable later as the "TO:" for the email.

                                      Anyone have any thoughts?
                                        • "On-The-Fly
                                          Enterprise 2009 has this functionallity. It is called Dynamic Notifications. It allow the user to pick from a list who to send the notification to.
                                            • "On-The-Fly
                                              Jeff Sweeney
                                              Wayne has the best answer...but...
                                              You have the file path. Knowing the file path you can find the file's object. Knowing the object you can use either GetVar or GetVarFromDB to find the variable on the card to include in the To.
                                                • "On-The-Fly
                                                  Christina Seay
                                                  Wayne does have a very good answer... now I just have to convince the company that they should upgrade BEFORE I get the whole freaking thing set up... we just got PDM 2008 like a month ago and I'm still no where close to setting it up the way they want it to be!!

                                                  **sigh**

                                                  Jeff, you are quickly becoming one of my favorite people in the world!! I'm going to check into that getVar and GetVarFromDB and see what I can do with it....

                                                  Thank-You again!!!!
                                              • "On-The-Fly
                                                Joy Garon
                                                Hi Christina -

                                                If you don't want to go to 2009 just yet, you can create an add-in to read the variable value from the datacard (in my case "Reviewer") when transitioning (in my case to "Waiting for approval").

                                                Attached is a code sample to demonstrate....THIS IS NOT PRODUCTION QUALITY... IT IS A SAMPLE FOR DEMONSTRATION PURPOSES ONLY.

                                                If you are not comfortable with the API, please do not use this.

                                                Joy
                                                  • "On-The-Fly
                                                    Corey Hinman
                                                    Joy, I would like to learn more about how to do this. We select all needed approvers and set those approvers as variables on the data card, but the process i use to send targeted emails is cumbersome. So I would like something that Could just read a set of variables from a card and send emails to those users.

                                                    Can you point me in a specific direction on where I can learn more about doing some of these things myself?

                                                    Thanks! Cassel in 09!!!!!!!
                                                    Corey
                                                      • "On-The-Fly
                                                        Joy Garon
                                                        Corey -

                                                        Do you plan on upgrading to 2009? You could use dymanic notifications.
                                                        Also, do you plan on attending SolidWorks World? We could meet up there and discuss.

                                                        Joy
                                                          • "On-The-Fly
                                                            Corey Hinman
                                                            no, I can't make it this year, bummer. I didn't see anything in 2009 that looked like it carried an immediate benefit.

                                                              • "On-The-Fly
                                                                Christina Seay
                                                                Cory,

                                                                We finally got upgraded to PDM 2009 and while I haven't tried the Dynamic Notifications in it yet because I've been busy with other programs, here's what it says in the admin guide for how to enable them... so that might clarify it a bit for you on how they work and you can decide if that would suite your situation or not:

                                                                Dynamic Notifications
                                                                You can set up dynamic notifications that let users specify recipients and enter comments for notifications triggered by workflow transitions.
                                                                To set up dynamic notifications for a project:
                                                                1. Double-click Workflows and open a workflow.
                                                                2. Click Notifications on a workflow transition.
                                                                3. On the Notifications by Project tab:
                                                                a) Select a project folder.
                                                                b) Select the Users or Groups to receive the notifications.
                                                                c) Click Add.
                                                                d) Under Notifications, select Dynamic.
                                                                e) Click OK.
                                                                The steps are similar for Notifications by Assignment.
                                                                4. Repeat steps 2 and 3 for each transition you want to have dynamic notifications.
                                                                5. Save and close the workflow.
                                                                When a user performs a state change using a transition you configured, the Do
                                                                Transition dialog box has fields for message recipients and comments.
                                                                  • "On-The-Fly
                                                                    Corey Hinman
                                                                    That doesn't quite get me to where i want to be. We use a data card as an ECN, and we select required approvers on the card, which can change from ECN to ECN....so I was hoping 09 could read card variables and send emails based on those variables, which are later used to determine actual required approvals (via a transition), in parallel. It gets pretty deep trying to sort it all out
                                                                      • "On-The-Fly
                                                                        Christina Seay
                                                                        I know what you mean... figuring out what everyone has "just been doing to make it work" and then translating that into an automated, coded process is a nightmare!

                                                                        Do you have Visual Studio? Or anyone there that is remotely comfortable with working with VB.NET programs?

                                                                        Before we got 2009, I used the "On-The-Fly" notification program and the PDM Enterprise Add-In template to create a program that reads a variable off the data card, sends the emails, and then I'm using transitions actions to set the variables on the card as they go through workflows, which is simple... but it wouldn't be hard to set up the VB program to set a card variable... I've got the code to do that somewhere for another program I was working on and I can look that up again.

                                                                        I also put together another variation that lets you pick the user from a drop down and optionally type in a custom message and send an email as well.

                                                                        If you have Visual Studio and someone that can understand the programs, I'll hunt up the code I've got and send it to you.
                                                          • Re: "On-The-Fly
                                                            Kent Keller

                                                            I was able to convert the program to Visual Studio 2008 and it builds without error.  "Make assembly COM-Visible" is checked under Assembly information.

                                                             

                                                            When I try to load the Addin from EPDM Administrator.  I get a message:

                                                             

                                                                 SolidWorks Enterprise PDM Administrator    

                                                                 The DLL is not a COM module.

                                                                                     [ OK  ]

                                                             

                                                            Any idea what I am missing?   Do I need to register it with a pre-build event or something?

                                                             

                                                            Kent