10 Replies Latest reply on Aug 18, 2010 6:43 AM by NW987

    Identifying Multiple Rotes out of a User Service in LC ES

    Stuart Mail Level 1
      Hi

      I'm not sure if this is a WorkSpace or WorkBench issue so please advise if in wrong forum.

      We have created a number of LC ES processes that require 2 'routes' out of the user service at a number of stages in the process.

      These routes are typically to 'Approve' or 'Reject' the form where if the form is rejected it goes back to the initiator, or previouse user, if it is approve it goes to the next person in the process - think expense claim, holiday request, etc.

      This works in LC ES Process management as it displays 2 buttons - one to approve one to reject, on the Flex Wrapper.

      However depending on which 'route' the user selects we need to verify different elements of the form - e.g if thet approve they must sign the form, but of they reject they don't need to, also if approved we need to allow the user to select the next recipient before the form is submitted.

      In LC7 this could be done by trapping the AWS_CHOICE option selected under the AWS_SUBMIT button click event or the preSubmit event of the FSUBMIT_ button - however we can find no way to do this in LC ES.

      Does anyone know if there is a way to trap the button clicked at the form level in LC ES ?

      Stuart Mail. xDox.
        • 1. Re: Identifying Multiple Rotes out of a User Service in LC ES
          Level 1
          I think this is a bug in the released product.Will need to confirm this, but the way to do this would be very similar to how you would di it 7. In the click event of the submit button, you need to test if AWS_CHOICE.rawValue = "Reject" then perform whatever logic you want to perform. Will post more info on this tomorrow
          • 2. Re: Identifying Multiple Rotes out of a User Service in LC ES
            Jasmin Charbonneau Level 4
            "Does anyone know if there is a way to trap the button clicked at the form level in LC ES ?"

            There is not way to trap which button is clicked from the workspace interface. When the button is clicked, a message is sent to the PDF but it unfortunately doesn't contain which button was clicked. There's already an enhancement request to put that information in there. Hopefully it'll make it to into the next release.

            Having said that, they only way to know what action was selected (by the PDF)is by having the user select the action on the PDF and not from the WorkSpace interface. Then when they change the drop down, you can fire some code to check some validation.

            If you want to check the logic just before they submit, you'll have to add a regular button and a hidden submit button on your form. The regular button (which will look like the submit button for the user) will check your business logic and if everything is fine, will submit the form by executing the click event of the hidden submit button (hiddenButton.exeEvent("click")).

            You can't leverage the presubmit event of the submit button since it'll still submit the form if the validation fail.

            So to summarize, you'll need the submit button on the PDF and front it with a regular button to verify your validation before it submits.

            Jasmin
            • 3. Re: Identifying Multiple Rotes out of a User Service in LC ES
              Level 1
              sorry it is aws_ACTION.rawValue =="Decline", but this will only work in sp2 release
              • 4. Re: Identifying Multiple Rotes out of a User Service in LC ES
                Jasmin Charbonneau Level 4
                You're right. I should have mentioned that what I just explained is basically already built with the AWS_* fields from Form Designer.

                But you can still built you're own if you want.

                Jasmin
                • 5. Re: Identifying Multiple Rotes out of a User Service in LC ES
                  Stuart Mail Level 1
                  Many thanks to you both for the very quick and helpful responses.

                  We have found a kludge solution by putting a check box on the form to to indicate if they wish to approve or reject (similar to drop down idea) and use the hidden button concept Jasmin describes to validate data accordingly.

                  However if you do this the two Approve / Reject buttons still show on the wrapper and if the user then clicks the wrong one the workflow routing is then of course wrong for the validations and pre-submit actions that have been done at the form level - and there is no way for us to trap for this error as we can't tell which button was clicked of course :-(

                  If we only have one 'route' out of the user, and hide the wrapper button, and then have a Decision Point after the user to decide the route of some item in the XPath data e.g. the check box value or AWS_Action, then the Audit Trail (Tracking) does not show if the user approved or rejected the form - which makes the tracking pretty useless for the users :-(

                  Just an thought / question - if we hide both Wrapper Buttons, then set AWS_Action to say the same value as one of the hidden wrapper buttons, would the AWS_Action selection / value then decide which of the hidden wrapper buttons get activated (e.g. clicked) ?

                  Failing this does anyone know when the next release is expected and if it will include the enhancement to be able to do this ?

                  Stuart
                  • 6. Re: Identifying Multiple Rotes out of a User Service in LC ES
                    Jasmin Charbonneau Level 4
                    Make sure the "Workspace enable Form" which really is the Insert Form Bridge operation is not in your render service. This way the button won't show up in WorkSpace.

                    Jasmin
                    • 7. Re: Identifying Multiple Rotes out of a User Service in LC ES
                      Level 1
                      should be in sp2 coming early next year?
                      • 8. Re: Identifying Multiple Rotes out of a User Service in LC ES
                        Level 1
                        Hi,

                        I have the same requirement. I have looked at the contents of the
                        AWS_ACTION and AWS_CHOICE fields, but they are always null. I would
                        prefer not to have to add my own buttons to the form as fronts to the
                        real submit buttons.

                        Is there a way to tell if I have SP2 installed or not? I started by
                        downloading the trial version from the adobe website. Since I
                        downloaded it after SP2 was released, I'm assuming I have it.
                        • 9. Re: Identifying Multiple Rotes out of a User Service in LC ES
                          Level 1
                          If you login to Workspace and click Help->About LiveCycle Workspace ES what build number do you see?
                          • 10. Re: Identifying Multiple Rotes out of a User Service in LC ES
                            NW987

                            Is there any way to know which route is selected when using document forms and version 8.2.1.3?  THE AWS_ACTION field seems to contain the route information when submitting as  XDP but not PDF.  I have to do conditional validation based on which route was selected and it's a critical requirement.