Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
73:admin_jobs [2019/03/25 19:41] – created emr | 73:admin_jobs [2019/03/25 19:44] – emr | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | Manage Administrative Jobs | + | ====== |
+ | |||
+ | Some administrative jobs should be executed on a regular basis. For that purpose, administrative jobs like role assignments or data exports can be run automatically. | ||
+ | |||
+ | Administrators can upload scripts via the '' | ||
+ | |||
+ | The existing Facade API can be used to navigate through the process content. For example, to assign a user named **'' | ||
+ | < | ||
+ | var user = stages.getUserByUsername(userName); | ||
+ | var project = stages.getProjectByPath(workspacePath); | ||
+ | if (user != null && project != null) { | ||
+ | var roles = project.getEntities(" | ||
+ | for (var i = 0; i < | ||
+ | var role = roles[i]; | ||
+ | if (role.getProperty(" | ||
+ | commands.execute(commands.newAssignUserCommand(role, | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | Sample scripts can be downloaded here: | ||
+ | |||
+ | * [[: | ||
+ | * [[: | ||
+ | |||
+ | Please note, that these scripts are just samples and __need to be adjusted__ | ||
+ | |||
+ | Future Stages versions will allow to also perform other administrative tasks. | ||