- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
beanshell script to assign workflow permission
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.
- Labels:
-
Developers
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
you can use StoreElement.getWorkflowpermissions to get an instance of WorkflowPermissions.
Hope that helps.
Best regards,
Tim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.

