8 Replies Latest reply on Jul 5, 2013 5:41 PM by BeckieC

    Are there WF Signature Request "Rejected" notifications?


      In GSM WF, we have a step that requires a couple of Signature Requests from different functional areas.  We have noticed that when a signer rejects to "sign" that no email notification is going out to the owner of the step.  This is counter-intuitive to user experience and different than the way Supplier notifications work on SRSA workflows.  Is there a configuration to turn the GSM WFA Signature Request Rejected notification = "ON"?  If there is no configuration option, how have others solved this?  Are your users asking or have asked in the past for notification when another rejects their spec object? 


      Thanks!  --Beckie

        • 1. Re: Are there WF Signature Request "Rejected" notifications?
          Ron M-Oracle

          This is currently not supported, but feel free to add an enhancement request.

          1 person found this helpful
          • 2. Re: Are there WF Signature Request "Rejected" notifications?

            Ron, thanks for letting me know.  I will get an ER together for this and see what kind of work around I can provide to move the UX to positive.


            PS:  Wish the forum had a button for "Answered" ...

            Correct = What I want the answer to be.

            Helpful = What I can do today to get where I need to be "on-time" and tracking to user expectations.

            Answered = I know where I stand and I can't do much about it today.

            • 3. Re: Are there WF Signature Request "Rejected" notifications?
              Ron M-Oracle

              Well, there is a workaround, but it would require custom coding.

              Basically you could create a workflow action (a class) that would be triggered on a workflow transition from Under Review to Reject/Not Approved for a Signature Request. The workflow action could, using the current signature doc, find out the current owner(s) of the related specification, and email them a notification.

              Unlike GSM/SCRM workflows, adding a workflow action to the Sig Doc workflow would have to be done one-time through a database script, but that is a simple one.


              If you are interested, let us know, as we can provide some guidance on how to do this.

              • 4. Re: Are there WF Signature Request "Rejected" notifications?

                Interest Level = Yes, yes, please!     Post here or private email?  -Beckie

                • 5. Re: Are there WF Signature Request "Rejected" notifications?

                  Hi Ron, I am super interested in this capability/work-around and would love to find out more.  I have a technologist and an analyst waiting to know more about any possible solution to our UX issue that may be available.  Thanks.  --Beckie

                  • 6. Re: Are there WF Signature Request "Rejected" notifications?
                    Ron M-Oracle

                    I am working on a quick prototype that we can potentially pass along to you. I will follow up on this thread with more details. If it is simple enough, I may just post the details here. Otherwise, we will schedule (and record) a Dev To Dev meeting and cover it there. Stay tuned.

                    • 7. Re: Are there WF Signature Request "Rejected" notifications?
                      Ron M-Oracle
                      OK, let's go over how this gets implemented:

                      NOTE: Remember that this would be a custom solution. We are working on improvements to signature documents for an upcoming release.

                      Because Signature Documents have their own workflow, we can add a workflow action (class) that gets triggered when a Signature Document moves from Review to Rejected/Not Approved. The Signature Document workflow is not managed in the UI, so to add a workflow action, we will use a simple database script. The custom Workflow Action class can send an email to the specification owners informing them that a signature document was Rejected, and include some helpful information.

                      For example, the email body could look like the following:

                      A Signature Document was Rejected for the following specification:


                        Spec Number:     5112558-001

                        Spec Name:        Papaya Pineapple Juice

                        Current Status:  Design


                      Signature Document Rejected by:


                        User:    John Doe

                        Reason:  Missing custom section XYZ details


                      Click to view the signature document --> http://<servername>/gsm/BaseForms/frmSignatureDoc.aspx?SpecID=5816d6dc0945-a9b7-43d4-82f0-235b7b6946ff&SigDocID=5769d6654ad6-e77a-4264-bf71-0a45fac4338f



                      1. Create a new Visual Studio project (or potentially use an existing one if you already have one for workflow actions or validations)

                      2. Add the following PLM for Process DLLs as References (get them from the SharedLibs folder of your release):

                      • CoreAppPlatform
                      • DataInteraces
                      • DataLib
                      • DataObjects
                      • GeneralServices
                      • GSMLib
                      • LinearWorkflow
                      • PluginExtensions
                      • ProdikaCommon
                      • ProdikaLib
                      • WorkflowCore

                      3. Create a new class that extends the SimpleLinearWorkflowActionBase class (from Xeno.LinearWorkflow). Here is a reference example (note this is an example class and is for demonstration purposes only):

                      using System;

                      using System.Collections.Generic;

                      using System.Linq;

                      using Xeno.Data;

                      using Xeno.Data.GSM;

                      using Xeno.LinearWorkflow;

                      using Xeno.LinearWorkflow.WorkflowObjects;

                      using Xeno.Prodika.Application;

                      using Xeno.Prodika.Common;

                      using Xeno.Prodika.Config;

                      using Xeno.Prodika.GSMLib.Workflow;

                      using Xeno.Prodika.Services;


                      namespace SampleWorkflowExtension


                          public class SignatureRequestRejectionNotificationAction : SimpleLinearWorkflowActionBase


                              public override void Execute(ILinearTransitionContext ctx)


                                  var transitionContext = (SignatureDocLinearTransitionContext)ctx;


                                  ISpecificationService specService = GetSpecService();

                                  if (specService != null)


                                      var currentSpec = (IBaseSpec)specService.Current;               

                                      var specOwnerUsers = GetSpecOwnerUsers(currentSpec);


                                      if (specOwnerUsers.Count > 0)               

                                          SendEmailToSpecOwners(specOwnerUsers, transitionContext.SignatureDocument, currentSpec, transitionContext.Comments);





                              private static List<IUser> GetSpecOwnerUsers(IBaseSpec currentSpec)


                                  return (from ISpecOwner specOwner in currentSpec.SpecSummary.Owners.Values

                                          select AppPlatformHelper.DataManager.objectFromID(specOwner.OwnerID)).OfType<IUser>().ToList();




                              private void SendEmailToSpecOwners(List<IUser> specOwnerUsers, ISignatureDocument sigDoc, IBaseSpec currentSpec, string workflowComments)


                                  var userService = GetUserService();

                                  string currentSigDocUserName  = userService.UserContext.User.Firstname + " " + userService.UserContext.User.Lastname;

                                  var specSummary = currentSpec.SpecSummary;


                                  var currentUser = userService.UserContext.User.ContainedUser as IUser;

                                  if (currentUser != null)


                                      string from = currentUser.email;


                                      string to = StringHelper.Join(specOwnerUsers, x => ((IUser) x).email, ", ");


                                      string subject = String.Format("Signature Document Rejected for Spec {0} ",



                                      string body = String.Format(_emailBodyTemplate,












                                      EmailService().SendMessage(from , to, subject, body);




                              //todo: this should be in the database as a translation

                              private const string _emailBodyTemplate = @"A Signature Document was Rejected for the following specification:


                        Spec Number:     {0}

                        Spec Name:       {1}

                        Current Status:  {2}


                      Signature Document Rejected by:


                        User:    {3}

                        Reason:  {4}


                      Click to view the signature document --> {5}/BaseForms/frmSignatureDoc.aspx?SpecID={6}&SigDocID={7}



                              private static ISpecificationService GetSpecService()


                                  return AppPlatformHelper.ServiceManager.GetServiceByType<ISpecificationService>();



                              private static IUserService GetUserService()


                                  return AppPlatformHelper.ServiceManager.GetServiceByType<IUserService>();           



                              private static IEmailService EmailService()


                                  return AppPlatformHelper.ServiceManager.GetServiceByType<IEmailService>();           





                      4. Compile the class and place the dll into web\gsm\bin.

                      5. Run the following database script to add the workflow action to the Reject workflow transition, replacing the classname, namespace, and assembly (in green below) name to your classname and assembly name. SigDocRejectSample is just a reference name for this workflow action - you can change it to something more meaningful:

                      insert into gsmWorkflowActionTemplates

                      values ('57602CF17ABE-9AF7-4E32-9A61-76DF5AA0E09C', 'Class:SampleWorkflowExtension.SignatureRequestRejectionNotificationAction,SampleWorkflowExtension',

                      '57574dd649e7-2454-4d84-a0f3-7377d6d2c57f', 'SigDocRejectSample', 0, 0, 0);

                      6. Restart the GSM application


                      That's it! You should be ready to test it out.
                      Note that this sample has the email subject and body written in the class, and written in English. Ideally, to support multiple languages, this should be added to the database, into the commonXLAExtensionCache and commonXLAExtensionCacheItem table. I will write up a followup on that or handle it in an upcoming Dev To Dev.

                      1 person found this helpful
                      • 8. Re: Are there WF Signature Request "Rejected" notifications?



                        Thank you for this detail.  I have sent it on to our programmer to work with the custom extension.  Really appreciate this level of reply.