Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| 73:admin_jobs [2019/03/25 19:41] – created emr | 73:admin_jobs [2024/02/15 00:00] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| 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__ | ||