Allocates the todo to the person. If the to-do is allocated to another person, any form changes are dropped unless the todo is saved before the call.
Parameters:
Throws:
Returns the set of persons who can see the todo. The function takes the effect of delegation, rejection, and substitution into account.
getTodoCurrentAssignees(findById(Todo, 13006))
Parameters:
Throws:
Returns the set of the performers of the todo as defined by the corresponding taskl; that means it returns the set of the RoleUnits and Persons as defined by the performers parameter of the task.
getTodoPerformers(findById(Todo, 13004)) //returns //{ //human::Person(name->"john", id->"john0", firstName->"john", lastName->"john", email->"john@john.com", phone->"", isEnabled->true), // human::Role(name->"orgModel::MyRole", parameters->Map<String, Null>, metadata->Map<Null, Null>) //}
Parameters:
Throws:
Returns the person who submitted the todo. The todo must be in the "Accomplished" state, otherwise the call returns null.
getTodoSubmitter(Todo.findById(13005))
Parameters:
Throws:
Returns the set of alive to-dos that are assigned to the person and not allocated to any other person.
getTodosFor(getPerson("john"))
Parameters:
Throws:
Returns the set of alive to-dos assigned to the person and provides the option to include or exclude to-dos allocated to other persons.
getTodosFor(getPerson("john"), true)
Parameters:
Throws:
Changes the set of performers of the todo. Delegations and allocation are removed.
Parameters:
Throws:
Rejects the todo on behalf of the persons.
rejectTodo( getCurrentTodo(), { getPerson("admin") }, "I am admin and will not deal with this." ) }
Parameters:
Throws:
Removes any saved states of the todo.
Parameters:
Throws:
Unallocates a todo (unlocks a to-do locked by a user) and assigns it to the initial performers as defined in the Performers parameter of the task. Any form changes are dropped unless the todo is saved before the call.
Parameters:
Throws:
Adds the person to the role. Note that atempting to add a person to an organization unit results in a runtime exception.
addPersonToRole(getPerson("john"), Developer(["project"->"lsps"]))
Parameters:
Throws:
Returns the set of the direct children of a role unit, that is, an organization role or a unit.
children(getRoleUnitByName("org", "Engineering"))
Parameters:
Throws:
Returns the set of email addresses of the performers. If a performer is of the type Person, its email address is added to the result. If a performer is of type RoleUnit, email addresses of all persons in that role or organization unit are added to the result.
Parameters:
Throws:
Returns the set of email addresses of persons in the specified roles or organisation units.
Parameters:
Returns the person who has initiated the current model processing request; for example, the person who has submitted a to-do or called a web service.
In the case of receiving time events or signals, the technical person “ProcessAgent” is returned; when called from the management perspective of PDS, the admin user is returned (this applies, for example, when you restart a model instance: the user who started the model instance is set to admin).
Returns the roleUnit label.
Parameters:
Throws:
Returns a person with the specified login name.
getPerson("john")
Parameters:
Throws:
Returns the first and last name of the specified person.
getPersonFullName("john") //returns "John Doe"
Parameters:
Throws:
Returns the profile picture of the person. Returns null if no picture for the person exists.
Parameters:
Throws:
Returns the properties of the person.
Parameters:
Throws:
Returns the set of organization roles assigned to the person.
getPersonRoles(getPerson("develWithProject"))[0].parameters //returns the paramater of the 1st role
Parameters:
Throws:
Returns a person with the id.
getPersonWithId("john0")
Parameters:
Throws:
Returns an organization role or an organization unit with the specidi.
getRoleUnitByName("org", "Developer")
Parameters:
Throws:
Returns an existing organization role or an organization unit with the parameters specified in the map and assigns the parameters the specified values.
addPersonToRole( getPerson("manager"), getRoleUnitByName("org", "Developer", ["project" -> "lsps"]) ) //gets the manager person and assigns it the Developer role //with the parameter project set to lsps
Parameters:
Throws:
Returns true if the person belongs to the given roleUnit. A person belongs to a given organization role or unit if it belongs to the role directly or if it belongs to any of the role's or unit's descendants (evaluated recursively).
isPersonIn(getPerson("john"), getRoleUnitByName("org", "Engineering"))
Parameters:
Throws:
Returns true if the given person belongs directly to the specified role. The descendant roles are excluded: it is a non-recursive version of the isPersonIn() function applied to organization roles.
isPersonStrictlyIn(getPerson("john"), getRoleUnitByName("org", "Developer"))
Parameters:
Throws:
Returns the set of persons that belong directly to the given role. Persons that belong to the descendant roles are not considered. This is a non-recursive version of the personsWith() function applied to organization roles.
Parameters:
Throws:
Returns the set of persons that belong to the given role. A person belongs to an organization role if it belongs directly to the specified role or it belongs to any of its descendants (evaluated recursively).
personsWith(getRoleUnitByName("org","Developer"))
Parameters:
Throws:
Remove the person from the role or role unit. Note that atempting to add a person to an organization unit results in a runtime exception.
removePersonFromRole(getPerson("john"), MyRole(["parameter" -> "value"]))
Parameters:
Throws:
Sets the picture as the profile picture of the person
setPersonPicture(getPerson("john"), getResource(module -> "my-module", path -> "john.png");
Parameters:
Throws:
Markes the saved documents as deleted (the documents are retained in the dabase; use isDeleted() to check if a document is marked as deleted).
deleteSavedDocuments({findAll(SavedDocument)[0]})
Parameters:
Throws:
Sends an e-mail. Deprecated: use function sendEmail with extended parameters.
Parameters:
Throws:
Sends an e-mail. Deprecated: use function sendEmail with extended parameters.
Parameters:
Throws:
Sends an e-mail.
Parameters:
Throws: