6 Replies Latest reply on Dec 10, 2012 5:19 AM by Alejandro Sosa-Oracle

    Workflow Role Issue


      I'm currently working on an issue where credit memo approval notification is being sent to a role whose value is being set at runtime based upon value retrieved by a select query.

      The workflow attribute is of the type Role and the value being set is also a role name.

      Now the user requires an additional user be setup who would recieve the approval notification also.

      But the role name being retrieved is Global Application role not an adhoc role, hence i cannot add further users to the same role.

      Can i assign two role names to the workflow attribute of the type role, which are separated by comma(,).
      Would the two notification be sent out or the workflow would error out ?

      Else do i need to retrieve the user assoiated with the intial role name and create a new ad-hoc using the two user-names who are to be able to view the approval notification.

      My instance details are as follows,

      Database Server
      RDBMS :
      Oracle Applications : 11.5.9

        • 1. Re: Workflow Role Issue
          Saroja Kandepuneni-Oracle
          You cannot assign multiple roles separated by commas to the notification recipient. You need to assign the users/role to a single role and specify the same.
          The workflow code treats the specified value as a single user/role.
          1 person found this helpful
          • 2. Re: Workflow Role Issue
            Alejandro Sosa-Oracle
            You can at runtime also add the other recipient to the original group and remove it afterwards. Or you can also modify your workflow process and add another notification activity for the other recipient.

            1 person found this helpful
            • 3. Re: Workflow Role Issue
              I have resolved the issue by creating an adhoc role and assigned the user from the original role along with the additional recipient to the adhoc role.

              Now i'm able to send the notification to both the end-users as requested.
              • 4. Re: Workflow Role Issue
                As per the advise i have incorporated the logic to create an adhoc-role to which i assign the two users who are to recieve the notification.

                But when i test run the workflow, the notification is assigned the performer the value of the adhoc-role i created.

                But only one user receives the notification. But when i check the wf_notifications table the status = 'CLOSED' and Mail_Status = 'SENT'.

                I have checked the mail preference as well the e-mail setup for both the users. Everything is setup as it should be.

                Please advise as to what else could be wrong with the adhoc-role solution to my issue.

                The following is the logic through which i create an adhoc-role,
                Any help is much appreciated !!


                Edited by: vishm8 on Dec 7, 2012 6:07 PM
                • 5. Re: Workflow Role Issue
                  Saroja Kandepuneni-Oracle
                  looks like 'user_name2' is overriding the 'user_name1'.

                  The following is the way to add multiple users to a adhoc role

                  l_users varchar2(100):='user_name1 user_name2' ;

                  WF_DIRECTORY.AddUsersToAdHocRole (
                  role_name => 'TESTROLE1',
                  role_users => l_users

                  role_name --> ad hoc role name for which users has to be added
                  role_users --> individual user names to be added to the role separated with space.
                  1 person found this helpful
                  • 6. Re: Workflow Role Issue
                    Alejandro Sosa-Oracle
                    In Workflow builder check the Notification properties. Ensure the check box Expand Roles is checked.