rinku_chowdhury
I'm new here

beanshell script to assign workflow permission

Jump to solution

Hi all,

I am writing a script which supposed to create a folder (pagestore) and along with by adding group and assign the permission (both object and workflow) accordingly.  However, I did the permission for the created object but not able to manipulate the workflow permission. Somehow, not able to use setUseReleasePermission(),  workflowPermission interface as it doesnt inherits storeElement interface. Here I have attached the script and the picture. would appreciate any kind of clue.
TIA.

0 Kudos
1 Solution

Accepted Solutions

What i did to address this issue is that I retrieved StoreElement.getWorkflowpermissions from an existing element and modified the permissions accordingly like : transitionpermission, setAllowedGroups, setUseReleasePermission etc. to set (setWorkflowPermissions(WorkflowPermission[] permissions). into the new storeElement.

View solution in original post

0 Kudos
3 Replies
pavone
I'm new here

Hello,

you can use StoreElement.getWorkflowpermissions to get an instance of WorkflowPermissions.

Hope that helps.

Best regards,

Tim

0 Kudos

Hi Tim,

It does return null value if the release permission is not authorized. from my understanding, either directly have to set the workflow permission (setWorkflowPermissions(WorkflowPermission[] permissions) ) or to modify once the " use release permission" is authorized. But both ways i find it very blur.

0 Kudos

What i did to address this issue is that I retrieved StoreElement.getWorkflowpermissions from an existing element and modified the permissions accordingly like : transitionpermission, setAllowedGroups, setUseReleasePermission etc. to set (setWorkflowPermissions(WorkflowPermission[] permissions). into the new storeElement.

0 Kudos