User is not allowed to open the worklist

  •  10-03-2005, 7:36 AM

    User is not allowed to open the worklist

    Hi

    If you have a look at the K2ROM help file you will note that the “OpenWorklist” object contains the following overloads

    [code:1:c87b139e77]public Worklist OpenWorklist(string Platform);

    public Worklist OpenWorklist(string Platform, string ManagedUser);

    public Worklist OpenWorklist(WorklistCriteria Criteria);[/code:1:c87b139e77]

    The second overload listed in the sample takes 2 parameters (Platform, ManagedUser) the “ManagedUser” parameter is a string value that contains the Domain User Name for the user managed by you. The “Manage By” property of users cannot be set within K2.net, this has to be defined on Active Directory.

    In your code sample you have the following:

    [code:1:c87b139e77] SourceCode.K2ROM.Worklist myWList = wfConn.OpenWorklist("ASP","thcg,tina.zuffoletti"); [/code:1:c87b139e77]

    Is “thcg,tina.zuffoletti” a valid Active Directory User Name and do you manage this user? This explains why it did not work, changing the code to:

    [code:1:c87b139e77] SourceCode.K2ROM.Worklist myWList = wfConn.OpenWorklist("ASP"); [/code:1:c87b139e77]

    Will work but not as expected, this parameter only returns Worklist item assigned to you and NOT any items assigned to users managed by you.

    Have a look at the following example:

    1. “Bob” is the manager of “Joe and Sam” and this is configured in AD.
    2. To return the Worklist for “Bob” you can use the following code sample

    [code:1:c87b139e77] //Open Connection
    oK2Connection.Open(strK2Server);

    //Get Worklist for current Logged on User
    oWorkList = oK2Connection.OpenWorklist("ASP"); [/code:1:c87b139e77]

    3. To return the Worklist for “Joe” you can use the following code sample

    [code:1:c87b139e77] //Open Connection
    oK2Connection.Open(strK2Server);

    //Get Worklist for current Logged on User
    oWorkList = oK2Connection.OpenWorklist("ASP","Joe"); [/code:1:c87b139e77]

    3. To return the Worklist for “Sam” you can use the following code sample

    [code:1:c87b139e77] //Open Connection
    oK2Connection.Open(strK2Server);

    //Get Worklist for current Logged on User
    oWorkList = oK2Connection.OpenWorklist("ASP","Sam"); [/code:1:c87b139e77]

    Note: K2.net Server will display the following message if you are not the valid manager of the user “Sam is not a managed user”

    Ping me if you have more questions.
    Cheers,
    Rénier

    The statements and opinions made in my postings are my own, and do not reflect the opinions of SourceCode Technology Holdings, Inc. or its subsidiaries. All information is provided as is with no warranties, express or implied, and grants no rights or licenses.
View Complete Thread