Saltar a contenido

Funciones de Lurana

Esta página se genera con tools/collect_trigger_functions.py a partir de las fuentes del producto. No la edites a mano: vuelve a ejecutar el generador.

69 funciones están disponibles en desencadenadores y condiciones.

El producto las llama funciones de Lurana: son las que se llaman desde el código de un desencadenador y desde una condición. Se agrupan aquí por lo que hacen, no por el orden del archivo fuente, que es una lista plana.

Las descripciones provienen de la documentación del código y están en inglés; los nombres de las funciones y sus parámetros también.

Ver Desencadenadores para crearlos y adjuntarlos, y Condiciones para usarlos dentro de una expresión.

Cómo se llama una función

// Una función devuelve un valor que se guarda en una variable del caso.
$fecha = getCurrentDate();
$tarea = PMFGetTaskName($appUid, $delIndex);

Los argumentos son los que aparecen en la tabla de cada función. Los parámetros marcados como opcionales tienen un valor por defecto.

Utilidades generales (9)

PMFGeti18nText()

The requested text in the specified language

Obsoleta

Method deprecated in Release 3.6.x

Parámetro Tipo Por defecto Descripción
id string — ID Text — Is the identifier of text, that must be the same to the column: "CON_ID" of the CONTENT table
category string — Category — Is the category of the text, that must be the same to the column: "CON_CATEGORY" of the CONTENT table
lang string — Language — Is the language of the text, that must be the same to the column: "CON_LANG" of the CONTENT table

Devuelve: string — Translated text — the translated text of a string in Content

capitalize()

Converts the first letter in each word into an uppercase letter. Subsequent letters in each word are changed into lowercase letters.

Parámetro Tipo Por defecto Descripción
sText string(32) — Text To Convert — The string to capitalize.

Devuelve: string — Text Converted — It returns the introduced text with the first letter capitalized in each word and the subsequent letters into lowercase letters

formatDate()

Returns a string formatted according to the given date format and given language

Parámetro Tipo Por defecto Descripción
date string(32) — Date — The input date to be reformatted. The input date must be a string in the format 'yyyy-mm-dd'.
format string(32) "" format — The format of the date which will be returned. It can have the following definitions:
lang string(32) "en" Language — The language in which to reformat the date. It can be 'en' (English), 'es' (Spanish) or 'fa' (Persian).

Devuelve: string — Date whit format — It returns the passed date according to the given date format.

generateCode()

Creates a random string of letters and/or numbers of a specified length,which can be used as the PINs (public identification numbers) and codes for cases.

Parámetro Tipo Por defecto Descripción
iDigits int 4 Number of characters — The number of characters to be generated.
sType string(32) "NUMERIC" Type of characters — The type of of characters to be generated

Devuelve: string — Generated string — The generated string of random characters.

getCurrentDate()

Retrieves the current date formated in the format "yyyy-mm-dd", with leading zeros in the month and day if less than 10. This function is equivalent to PHP's date("Y-m-d").

Sin argumentos.

Devuelve: date — Current Date (Y-m-d) — It returns the current date as a string value.

getCurrentTime()

Returns the current time in the format "hh:mm:ss" with leading zeros when the hours, minutes or seconds are less than 10.

Sin argumentos.

Devuelve: time — Current Time (H:i:s) — The function returns the current time as a string.

literalDate()

Returns a specified date written out in a given language, with full month names.

Parámetro Tipo Por defecto Descripción
date string(32) — date — The input date in standard format (yyyy-mm-dd) that is a string.
lang string(32) "en" Language — The language to display, which can be 'en' (English) or 'es' (Spanish). If not included, then it will be English by default.

Devuelve: string — Literal date — It returns the literal date as a string value.

lowerCase()

Returns a string with all the letters converted into lower case letters.

Parámetro Tipo Por defecto Descripción
sText string(32) — Text To Convert — A string to convert to lower case letters.

Devuelve: string — Text Converted — Returns a string with the text converted into lower case letters.

upperCase()

Returns a string converted into all UPPERCASE letters.

Parámetro Tipo Por defecto Descripción
sText string(32) — Text To Convert — A string to convert to UPPERCASE letters.

Devuelve: string — Text Converted — Returns a string with the text converted into upper case letters.

Casos (12)

PMFCancelCase()

Cancel a specified case.

Parámetro Tipo Por defecto Descripción
caseUid string(32) — ID of the case — The unique ID of the case.
delIndex int — Delegation index of the case — The delegation index of the current task in the case.
userUid string(32) — ID user — The unique ID of the user who will cancel the case.

Devuelve: int — Result of the cancelation — Returns 1 if the case is cancel successfully; otherwise, returns 0 if an error occurred.

PMFCaseInformation()

Load the case information

Parámetro Tipo Por defecto Descripción
caseUid string(32) — Case ID — The case unique identifier, that is string of 32 hexadecimal characters.
delIndex int 0 Delegation index of the case — The delegation index of the case thread task to get information (optional).
returnAppData int 0 Include Application Data — Set as TRUE to get all the case data (optional).

Devuelve: array — Response

Direct case link

Parámetro Tipo Por defecto Descripción
caseUid string(32) — ID of the case — The unique ID of the case
workspace string null Workspace — The workspace
language string null Language — The language
skin string null Skin — The skin

Devuelve: string — Direct case link — Returns the direct case link, FALSE otherwise

PMFCaseList()

returns a list of the pending cases for a specified user. Note that the specified user must be designated to work on the current task for these cases.

Parámetro Tipo Por defecto Descripción
userId string(32) — User ID — The unique ID of a user who is assigned to work on the cases.

Devuelve: array — List of cases — A list of cases

PMFDeleteCase()

Delete a specified case.

Parámetro Tipo Por defecto Descripción
caseUid string(32) — ID of the case — The unique ID of the case.

Devuelve: int — Result of the elimination — Returns 1 if the case is delete successfully; otherwise, returns 0 if an error occurred.

PMFDerivateCase()

Derivates (routes) a case to the next task in the process.

Parámetro Tipo Por defecto Descripción
caseId string(32) — Case ID — The unique ID for the case to be derivated (routed)
delIndex int — delegation index for the case — The delegation index for the case to derivated (routed).
bExecuteTriggersBeforeAssignment boolean false Trigger — Optional parameter. If set to true, any triggers which are assigned to pending steps in the current task will be executed before the case is assigned to the next user.
sUserLogged boolean null User ID — Optional parameter. The unique ID of the user who will route the case. This should be set to the user who is currently designated to work on the case. If omitted or set to NULL, then the currently logged-in user will route the case.

Devuelve: int — Result of Derivate case — Returns 1 if new case was derivated (routed) successfully; otherwise, returns 0 if an error occurred.

PMFNewCase()

Creates a new case starting with the specified task

Parámetro Tipo Por defecto Descripción
processId string(32) — Process ID — The unique ID of the process.
userId string(32) — User ID — The unique ID of the user.
taskId string(32) — Task ID — The unique ID of the task.
variables array — Array of variables — An associative array of the variables which will be sent to the case.
status string(32) null Status — Status of the case DRAFT or TO_DO.

Devuelve: string — Case ID — If an error occured, it returns the integer zero. Otherwise, it returns a string with the case UID of the new case.

Se usa en: trigger-code

PMFNewCaseImpersonate()

Creates a new case with a user who can impersonate a user with the proper privileges.

Parámetro Tipo Por defecto Descripción
processId string(32) — Process ID — The unique ID of the process.
userId string(32) — User ID — The unique ID of the user.
variables array — Array of variables — An associative array of the variables which will be sent to the case.
taskId string(32) — The unique ID of the task that is in the starting group.

Devuelve: int — Result — Returns 1 if new case was created successfully; otherwise, returns 0 if an error occurred.

PMFPauseCase()

Pauses a specified case.

Parámetro Tipo Por defecto Descripción
caseUid string(32) — Case UID — The unique ID of the case.
delIndex int — Delegation index of the case — The delegation index of the current task in the case.
userUid string(32) — User UID — The unique ID of the user who will pause the case.
unpauseDate string(32) null Unpaused date — The date in the format "yyyy-mm-dd" indicating when to unpause the case.

Devuelve: int — Result of the pause — Returns 1 if the case is paused successfully; otherwise, returns 0 if an error occurred.

PMFSaveCurrentData()

Sends an array of case variables to a specified case.

Sin argumentos.

Devuelve: int — Result of send variables — Returns 1 if the variables were sent successfully to the case; otherwise, returns 0 if an error occurred.

PMFUnCancelCase()

The requested text in the specified language | If not found returns false

Parámetro Tipo Por defecto Descripción
caseUID string — ID Case — Is the unique UID of the case
userUID string — ID User — Is the unique ID of the user who will uncancel the case

Devuelve: int — Return — Returns 1 if the case was successfully uncancelled, otherwise returns 0 if an error ocurred

PMFUnpauseCase()

Unpause a specified case.

Parámetro Tipo Por defecto Descripción
caseUid string(32) — ID of the case — The unique ID of the case.
delIndex int — Delegation index of the case — The delegation index of the current task in the case.
userUid string(32) — ID user — The unique ID of the user who will unpause the case.

Devuelve: int — Result of the unpause — Returns 1 if the case is unpause successfully; otherwise, returns 0 if an error occurred.

Datos y variables del caso (9)

PMFDynaFormFields()

Function to return an array of objects containing the properties of the fields in a specified DynaForm. It also inserts the "value" and "value_label" as properties in the fields' objects, if the case is specified.

Parámetro Tipo Por defecto Descripción
dynUid string — Dynaform ID — Id of the dynaform
appUid string '' Case ID — Id of the case
delIndex int 0 Delegation index — Delegation index for case

Devuelve: array — List of fields — Return a list of fields

PMFGetDynaformUID()

Get the unique ID of dynaform

Parámetro Tipo Por defecto Descripción
dynaFormName string — Name dynaform — The name of dynaform
processUid string null ID of the process — The unique ID of process. If not set, the current process ID is used

Devuelve: string — The unique ID of dynaform — Returns the unique ID of dynaform, FALSE otherwise

PMFRemoveMask()

Removes the currency symbol and thousands separator inserted by a currency mask.

Parámetro Tipo Por defecto Descripción
field string — Value the field
separator string — Separator of thousands (, or .)
currency string — symbol of currency

Devuelve: $field

PMFSendVariables()

Sends an array of case variables to a specified case.

Parámetro Tipo Por defecto Descripción
caseId string(32) — Case ID — The unique ID of the case to receive the variable.
variables array — Array of variables — An associative array to hold the case variables to send to the case.

Devuelve: int — Result of send variables — Returns 1 if the variables were sent successfully to the case; otherwise, returns 0 if an error occurred.

PMFTotalCalculation()

Executes operations in the grid fields, such as sum, average, median, minimum, maximun, stantard deviation, variance, percentile, count, count distinct

Parámetro Tipo Por defecto Descripción
grid array — Grid — The input grid
field string (32) — Name of field — The name of the field.
function string (32) — Operation — More information about the type of calculations can be found in

Devuelve: mixed — Result — Result according of the operation

PMFgetLabelOption()

Returns the label of a specified option from a dropdown box, listbox, checkgroup or radiogroup.

Parámetro Tipo Por defecto Descripción
PROCESS string(32) — Process ID — The unique ID of the process which contains the field.
DYNAFORM_UID string(32) — Dynaform ID — The unique ID of the DynaForm where the field is located.
FIELD_NAME string(32) — Field Name — The field name of the dropdown box, listbox, checkgroup or radiogroup from the specified DynaForm.
FIELD_SELECTED_ID string(32) — ID selected — The value (i.e., ID) of the option from the fieldName.

Devuelve: string — Label of the specified option — A string holding the label of the specified option or NULL if the specified option does not exist.

evaluateFunction()

Executes operations among the grid fields, such as addition, substraction, etc

Parámetro Tipo Por defecto Descripción
aGrid array — Grid — The input grid.
sExpresion string(32) — Expression for the operation — The input expression for the operation among grid fields. The expression must always be within double quotes, otherwise a fatal error will occur.

Devuelve: array — Grid — Grid with executed operation

Se usa en: conditions

executeQuery()

Executes a SQL statement in a database connection or in one of the platform's internal databases.

Parámetro Tipo Por defecto Descripción
SqlStatement string(32) — Sql query — The SQL statement to be executed. Do NOT include the database name in the SQL statement.
DBConnectionUID string(32) "workflow" UID database — The UID of the database connection where the SQL statement will be executed.

Devuelve: array or string — Result — Result of the query — If executing a SELECT statement, it returns an array of associative arrays

orderGrid()

Sorts a grid according to a specified field in ascending or descending order.

Parámetro Tipo Por defecto Descripción
dataM array — Grid Name — A grid, which is a numbered array containing associative arrays with field names and their values, it has to be set like this "@=".
field string(32) — Name of field — The name of the field by which the grid will be sorted.
ord string(32) "ASC" Optional parameter (Criteria) — Optional parameter. The order which can either be 'ASC' (ascending) or 'DESC' (descending). If not included, 'ASC' will be used by default.

Devuelve: array — Grid Sorted — Grid sorted

Notas y adjuntos (3)

PMFAddAttachmentToArray()

Adds a filename and file path to an associative array of files which can be passed to the PMFSendMessage() to send emails with attachments. It renames files with the same filename so existing files will not be replaced in the array.

Parámetro Tipo Por defecto Descripción
arrayData array — Array of files — Associative array where the index of each element is its new filename and its value is the path to the file or its web address.
index string(32) — Filename — New filename which will be added as the index in the array
value string(32) — File location — The web address or path on the platform server for the file
suffix string " Copy({i})" Filename suffix — A suffix to add to the filename if the filename already exists in the array

Devuelve: array — Array with new data — The array with the added file

PMFAddCaseNote()

Add a case note.

Parámetro Tipo Por defecto Descripción
caseUid string(32) — ID of the case — The unique ID of the case.
processUid string(32) — ID of the process — The unique ID of the process.
taskUid string(32) — ID of the task — The unique ID of the task.
userUid string(32) — ID user — The unique ID of the user who will add note case.
note string — Note of the case — Note of the case.
sendMail int 0 Send mail — Optional parameter. If set to 1, will send an email to all participants in the case.
files array — Array of files — An array of files (full paths) to be attached to the case notes.

Devuelve: int — Result of the add a case note — Returns 1 if the note has been added to the case.; otherwise, returns 0 if an error occurred.

PMFGetCaseNotes()

Get of the cases notes an application.

Parámetro Tipo Por defecto Descripción
applicationID string(32) — Application ID — ID of the Application.
type string(32) "array" type of the return value — type of the return value (array, object, string).
userUid string(32) "" User ID — Id of the User.

Devuelve: array, object or string — Array of the response — Return an Array or Object or String.

Tareas y procesos (11)

PMFAddUserGroupToTask()

Add user or group to Task

Parámetro Tipo Por defecto Descripción
taskUid string — Task Uid — The unique Id of the Task.
userGroupUid string — Uid from User or Group — The unique Uid from User or Group.

Devuelve: int — Result — Returns 1 when is assigned

PMFGetNextAssignedUser()

Returns a list of the next assigned users to a case.

Parámetro Tipo Por defecto Descripción
application string(32) — Case ID — Id of the case
task string(32) — Task ID — Id of the task

Devuelve: array — List of users — Return a list of users

PMFGetNextDerivationInfo()

Get next derivation info

Parámetro Tipo Por defecto Descripción
caseUid string(32) — ID of the case — The unique ID of the case
delIndex int — Delegation index of the case — The delegation index of the current task in the case

Devuelve: array — Next derivation info — Returns the next derivation info, FALSE otherwise

PMFGetProcessUidByName()

Get the Unique id of Process by name

Parámetro Tipo Por defecto Descripción
processName string '' Name of Process — Name of Process

Devuelve: string(32) — Unique id of Process — Returns the Unique id of Process, FALSE otherwise

PMFGetTaskName()

Return the task title of the specified task uid | If not found returns false

Parámetro Tipo Por defecto Descripción
taskUid string — ID Task — Is the identifier of task, that must be the same to the column: "TAS_UID" of the TASK table
lang string — Language — This parameter actually is not used, the same is kept by backward compatibility. Is the language of the text, that must be the same to the column: "CON_LANG" of the CONTENT table

Devuelve: string — Translated text — the translated text of a string in Content

PMFGetTaskUID()

Get the unique ID of task

Parámetro Tipo Por defecto Descripción
taskName string — Name task — The name of task
processUid string null ID of the process — The unique ID of process. If not set, the current process ID is used

Devuelve: string — The unique ID of task — Returns the unique ID of task, FALSE otherwise

PMFProcessList()

Returns a list of processes for the current workspace

Sin argumentos.

Devuelve: array — Lis ot Processes — An array of tasks in the indicated case which have open delegations

PMFRemoveUserGroupFromTask()

Remove a user or group from the list of assignees of the Task.

Parámetro Tipo Por defecto Descripción
taskUid string — Task Uid — The unique Id of the Task.
userGroupUid string — Uid from User or Group — The unique Id from User or Group.

Devuelve: int — Result — Returns 1 when is remove

PMFTaskCase()

Returns all the tasks for the specified case which have open delegations.

Parámetro Tipo Por defecto Descripción
caseId string(32) — Case ID — The unique ID for a case.

Devuelve: array — List of tasks — A list of tasks

PMFTaskList()

Returns a list of tasks which the specified user has initiated.

Parámetro Tipo Por defecto Descripción
userid string(32) — User ID — The unique ID of a user.

Devuelve: array — List of tasks — An array of tasks

PMFTasksListByProcessId()

Return an array of associative arrays which contain the unique task ID and title.

Parámetro Tipo Por defecto Descripción
processId string — ID Process — To get the current process id, use the system variable @@PROCESS
lang string — Language — This parameter actually is not used, the same is kept by backward compatibility.Is the language of the text, that must be the same to the column: "CON_LANG" of the CONTENT table

Devuelve: array — Array result — Array of associative arrays which contain the unique task ID and title

Usuarios, grupos y roles (16)

PMFAssignUserToGroup()

Assigns a user to a group. Note that the logged-in user must have the PM_USERS permission in his/her role to be able to assign a user to a group.

Parámetro Tipo Por defecto Descripción
userId string(32) — User ID — The unique ID of the user.
groupId string(32) — Group ID — The unique ID of the group.

Devuelve: int — Result of the assignment — Returns 1 if the user was successfully assigned to the group; otherwise, returns 0.

PMFCreateUser()

Creates a new user with the given data.

Parámetro Tipo Por defecto Descripción
userId string(32) — User Name — The username for the new user.
password string(32) — Password of the new user — The password of the new user, which can be up to 32 characters long.
firstname string(32) — Firstname of the new user — The first name of the user, which can be up to 50 characters long.
lastname string(32) — Lastname of the new user — The last name of the user, which can be up to 50 characters long.
email string(32) — Email the new user — The email of the new user, which can be up to 100 characters long.
role string(32) — Rol of the new user — The role of the new user such as "ADMIN" or "OPERATOR".
dueDate string(32) null Expiration date — Optional parameter. The expiration date must be a string in the format "yyyy-mm-dd".
status string(32) null Status of the new user — Optional parameter. The user's status, such as "ACTIVE", "INACTIVE" or "VACATION".

Devuelve: int — Result of the creation — Returns 1 if the new user was created successfully; otherwise, returns 0 if an error occurred.

PMFGetGroupName()

Return the group title of the specified group uid

Obsoleta

Method deprecated in Release 3.6.x

Parámetro Tipo Por defecto Descripción
grpUid string — ID Group — Is the identifier of group, that must be the same to the column: "GPR_UID" of the GROUPWF table
lang string — Language — Is the language of the text, that must be the same to the column: "CON_LANG" of the CONTENT table

Devuelve: string — Translated text — the translated text of a string in Content

PMFGetGroupUID()

Get the unique ID of group

Parámetro Tipo Por defecto Descripción
groupName string — Name group — The name of group

Devuelve: string — The unique ID of group — Returns the unique ID of group, FALSE otherwise

PMFGetGroupUsers()

Get Group Users

Parámetro Tipo Por defecto Descripción
GroupUID string — Group UID

Devuelve: array — array

PMFGetUidFromText()

The identifier of the element found using the text.

Parámetro Tipo Por defecto Descripción
text string — Text
category string — Category
proUid string — ProcessUid
lang string — Language

Devuelve: array

PMFGetUserEmailAddress()

Returns the email address of the specified user.

Parámetro Tipo Por defecto Descripción
id string(32) or Array — List of Recipients — which can be a mixture of user IDs, group IDs, variable names or email addresses
APP_UID string(32) null Application ID — Id of the Application.
prefix string(32) "usr" prefix — Id of the task.

Devuelve: array — Array of the Recipient — Return an Array of the Recipient.

PMFGroupList()

Returns a list of groups from the current workspace

Parámetro Tipo Por defecto Descripción
regex string null String to search — Optional parameter.
start int null Start — Optional parameter.
limit int null Limit — Optional parameter.

Devuelve: array — List of groups — An array of groups

PMFInformationUser()

Retrieves information about a user with a given ID.

Parámetro Tipo Por defecto Descripción
userUid string(32) — User UID — The user UID.

Devuelve: array — Information of user — An associative array with Information.

PMFNewUser()

Create a new user

Parámetro Tipo Por defecto Descripción
username string — —
password string — —
firstname string — —
lastname string — —
email string — —
role string — —
dueDate string null —
status string null —
group string null —

Devuelve: array — Response

PMFRemoveUsersFromGroup()

Remove users from a group

Parámetro Tipo Por defecto Descripción
groupId string — Group Uid — The unique Uid of the group.
users array — Array of users — Array of users to remove.

Devuelve: array — array

PMFRemoveUsersToGroup()

Remove users from a group

Obsoleta

The function name was corrected. Use PMFRemoveUsersFromGroup, which takes the same arguments.

Parámetro Tipo Por defecto Descripción
groupId string — Group Uid — The unique Uid of the group.
users array — Array of users — Array of users to remove.

Devuelve: array — array

PMFRoleList()

Returns a list of roles whose status is "ACTIVE" for the current workspace.

Sin argumentos.

Devuelve: array — List of roles — This function returns an array of roles

PMFUpdateUser()

Update a user with the given data.

Parámetro Tipo Por defecto Descripción
userUid string(32) — User UID — The user UID.
userName string(32) — Username — The username for the user.
firstName string(32) null Firstname of the user — Optional parameter. The first name of the user, which can be up to 50 characters long.
lastName string(32) null Lastname of the user — Optional parameter. The last name of the user, which can be up to 50 characters long.
email string(32) null Email the user — Optional parameter. The email of the user, which can be up to 100 characters long.
dueDate string(32) null Expiration date — Optional parameter. The expiration date must be a string in the format "yyyy-mm-dd".
status string(32) null Status of the user — Optional parameter. The user's status, such as "ACTIVE", "INACTIVE" or "VACATION".
role string(32) null Rol of the user — The role of the user such as "ADMIN" or "OPERATOR".
password string(32) null Password of the user — The password of the user, which can be up to 32 characters long.

Devuelve: int — Result of the update — Returns 1 if the user is updated successfully; otherwise, returns 0 if an error occurred.

PMFUserList()

Returns a list of users whose status is set to "ACTIVE" for the current workspace.

Sin argumentos.

Devuelve: array — List of users — An array of users

userInfo()

Retrieves information about a user with a given ID.

Parámetro Tipo Por defecto Descripción
userUid string(32) — User ID — The user unique ID

Devuelve: array — User Info — An associative array with Information

Correo y mensajes (3)

PMFSendMessage()

Sends an email using a template file.

Parámetro Tipo Por defecto Descripción
caseId string(32) — UID for case — The UID (unique identification) for a case, which is a string of 32 hexadecimal characters to identify the case.
from string(32) — Sender — The email address of the person who sends out the email.
to string(100) — Recipient — The email address(es) to whom the email is sent. If multiple recipients, separate each email address with a comma.
cc string(100) '' Carbon copy recipient — The email address(es) of people who will receive carbon copies of the email.
bcc string(100) '' Carbon copy recipient — The email address(es) of people who will receive blind carbon copies of the email.
subject string(50) — Subject of the email — The subject (title) of the email.
template string(50) — Name of the template — The name of the template file in plain text or HTML format which will produce the body of the email.
emailTemplateVariables array [] Variables for email template — Optional parameter. An associative array where the keys are the variable names and the values are the variables' values.
attachments array [] Attachment — An Optional arrray. An array of files (full paths) to be attached to the email.
showMessage boolean true Show message — Optional parameter. Set to TRUE to show the message in the case's message history.
delIndex int 0 Delegation index of the case — Optional parameter. The delegation index of the current task in the case.
config array [] Email server configuration — An optional array: An array of parameters to be used in the Email sent (MESS_ENGINE, MESS_SERVER, MESS_PORT, MESS_FROM_MAIL, MESS_RAUTH, MESS_ACCOUNT, MESS_PASSWORD, SMTPSecure, OAUTH_CLIENT_ID, OAUTH_CLIENT_SECRET and OAUTH_REFRESH_TOKEN) Or String: UID of Email server .

Devuelve: int — result — Result of sending email

Se usa en: trigger-code

PMFSendMessageToGroup()

Sends emails to user's group using a template file

Parámetro Tipo Por defecto Descripción
groupId string(32) — Group ID — Unique id of Group.
caseId string(32) — Case ID — The UID (unique identification) for a case, which is a string of 32 hexadecimal characters to identify the case.
from string — Sender — The email address of the person who sends out the email.
subject string — Subject of the email — The subject (title) of the email.
template string — Name of the template — The name of the template file in plain text or HTML format which will produce the body of the email.
arrayField array [] Variables for email template — Optional parameter. An associative array where the keys are the variable names and the values are the variables' values.
arrayAttachment array [] Attachment — An Optional arrray. An array of files (full paths) to be attached to the email.
showMessage boolean true Show message — Optional parameter. Set to TRUE to show the message in the case's message history.
delIndex int 0 Delegation index of the case — Optional parameter. The delegation index of the current task in the case.
config mixed [] Email server configuration — An optional array: An array of parameters to be used in the Email sent (MESS_ENGINE, MESS_SERVER, MESS_PORT, MESS_FROM_MAIL, MESS_RAUTH, MESS_ACCOUNT, MESS_PASSWORD, and SMTPSecure) Or String: UID of Email server.
limit int 100 Limit — Limit of mails to send in each bach.

Devuelve: int — Result — Returns 1 when is send message to group

getEmailConfiguration()

Returns Email configuration.

Sin argumentos.

Devuelve: array — Array — Get current email configuration

Documentos (4)

PMFAddInputDocument()

Add an Input Document.

Parámetro Tipo Por defecto Descripción
inputDocumentUid string(32) — ID of the input document — The unique ID of the input document.
appDocUid string(32) — ID of the application document — The unique ID of the application document; if action is set to null or empty (Add), then this parameter it set to null.
docVersion int — Document version — Document version.
appDocType string "INPUT" Document type — Document type.
appDocComment string — Document comment — Document comment.
inputDocumentAction string — Action — Action, posible values: null or empty (Add), "R" (Replace), "NV" (New Version).
caseUid string(32) — ID of the case — The unique ID of the case.
delIndex int — Delegation index of the case — The delegation index of the current task in the case.
taskUid string(32) — ID of the task — The unique ID of the task.
userUid string(32) — ID user — The unique ID of the user who will add an input document.
option string "file" Option — Option, value: "file".
file string "path_to_file/myfile.txt" File, path to file — File, path to file.

Devuelve: string — ID of the application document — Returns ID if it has added the input document successfully; otherwise, returns null or empty if an error occurred.

Se usa en: input-documents

PMFAssociateUploadedFilesWithInputFile()

This function Associates the uploaded files inside a grid with an Input File of the process

Parámetro Tipo Por defecto Descripción
inputDocumentUid string(32) — Unique id of Input Document — The unique id of the Input Document we want to associate with
gridVariableName string(32) — Variable name of the grid — Variable name of the grid, that contains the uploaded files
fileVariableName string(32) — Variable name file — Variable name file , of the field in the grid that contains the files
caseUid string(32) — Unique id of the case — The unique id of the case with the documents (variable application)
userUid string(32) — Unique id of the user — The unique id of the user that's logged in for doing the upload
currentDelIndex int — Current Index of the application — Current Index of the application

Devuelve: none — None — None

Se usa en: input-documents

PMFCopyDocumentCase()

Copy or attach a file to a Case

Parámetro Tipo Por defecto Descripción
appDocUid string — Document Application ID — The unique Uid of the Document.
versionNumber int — Version Number — Is the document version.
targetCaseUid string — Case ID — Is the target case uid where we want to copy the document to.
inputDocumentUid string null InputDocument ID — Optional parameter. Is the input document that we want to associate with in the target case. If is not specified then the file is uploaded as attachment in the case (not associated to any input document).

Devuelve: string — ID of the document — Returns ID if it has copied the input document successfully; otherwise, returns exception if an error occurred.

PMFGenerateOutputDocument()

Generates an Output Document

Parámetro Tipo Por defecto Descripción
outputID string(32) — Output ID — Output Document ID
sApplication string(32) null Case ID — The unique ID for a case
index string(32) null Index — Value for Index
sUserLogged string(32) null User UID — User Logged UID

Devuelve: none — None — None

Seguimiento de casos (2)

jumping()

Routes (derivates) a case and then displays the case list.

Parámetro Tipo Por defecto Descripción
caseId string(32) — Case ID — The unique ID for the case to be routed (derivated).
delIndex int — delegation Index of case — The delegation index of the task to be routed (derivated). Counting starts from 1.

Devuelve: none — None — None

setCaseTrackerCode()

Sets the code and PIN for a case.

Parámetro Tipo Por defecto Descripción
sApplicationUID string(32) — Case ID — The unique ID for a case (which can be found with WSCaseList()
sCode string(32) — New Code for case — The new code for a case, which will be stored in the field wf_.APPLICATION.APP_CODE
sPIN string(32) "" New Code PIN for case — The new code for a case.

Devuelve: int — Result — If successful, returns one, otherwise zero or error number.

Se usa en: case-tracker

Regeneración

make trigger-functions