This site is currently read-only as we are migrating to Oracle Forums for an improved community experience. You will not be able to initiate activity until January 30th, when you will be able to use this site as normal.

    Forum Stats

  • 3,889,981 Users
  • 2,269,775 Discussions
  • 7,916,823 Comments

Discussions

CreateAdHocRole2

656382
656382 Member Posts: 1
edited Sep 8, 2008 5:37AM in Workflow
Hi,
I have created a new attribute in WF builder and assigned that as performaer for one of the nofitication.

In my pl/sql I am using createadhocrole2.

I have created one variable

1) l_user_list wf_directory.UserTable

and in my code I am trying to something like following:

2) l_role_name := 'xx_appr_role';
3) l_role_disp_name := 'xx apprv role';
4) l_user_list := 'uname1 uname2'; -- I am setting the values for usernames before from the wf attributes

I have tried different combination e.g. uname1, uname2 etc

5) WF_ENGINE.CreateAdHocRole2
(role_name => l_role_name
,role_display_name => l_role_disp_name
,role_users => l_user_list);

then I am setting role name back in the WF attribue i.e. l_role_name

But I am keep on getting error for l_user_list at 4)

Do I need to use l_user_list some differnt way?

Thanks!

Comments

  • NoLongerActive
    NoLongerActive Member Posts: 878 Silver Badge
    Hi,

    Line 5 - CreateAdHocRole2 is in WF_DIRECTORY not WF_ENGINE.

    HTH,

    Matt


    -----
    WorkflowFAQ.com - the ONLY independent resource for Oracle Workflow development

    Alpha review chapters from my book "*Developing With Oracle Workflow*" are available via my website [http://www.workflowfaq.com]
    Have you read the blog at [http://www.workflowfaq.com/blog] ?
    WorkflowFAQ support forum: [http://forum.workflowfaq.com]
  • 657960
    657960 Member Posts: 16
    I guess your error is in compilation time. The problem is in step 4.

    Instead of this:

    l_user_list := 'uname1 uname2';

    you should populate the UserTable variable this way:

    l_user_list( 1 ) := 'uname1';
    l_user_list( 2 ) := 'uname2';


    hth,
    Andres
  • NoLongerActive
    NoLongerActive Member Posts: 878 Silver Badge
    Yep - that'll do it. The format of the names needs to be in the array that is passed into the procedure (which as I said earlier is in WF_DIRECTORY rather that WF_ENGINE).

    If you want to pass the names in as a comma or space delimited list, then use the CreateAdHocRole API rather than the CreateAdHocRole2 API.

    HTH,

    Matt

    -----
    WorkflowFAQ.com - the ONLY independent resource for Oracle Workflow development

    Alpha review chapters from my book "Developing With Oracle Workflow" are available via my website http://www.workflowfaq.com
    Have you read the blog at http://www.workflowfaq.com/blog ?
    WorkflowFAQ support forum: http://forum.workflowfaq.com
This discussion has been closed.