Skip to main content

So I have some scripts that I use to disable/enable the activity controls in my Commcell (so that I can automate maintenance task).  The script works fine on 11.28.65 and returns a JSON showing that everything is working fine.  

When I run this against my Commcell that is at 11.28.69, I get this back as a JSON:

{
"processinginstructioninfo": {
"attributes": "
{
"name": "WebServer",
"value": "Commserv"
}
]
},
"errorMessage": "Failed to set eActivity Control] for oCommCell] with error oOPERATION FAILED: Please check logs for more details.].",
"errorCode": 587203847
}

It only returns this if the status needs to change (i.e. activity is disabled, and I’m trying to enable).  If the status doesn’t change (i.e trying to enable activity when it’s already enabled), it comes back with a success.

Any idea what logs to look in to see what is going on?

As a secondary note, the user only has Global > Administrative management permissions.  This works fine on 11.28.65, but show the above on 11.28.69.  If I give the user master permissions, the script runs fine (which I don’t want to do in leaving a master user running a script)

Hi,

 

I’m unable to help with pointing you towards the log to check but suggest that if it works with master permissions but not without then its most likely a permissions issue getting in the way.

I understand your concern about providing a user master to run the script. As a different approach to solving that have you considered creating a workflow with your steps to disable/enable activity within it?

Within the workflow you can impersonate a user with the necessary rights (For example use the ‘impersonate creator’ activity to impersonate the workflow owner) when performing the action? Then you could provide a restricted user account that only has permissions to execute the workflow. Your script would execute the workflow as that user instead. That would restrict them to only perform the actions the workflow provides for etc.


Hi,

 

I’m unable to help with pointing you towards the log to check but suggest that if it works with master permissions but not without then its most likely a permissions issue getting in the way.

I understand your concern about providing a user master to run the script. As a different approach to solving that have you considered creating a workflow with your steps to disable/enable activity within it?

Within the workflow you can impersonate a user with the necessary rights (For example use the ‘impersonate creator’ activity to impersonate the workflow owner) when performing the action? Then you could provide a restricted user account that only has permissions to execute the workflow. Your script would execute the workflow as that user instead. That would restrict them to only perform the actions the workflow provides for etc.

 

The thing is that the permissions I’m using work on 11.28.65 so it shouldn’t be a permissions issue.

 

I haven’t explored workflows, but can you pass in parameters to the workflow from a script?   I have several use cases where I disable activity and I change the re-enable time


Yes you can pass input parameters to a workflow when you call it. You can also design the workflow to return outputs. 

There are some examples in the REST API section in the online docs… Executing a Workflow as an API (REST API: GET) (commvault.com)

The workflows section can be found here Creating and Managing Workflows (commvault.com)


Reply