LSPS documentation logo
LSPS Documentation
Functions

To-Dos

getTodoSubmitter(todo* : Todo) : Person

If the specified todo is in the "Accomplished" state, the function returns the person who submitted that todo. Otherwise, the function returns null.

Throws:

  • "NullParameterError" if mandatory parameters are not specified.

getTodoPerformers(todo* : Todo) : Set<Performer>

Returns a set of the original performers of the specified todo, as given by the corresponding task.

Throws:

  • "NullParameterError" if mandatory parameter is null.

getTodoCurrentAssignees(todo* : Todo) : Set<Person>

Returns a set of persons the specified todo is currently issued (visible) to, taking into account also delegation, rejection and substitution.

Throws:

  • "NullParameterError" if mandatory parameter is null.

getTodosFor(person* : Person) : Set<Todo>

Returns a set of active to-dos assigned to the specified person and not allocated by other persons.

Throws:

  • "NullParameterError" if mandatory parameter is null.

getTodosFor(person* : Person, includeAllocatedByOthers* : Boolean) : Set<Todo>

Returns a set of active to-dos assigned to the specified person. The parameter includeAllocatedByOthers determines whether the output set contains also to-dos assigned to the person, but currently allocated by other persons.

Throws:

  • "NullParameterError" if mandatory parameter is null.

allocateTodo(todo* : Todo, person* : Person) : NullSIDE EFFECT

Allocates the specified todo to the person. The given person must belong to the set of persons resolved from the current todo assignees, else an exception is thrown. If the todo is currently allocated to another person, the function performs reallocation.

Throws:

  • "NullParameterError" - Mandatory parameter is null.
  • "PersonIsNotAssigneeError" - The specified person does not belong to the set of the current toto assignees.

unallocateTodo(todo* : Todo) : NullSIDE EFFECT

Unallocates the specified todo. If the todo is currently not allocated, the function has no effect.

Throws:

  • "NullParameterError" - Mandatory parameter is null.

reassignTodo(todo* : Todo, performers* : Set<Performer>) : NullSIDE EFFECT

Changes the set of performers of the specified todo. Possible delegations and allocation of the todo are removed. If the todo has already been accomplished, the function has no effect.

Throws:

  • “NullParameterError” - Mandatory parameter is null.

rejectTodo(todo* : Todo, persons* : Set<Person>, reason : String) : NullSIDE EFFECT

Forces rejection of the todo by the specified persons.

Throws:

  • "NullParameterError" if mandatory parameter is null.

getCurrentTodo() : Todo

Returns the currently opened to-do. If the function is not called from the context of a to-do, it returns null.

resetTodo(todo* : Todo) : Null

Resets the specified todo. The saved state of the todo (if any) will be deleted.

Throws:

  • "NullParameterError" - Mandatory parameter is null.

Organization

addPersonToRole(person* : Person, roleUnit* : RoleUnit) : Null

Adds the person to the role.

Throws:

  • "NullParameterError" - Mandatory parameter is null.

removePersonFromRole(person* : Person, roleUnit* : RoleUnit) : Null

Remove the person from the role.

Throws:

  • "NullParameterError" - Mandatory parameter is null.

getPerson(name* : String) : Person

Returns a person of the specified name.

Throws:

  • "NullParameterError" if mandatory parameters are not specified.
  • "PersonNotFoundError" if there is no such a person.

getPersonWithId(id* : String) : Person

Returns a person of the specified id.

Throws:

  • "NullParameterError" if mandatory parameters are not specified.
  • "PersonNotFoundError" if there is no such a person.

getPersonFullName(person* : Person) : String

Returns the full name of the specified person.

Throws:

  • "NullParameterError" if mandatory parameter is null.

getPersonPicture(person* : Person) : File

Returns a profile picture of person.

Throws:

  • "NullParameterError" if mandatory parameter is not specified.

setPersonPicture(person* : Person, picture : File) : NullSIDE EFFECT

Sets or changes a profile picture for the person. If the picture is null, the person has no profile picture.

Throws:

  • "NullParameterError" if mandatory parameter is not specified.

getPersonProperties(person* : Person) : Map<String, String>

Returns the additional properties of the specified person.

Throws:

  • "NullParameterError" if mandatory parameter is null.

getCurrentPerson() : Person

Returns the person who has initiated the current model processing request. For instance, the person who has submitted a to-do or called a web service. In cases of receiving time events or signals the technical person “ProcessAgent” is returned.

anyPerformer() : Performer

Returns a special performer representing any known process performer. This function is used to specify access to entities (e.g., to-dos, reports, or widgets) available to all known process performers.

getRoleUnitByName(module* : String, name* : String) : RoleUnit

Returns an organization role or an organization unit specified by their name defined in the given module.

Throws:

  • "NullParameterError" if mandatory parameters are not specified.
  • "RoleUnitNotFoundError" if there is no such a role or a unit.

getRoleUnitByName(module* : String, name* : String, parameters : Map<String, String>) : RoleUnit

Returns an organization role or an organization unit specified by their name and parameters defined in the given module.

Throws:

  • "NullParameterError" if mandatory parameters are not specified.
  • "RoleUnitNotFoundError" if there is no such a role or a unit.

children(roleUnit* : RoleUnit) : Set<RoleUnit>

Returns a set of direct children of an organization role or unit referred to by the roleUnit parameter. In the case of a parametric RoleUnit the values of children's parameters are derived from the specified roleUnit's parameters; i.e., the value of a particular child's parameter is identical with the value of the parent's parameter of the same name.

Throws:

  • "NullParameterError" if mandatory parameters are not specified.

isPersonIn(person* : Person, roleUnit* : RoleUnit) : Boolean

Returns true, if the specified person belongs to the given roleUnit in the current organization model. A person "belongs" to a given organization role or unit if it belongs to it directly or belongs to any of its descendants (evaluated recursively).

Throws:

  • "NullParameterError" if mandatory parameters are not specified.

isPersonStrictlyIn(person* : Person, role* : Role) : Boolean

Returns true, if the given person plays strictly the specified role, but none of its sub-roles. Therefore, this is a non-recursive version of the isPersonIn() function applied to organization roles.

Throws:

  • "NullParameterError" if mandatory parameters are not specified.

personsWith(roleUnit* : RoleUnit) : Set<Person>

Returns a set of all persons that belong to the given roleUnit in the current organization model. A person "belongs" to a given organization role or unit if it belongs to it directly or belongs to any of its descendants (evaluated recursively).

Throws:

  • "NullParameterError" if mandatory parameters are not specified.

personsStrictlyWith(role* : Role) : Set<Person>

Returns a set of all persons that play the given role, but none of its sub-roles. Therefore, this is a non-recursive version of the personsWith() function applied to organization roles.

Throws:

  • "NullParameterError" if mandatory parameters are not specified.

getPersonRoles(person* : Person) : Set<Role>

Returns a set of organization roles from the current model directly assigned to the specified person.

Throws:

  • "NullParameterError" if mandatory parameter is null.

emailAddresses(roleUnits : RoleUnit...) : Set<String>

Returns set of email addresses of all persons in the specified roles or organisation units.

emailAddresses(performers* : Set<Performer>) : Set<String>

Returns a set of email addresses of the performers. If a performer is of 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.

Throws:

  • "NullParameterError" if mandatory parameter is null.

Documents

deleteSavedDocuments(documents* : Set<SavedDocument>) : NullSIDE EFFECT

Deletes the specified saved documents.

Throws:

  • “NullParameterError” - Mandatory parameter is null.

Utilities

sendEmail(subject : String, body* : String, attachments : Set<File>, recipientsTo* : Set<String>, recipientsCc : Set<String>, recipientsBcc : Set<String>, charset : String) : NullSIDE EFFECTDEPRECATED

Sends an e-mail.

Deprecated: use function sendEmail with extended parameters.

Throws:

  • "NullParameterError" - Mandatory parameter is null.

sendEmail(subject : String, body* : String, attachments : Set<File>, from : String, recipientsTo* : Set<String>, recipientsCc : Set<String>, recipientsBcc : Set<String>, charset : String) : NullSIDE EFFECTDEPRECATED

Sends an e-mail.

Deprecated: use function sendEmail with extended parameters.

Throws:

  • "NullParameterError" - Mandatory parameter is null.

sendEmail(subject : String, body* : String, attachments : Set<File>, from : String, recipientsTo* : Set<String>, recipientsCc : Set<String>, recipientsBcc : Set<String>, mime : String, charset : String) : NullSIDE EFFECT

Sends an e-mail.

Throws:

  • "NullParameterError" - Mandatory parameter is null.

getUIHistory() : Map<Integer, HistoricalNavigation>

A function which returns UI history. Under key 0 is always "current" page. Under positive keys are older entries (back), under negative keys less old entries (forward).