11 Replies Latest reply on Jan 7, 2008 8:12 AM by (TK18)

    Send Email & Save and Display Data

      I've got a simple process with a Set Value and Assign User activities and one variable to read the contents of an XDP form. The assigned user the reviews the form. This much I know works.

      From this point on, I am adding to routes to the last task: the reviewer may accept or reject the form. If it is accepted, I want the form to be saved in PDF form and displayed for the user to read and type some of that data somewhere else (I may automate this at another time). If it is rejected, I want Workspace to send an email to the process creator (the person who filled out the form--not the reviewer) indicating that there are errors or omissions to correct. Then, the form is reassigned to the process creator, who works on it and resubmits it for review.

      My questions are as follows:

      1- I'm thinking of using a Send Email service to send a short, very specific message, but I don't know how to capture the process creator's email address to use in this service. Would you any other way of doing this?

      2- I can't figure out what service to use to save the PDF and to display it for the reviewer to copy data manually into another application.

      I'm still new at this and find the available information a little cryptic. I probably don't know where to find it too. I'd appreciate any help that you can provide.

      Thank you!
        • 1. Re: Send Email & Save and Display Data
          Level 1
          you can get the process creator id, then you will have to query the edcprincipalentity table to get the email which corresponds to the process creator id

          I am not sure what you want to do if the reviewer accepts the form, some more explanation would be helpful
          • 2. Re: Send Email & Save and Display Data
            Level 1
            I'm sorry, but I wouldn't know how to do a query within LC. Is there a way to read this email address and save it into a variable for later use?

            With regards to your question, if the user accepts it, I want to allow the user to save or print the form for later use. If the user doesn't accept it, I need to email a message to the process creator about making corrections/additions, as necessary, and resubmitting the form.

            Thank you!
            • 3. Re: Send Email & Save and Display Data
              Level 1
              You would need to query the edcprincipalentity table. You can use something like this
              select email from edcprincipalentity where id = /process_data/TaskCompletedByID. You will need to create a variable of type String and call it TaskCompletedByID, and map it to the completedUserID field in the userService in the FormDataMappings section. after the user service step you would need a query single Row service operation to query the DBfor email and send the email
              hope this helps
              let me know how it goes
              • 4. Re: Send Email & Save and Display Data
                Level 1
                Where do I put that query?

                If I understand correctly, and I use the completedUserID field of the FormDataMappings of the reviewer's Assign User task, after this task is completed, the completedUserID field is going to contain the reviewer's address, not the process creator's. Please, correct me if I'm wrong.

                Also, from the reviewer's activity (Assign User), on one of the routes, I need to generate and send a message to the process creator (email?) that there are errors and/or omissions. From this message generation task, I need to reassign the task to the process creator for him/her to correct/complete the form. I know this is an Assign User task and not the problem. The problem is in the intermediate step.

                Thank you!
                • 5. Re: Send Email & Save and Display Data
                  Level 1
                  yes, the completedUserID gives you the userID if the person who completed the task. If you need to send a email to the process creator you need to query the edcprincipalentity table using the process creator id to get the process creators email. Use the Service called "Query Single Row". This can be found under the services views - Foundation|JDBC|Query single Row.
                  Use the following settings
                  For the DataSource setting enter java:/IDP_DS(Assuming you are running mysql/jboss)
                  then build the query.
                  This step should be after the user step
                  • 6. Re: Send Email & Save and Display Data
                    Level 1
                    We are using JBoss but MSSQL, not MySQL.

                    I also decided to change the process slightly to avoid unnecessary steps and, perhaps, this query step altogether.

                    So this is what I have so far: A Set Value task to fill the form, and an Assign User to assign the form for review. Upon acceptance by the Reviewer, the form should be saved and/or printed, as selected by the Reviewer. Upon reject, it should be reassigned to the Process Creator for correction/completion. When this is done, the form should be resubmitted for review.

                    The form is filled, but the Reviewer gets nothing in his queue (To Do list), even thought he's assigned in the process. The email notifications are not working correctly yet, but it should still be assigned to the Reviewer, correct? He's the Specific User in the Initial User Selection property.

                    I'd appreciate any help that you can provide.

                    • 7. Re: Send Email & Save and Display Data
                      Level 1

                      There are two parts to this request: the email part and the save and display part. I'm sorry, I'm still new at this . . . this is my first process.

                      The email part is being replaced with a notification within Workspace. Will it show up automatically, or does it use email notifications? See previous posting.

                      The save and display part: I need to display two buttons after the form is accepted, one for save and one for print. In either case, the for should still be displayed. How can I make them show up? See my previous posting for an explanation on the process.

                      Thank you for you help!
                      • 8. Re: Send Email & Save and Display Data
                        Level 1
                        The task shows up in the Tracking screen, not in the To Do screen where I expected it. I also received no messages within Workspace to let me know that I had a waiting task.

                        There are no save or print buttons or even a complete button to complete the process. How do I get them in?
                        • 9. Re: Send Email & Save and Display Data
                          Level 1
                          TK18, send me a email to mergeandfuse@gmail, i will help you out
                          • 10. Re: Send Email & Save and Display Data
                            Level 1
                            Also send me your process mergeandfuse@gmail.com
                            • 11. Re: Send Email & Save and Display Data
                              Level 1

                              I've sent you the process archive for your review. I truly appreciate all the help you are providing.

                              Thank you!