LSPS documentation logo
LSPS Documentation
Functions

Todo

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

Allocates the todo to the person, event if it is allocated to another person.

Parameters:

  • todo
  • person the person that belongs to the current todo assignees

Throws:

  • NullParameterError if a mandatory parameter is null
  • PersonIsNotAssigneeError if the person does not belong to the set of the current todo assignees
getCurrentTodo() : Todo
Returns the currently opened to-do. If not called from the context of a to-do, it returns null.
getTodoCurrentAssignees(todo* : Todo) : Set<Person>

Returns the set of <code>Persons who can currently see the todo. The function takes the possible effect of delegation, rejection and substitution into account.

Parameters:

  • todo the todo

Throws:

  • NullParameterError if a mandatory parameter is null
getTodoPerformers(todo* : Todo) : Set<Performer>

Returns the set of the original performers of the todo as defined by the corresponding task.

Parameters:

  • todo the todo

Throws:

  • NullParameterError if a mandatory parameter is null
getTodoSubmitter(todo* : Todo) : Person

Returns the Person who submitted the todo. The todo must be in the "Accomplished" state; Otherwise, it returns null.

Parameters:

  • todo the accomplished todo

Throws:

  • NullParameterError if a mandatory parameter is null
getTodosFor(person* : Person) : Set<Todo>

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

Parameters:

  • person

Throws:

  • NullParameterError if a mandatory parameter is null
getTodosFor(person* : Person, includeAllocatedByOthers* : Boolean) : Set<Todo>

Returns the set of active to-dos assigned to the person.

Parameters:

  • person
  • includeAllocatedByOthers whether the output set includes the to-dos currently allocated to another person

Throws:

  • NullParameterError if a mandatory parameter is null
reassignTodo(todo* : Todo, performers* : Set<Performer>) : voidSIDE EFFECT

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

Parameters:

  • todo
  • performers the set of perfomers

Throws:

  • NullParameterError if a mandatory parameter is null
rejectTodo(todo* : Todo, persons* : Set<Person>, reason : String) : voidSIDE EFFECT

Rejects the todo on behalf of the persons.

rejectTodo(
    getCurrentTodo(),
    { getPerson("admin") },
    "I am admin and will not deal with this."
    )
}

Parameters:

  • todo
  • persons persons that reject the todo
  • reason message with the rejection reason

Throws:

  • NullParameterError if a mandatory parameter is null
resetTodo(todo* : Todo) : voidSIDE EFFECT

Removes any saved states of the todo.

Parameters:

  • todo

Throws:

  • NullParameterError if a mandatory parameter is null
unallocateTodo(todo* : Todo) : voidSIDE EFFECT

Unallocates the todo if it is allocated.

Parameters:

  • todo

Throws:

  • NullParameterError if a mandatory parameter is null

Organization

addPersonToRole(person* : Person, roleUnit* : RoleUnit) : voidSIDE EFFECT

Adds the person to the role.

Parameters:

  • person
  • roleUnit

Throws:

  • NullParameterError if a mandatory parameter is null
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.
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.

Parameters:

  • roleUnit

Throws:

  • NullParameterError if a mandatory parameter is not specified
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.

Parameters:

  • performers

Throws:

  • NullParameterError if a mandatory parameter is null
emailAddresses(roleUnits : RoleUnit...) : Set<String>

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

Parameters:

  • roleUnits
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.
getLabel(roleUnit* : RoleUnit) : String

Returns the roleUnit label.

Parameters:

  • roleUnit

Throws:

  • NullParameterError if a mandatory parameter is null
getPerson(name* : String) : Person

Returns a person of the specified name.

Parameters:

  • name

Throws:

  • NullParameterError if a mandatory parameter is not specified
  • PersonNotFoundError if there is no such person
getPersonFullName(person* : Person) : String

Returns the full name of the specified person.

Parameters:

  • person

Throws:

  • NullParameterError if a mandatory parameter is null
getPersonPicture(person* : Person) : File

Returns a profile picture of person.

Parameters:

  • person

Throws:

  • NullParameterError if a mandatory parameter is not specified
getPersonProperties(person* : Person) : Map<String, String>

Returns the additional properties of the specified person.

Parameters:

  • person

Throws:

  • NullParameterError if a mandatory parameter is null
getPersonRoles(person* : Person) : Set<Role>

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

Parameters:

  • person

Throws:

  • NullParameterError if a mandatory parameter is null
getPersonWithId(id* : String) : Person

Returns a person of the specified id.

Parameters:

  • id

Throws:

  • NullParameterError if a mandatory parameter is not specified
  • PersonNotFoundError if there is no such person
getRoleUnitByName(module* : String, name* : String) : RoleUnit

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

Parameters:

  • module
  • name

Throws:

  • NullParameterError if a mandatory parameter is not specified
  • RoleUnitNotFoundError if there is no such 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.

Parameters:

  • module
  • name
  • parameters

Throws:

  • NullParameterError if a mandatory parameter is not specified
  • RoleUnitNotFoundError if there is no such role or a unit
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).

Parameters:

  • person
  • roleUnit

Throws:

  • NullParameterError if a mandatory parameter is 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.

Parameters:

  • person
  • role

Throws:

  • NullParameterError if a mandatory parameter is 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.

Parameters:

  • role

Throws:

  • NullParameterError if a mandatory parameter is 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).

Parameters:

  • roleUnit

Throws:

  • NullParameterError if a mandatory parameter is not specified
removePersonFromRole(person* : Person, roleUnit* : RoleUnit) : voidSIDE EFFECT

Remove the person from the role.

Parameters:

  • person
  • roleUnit

Throws:

  • NullParameterError if a mandatory parameter is null
setPersonPicture(person* : Person, picture : File) : voidSIDE EFFECT

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

Parameters:

  • person
  • picture

Throws:

  • NullParameterError if a mandatory parameter is not specified

Documents

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

Deletes the saved documents.

Parameters:

  • documents

Throws:

  • NullParameterError if a mandatory parameter is null

Utilities

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).
sendEmail(subject : String, body* : String, attachments : Set<File>, recipientsTo* : Set<String>, recipientsCc : Set<String>, recipientsBcc : Set<String>, charset : String) : voidSIDE EFFECTDEPRECATED

Sends an e-mail. Deprecated: use function sendEmail with extended parameters.

Parameters:

  • subject email subject
  • body email body paragraphs
  • attachments attachments
  • recipientsTo email addresses of recipients TO
  • recipientsCc email addresses of recipients CC
  • recipientsBcc email addresses of recipients BCC
  • charset Name of character encoding used for subject and body of e-mail, for instance, “ISO-8859-1”, “UTF-8”, “windows-1250”, etc. If not speci- fied, the default is “UTF-8”. The supported encodings vary between different implementations of the Java 2 platform, see Java docu- mentation for details.

Throws:

  • NullParameterError if a 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) : voidSIDE EFFECTDEPRECATED

Sends an e-mail. Deprecated: use function sendEmail with extended parameters.

Parameters:

  • subject email subject
  • body email body paragraphs
  • attachments attachments
  • from email address of sender. If not specified, the default (given by application server settings) is used.
  • recipientsTo email addresses of recipients TO
  • recipientsCc email addresses of recipients CC
  • recipientsBcc email addresses of recipients BCC
  • charset Name of character encoding used for subject and body of e-mail, for instance, “ISO-8859-1”, “UTF-8”, “windows-1250”, etc. If not speci- fied, the default is “UTF-8”. The supported encodings vary between different implementations of the Java 2 platform, see Java docu- mentation for details.

Throws:

  • NullParameterError if a 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) : voidSIDE EFFECT

Sends an e-mail.

Parameters:

  • subject email subject
  • body email body paragraphs
  • attachments attachments
  • from email address of sender. If not specified, the default (given by application server settings) is used.
  • recipientsTo email addresses of recipients TO
  • recipientsCc email addresses of recipients CC
  • recipientsBcc email addresses of recipients BCC
  • mime Mime subtype (without text/) e.g plain, html, rtf,...
  • charset Name of character encoding used for subject and body of e-mail, for instance, “ISO-8859-1”, “UTF-8”, “windows-1250”, etc. If not speci- fied, the default is “UTF-8”. The supported encodings vary between different implementations of the Java 2 platform, see Java docu- mentation for details.

Throws:

  • NullParameterError if a mandatory parameter is null