13 Replies Latest reply on Apr 1, 2009 11:12 AM by Han Dao

    Manager LookUp

    Han Dao Level 1
      Hello All,

      I am working on the process that need to submit the form to the right manager based on his/her empl ID but having a problem of getting it works. I am using the Single Query Row with SQL select statement from Oracle database which I can see the manager name for that employee when I test it alone but having a problem of putting it to send it to the Task Assign service.

      Can anyone help with this. Any help would be appreciated.

      Thanks,
      Han Dao
        • 1. Re: Manager LookUp
          Jasmin Charbonneau Level 4
          The manager has to be a valid LiveCycle user. You need to specify the GUID for that manager to the user step.

          You can use the Find User service (under Foundataion) to search for a particular user (for example search on name), and the Find User will return a User object if it finds a user that matches the criteria in LiveCycle.

          Then map the User/object/UserId to the Task Assign service.

          Jasmin
          • 2. Re: Manager LookUp
            Han Dao Level 1
            Hi Jasmin,

            Thanks for the prompt response. Could you please explain a litle bit more specific as I am still new to the Workbench ES. I am getting confused at the part of filling the info for the Filter and Result of the Find User service.

            Thanks again,
            Han Dao
            • 3. Re: Manager LookUp
              Jasmin Charbonneau Level 4
              The goal is to get the GUID of the manager so we can pass it to the user step.

              The Find user will perform a search based on a search filter and return a User object that contains information about the user, if a user is found.

              You can enter any search filter you want (for example name). If it finds a user that matches the name, then the user object will contain additional the properties for that user (name, email, id, etc).

              You want to get the id and pass that to the user step. The xPath to get the id will be similar to /process_data/objUser/userId.

              Let me know if it's still not clear.

              Jasmin
              • 4. Re: Manager LookUp
                Han Dao Level 1
                Hi Jasmin,

                I filled all the info in the Search filter and Result but keep getting an Java error: UserSearchFilter cannot be null. Could you please help.

                Thank you very much,
                Han Dao
                • 5. Re: Manager LookUp
                  Jasmin Charbonneau Level 4
                  What exactly do you put in the search filter?

                  Jasmin
                  • 6. Re: Manager LookUp
                    HowardTreisman Level 1
                    Or you can use this component:
                    http://www.avoka.com/avoka/escomponents.shtml
                    I think it's a bit easier to use, and has more features. (But I'm biased:-)
                    Download here: http://www.avoka.com/avoka/escomponents.shtml
                    Howard
                    • 7. Re: Manager LookUp
                      Han Dao Level 1
                      Hi Jasmine,

                      I was out for many days ...
                      One thing that I like to mention is the Manager Name is in the external database not from the LDAP so would the Find User work for this case? I am currently using the Query Single Row to get the Manager Name but having a problem of passing it to the Assign Task. It return "0" in the result instead of Manager Name. Could you please help!

                      Thanks much in advance,
                      Han Dao
                      • 8. Re: Manager LookUp
                        Jasmin Charbonneau Level 4
                        "...so would the Find User work for this case?"
                        The Find user will perform a search in the LiveCycle user manager. Now depending how you've synchronized your user manager, the users might come from an LDAP system of from a database.

                        You can still use Query Single Row to get the manager from an external database, but you need to map it to a LC user (in user manager) before you can use the user step in workbench. It need to be a known user by user manager.

                        Otherwise it's considered an unknown users and it's different.

                        Jasmin
                        • 9. Re: Manager LookUp
                          Han Dao Level 1
                          The LDAP system that we synchronize in our system does not contain manager name info so I prefer to use the Query Single Row to get the manager name from the external database. The manager that is I am looking for is a know user in LC user manager system. I think I am still having a problem of mapping or did not map it right. Could you please explain a litle bit more about mapping it to the LC user before the user step.

                          Thanks,
                          Han Dao
                          • 10. Re: Manager LookUp
                            Jasmin Charbonneau Level 4
                            There must be a common property between the users in the DB and the user in LiveCycle. Let's say in both cases you have the user name (ex. Jasmin Charbonneau).

                            Then when you get the user name from the DB, you can use the Find User service and search on name 'Jasmin Charbonneau'. If it find a user in LiveCycle that matches that name, you'll get a user object back.

                            You want to use the user id from that user object and use that in the xPath expression of the user step. I think it's something like objUser/object/uid/ (if you have a variable called objUser of type User).

                            Jasmin
                            • 11. Re: Manager LookUp
                              Han Dao Level 1
                              Hi Jasmin,

                              I try as you suggested but getting "1" in the result when I invoked the process instead of uid as I have seen while testing the Single Query Row. Do you have a sample of this process, could you please send me a copy of it?

                              Thanks much,
                              Han Dao
                              • 12. Re: Manager LookUp
                                Jasmin Charbonneau Level 4
                                That means you get 1 record found. This is good.

                                Now there is also another output parameter you can set in the Result section called User.

                                Use a varibale of type User and populate the result with it. In a setvalue you'll see all the different properties of the User variable. You want to use /process_data/initiator/object/@userId (in my case my varibale was called intiator).

                                Jasmin
                                • 13. Re: Manager LookUp
                                  Han Dao Level 1
                                  Hi Jasmin,

                                  Thanks alot for your help. I knew that "1" means I got one record found but I also got the error: "...user does not exist or not found .." Then I went back to check that specific record in the database and see that the userid in the database is using upper case while uidstring in the adobe database is using lower case so I updated process to use lower function to convert it and it works fine as expected.

                                  Thanks again for help, Jasmin!

                                  Regards,
                                  Han Dao