Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Apply Policy

Avatar

Former Community Member
Hi,



I want to apply a Policy using the Apply Policy component.



I get this error:



Caused by: com.adobe.edc.sdk.SDKException: Failed to retrieve policy [:test] -- Invalid policy(error code bin: 1284, hex: 0x504)



So this indicates that the username is not correct.

my user is cblue which is also a Rightsmanagement user and owns the 'test' policy. in MyPolicies

MyPolicies as policy set also does not work. It causes:

Caused by: com.adobe.edc.sdk.SDKException: Failed to retrieve policy [MyPolicies:test] -- Invalid policy(error code bin: 1284, hex: 0x504)



so what is wrong?



regards

Johannes
3 Replies

Avatar

Level 3
Here are two things to check:



The policy that you are trying to apply using the Service should not be one of your "My Policies". Instead it should be in a Policy Set that you can see in the Rights Management Admin UI.



Be sure that you know which user is indeed invoking "Apply Policy" in the Rights Management Service. If your process is short lived and your caller is "cblue" then yes, the default behavior is for the Apply Policy operation to be invoked as "cblue" also. You should make sure that this user is in the "Document Publishers" list for your Policy Set. This is done so that you can control which policies are available to different users.

Avatar

Former Community Member
I've fixed this issue, although I can not apply a policy set,



we all know the RM plug in which enables the user to apply a policy to a word doc or excel file.



Are there any possibilities to do this automated in a process?



regards

Johannes

Avatar

Level 3
Can you tell us what fixed the issue for you? Was it related to trying to use "My Policies".



I am sorry we do not have support yet on the server for applying a policy to office documents similar to the desktop ability.