Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
juanjosemtz Absent Member.
Absent Member.
329 views

How to revoke an specific instance of a resource?


Hi All,

I'm configuring an entitlement and a resource that can handle multiple
assignments to a user, so as an example I defined a, b, c,... as the
parameter of the entitlement/resource to make it different.

I can assign the resource to the user as expected, so a user can have 3
of this resource (App X Role):
App X Role (parameter a)
App X Role (parameter b)
App X Role (parameter c)

I assign the resources to the user in a workflow using a "Resource
Request", sending: a,b, or c, as the "Entitlement Param", so far so
good.

But, when in a workflow, I try to revoke an specific instance (with
parameter "a") of this resource ("App X Role"), instead of just removing
the appropriate resource, all "App X Role" resources are revoked, from
the user application there is no evidence that there was 3 different
revoke actions, but just one with the specific parameter ("a").

Is this an expected behavior? Or what do I need to do to make it work?

I have to mention that when I remove the same specific resource from
the User Application interface, it works as expected, just the
appropriate resource is remove/revoke.

Thanks


--
juanjosemtz
------------------------------------------------------------------------
juanjosemtz's Profile: http://forums.novell.com/member.php?userid=118944
View this thread: http://forums.novell.com/showthread.php?t=450088

Labels (1)
0 Likes
2 Replies
Anonymous_User Absent Member.
Absent Member.

Re: How to revoke an specific instance of a resource?

On 12/29/2011 02:06 AM, juanjosemtz wrote:
>
> Hi All,
>
> I'm configuring an entitlement and a resource that can handle multiple
> assignments to a user, so as an example I defined a, b, c,... as the
> parameter of the entitlement/resource to make it different.
>
> I can assign the resource to the user as expected, so a user can have 3
> of this resource (App X Role):
> App X Role (parameter a)
> App X Role (parameter b)
> App X Role (parameter c)
>
> I assign the resources to the user in a workflow using a "Resource
> Request", sending: a,b, or c, as the "Entitlement Param", so far so
> good.
>
> But, when in a workflow, I try to revoke an specific instance (with
> parameter "a") of this resource ("App X Role"), instead of just removing
> the appropriate resource, all "App X Role" resources are revoked, from
> the user application there is no evidence that there was 3 different
> revoke actions, but just one with the specific parameter ("a").
>
> Is this an expected behavior? Or what do I need to do to make it work?
>
> I have to mention that when I remove the same specific resource from
> the User Application interface, it works as expected, just the
> appropriate resource is remove/revoke.
>
> Thanks
>
>

Greetings,
You must pass the instanceGuid. When a Resource is assigned to a
User, in the assignment will be instanceGuid with a value. That must be
passed. You can get the instanceGuid by utilizing the
"getResourceAssignmentsForUser" SOAP/REST endpoint.

--
Sincerely,
Steven Williams
Lead Software Engineer
NetIQ
0 Likes
juanjosemtz Absent Member.
Absent Member.

Re: How to revoke an specific instance of a resource?


exteNdSupport;2164051 Wrote:
>
> Greetings,
> You must pass the instanceGuid. When a Resource is assigned to a
> User, in the assignment will be instanceGuid with a value. That must
> be
> passed. You can get the instanceGuid by utilizing the
> "getResourceAssignmentsForUser" SOAP/REST endpoint.
>
> --
> Sincerely,
> Steven Williams
> Lead Software Engineer
> NetIQ


Thanks a lot Steven, I'm still trying to make it work, right now I
retrieve the DN of the Resources but for some reason it just send me 2,
I even try with users with no resources and resources.size() is always
2.

Part of the code is:
var resources =
flowdata.getObject('Activity1/getResourceAssignmentsForUserOutput/getResourceAssignmentsForUserResponse/result/resourceassignment/resourceDn');
var totalResources = resources.size();
var i =1;
var resourceDN =
flowdata.get('Activity1/getResourceAssignmentsForUserOutput/getResourceAssignmentsForUserResponse/result/resourceassignment['+
i +']/resourceDn');
i++;
var resourceDN2 =
flowdata.get('Activity1/getResourceAssignmentsForUserOutput/getResourceAssignmentsForUserResponse/result/resourceassignment['+
i +']/resourceDn');
i++;
var resourceDN3 =
flowdata.get('Activity1/getResourceAssignmentsForUserOutput/getResourceAssignmentsForUserResponse/result/resourceassignment['+
i +']/resourceDn');
message = '#Result' + '#: ' + totalResources + ' / ' +
resourceDN.substring(0,8) + ' / ' + resourceDN2.substring(0,8) + ' / ' +
resourceDN3.substring(0,8);
Packages.java.lang.System.out.println(message);
message;
// END OF CODE------------------------

RESULT: #Result#: 2 / cn=OBIEE / cn=BigFi /

As you can see I also try to retrieve the resourceassignment[3], I know
it must exist since the user has several more resources assigned, but
the result is blank.

Note: the user has 7 resources assigned I can see them in the
"Resources Assignments" Section inside the user "Work Dashboard". Only 4
of them are from different resources definition, meaning 4 of them are
instances of the same resource with different parameter.

Any suggestion?


--
juanjosemtz
------------------------------------------------------------------------
juanjosemtz's Profile: http://forums.novell.com/member.php?userid=118944
View this thread: http://forums.novell.com/showthread.php?t=450088

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.