Differences
This shows you the differences between two versions of the page.
Next 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 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: | ||
+ | |||
+ | * [[Role assignment|]] via an Excel sheet that is managed as a file instance in a Stages process | ||
+ | * [[Data export|]] to an external SQL table | ||
+ | |||
+ | Please note, that these scripts are just samples and __need to be adjusted__ | ||
+ | |||
+ | We plan to expand the API in future Stages versions to also perform other administrative tasks. | ||