Skip to content

Trigger functions

This page is generated by tools/collect_trigger_functions.py from the product sources. Do not edit it by hand: run the generator instead.

69 functions are available in triggers and conditions.

Functions are called from trigger code and from conditions. They are grouped here by what they do, not by the order of the source file, which is one flat list.

See Triggers for creating and attaching them, and Conditions for using them inside an expression.

Calling a function

// A function returns a value, which you store in a case variable.
$date = getCurrentDate();
$task = PMFGetTaskName($appUid, $delIndex);

Arguments are the ones in each function's table. Parameters marked as optional have a default value.

General utilities (9)

PMFGeti18nText()

The requested text in the specified language

Deprecated

Method deprecated in Release 3.6.x

Parameter Type Default Description
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

Returns: 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.

Parameter Type Default Description
sText string(32) — Text To Convert — The string to capitalize.

Returns: 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

Parameter Type Default Description
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).

Returns: 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.

Parameter Type Default Description
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

Returns: 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").

No arguments.

Returns: 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.

No arguments.

Returns: 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.

Parameter Type Default Description
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.

Returns: 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.

Parameter Type Default Description
sText string(32) — Text To Convert — A string to convert to lower case letters.

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

upperCase()

Returns a string converted into all UPPERCASE letters.

Parameter Type Default Description
sText string(32) — Text To Convert — A string to convert to UPPERCASE letters.

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

Cases (12)

PMFCancelCase()

Cancel a specified case.

Parameter Type Default Description
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.

Returns: 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

Parameter Type Default Description
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).

Returns: array — Response

Direct case link

Parameter Type Default Description
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

Returns: 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.

Parameter Type Default Description
userId string(32) — User ID — The unique ID of a user who is assigned to work on the cases.

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

PMFDeleteCase()

Delete a specified case.

Parameter Type Default Description
caseUid string(32) — ID of the case — The unique ID of the case.

Returns: 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.

Parameter Type Default Description
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.

Returns: 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

Parameter Type Default Description
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.

Returns: 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.

PMFNewCaseImpersonate()

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

Parameter Type Default Description
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.

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

PMFPauseCase()

Pauses a specified case.

Parameter Type Default Description
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.

Returns: 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.

No arguments.

Returns: 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

Parameter Type Default Description
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

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

PMFUnpauseCase()

Unpause a specified case.

Parameter Type Default Description
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.

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

Case data and variables (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.

Parameter Type Default Description
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

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

PMFGetDynaformUID()

Get the unique ID of dynaform

Parameter Type Default Description
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

Returns: 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.

Parameter Type Default Description
field string — Value the field
separator string — Separator of thousands (, or .)
currency string — symbol of currency

Returns: $field

PMFSendVariables()

Sends an array of case variables to a specified case.

Parameter Type Default Description
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.

Returns: 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

Parameter Type Default Description
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

Returns: mixed — Result — Result according of the operation

PMFgetLabelOption()

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

Parameter Type Default Description
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.

Returns: 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

Parameter Type Default Description
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.

Returns: array — Grid — Grid with executed operation

Used in: conditions

executeQuery()

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

Parameter Type Default Description
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.

Returns: 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.

Parameter Type Default Description
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.

Returns: array — Grid Sorted — Grid sorted

Notes and attachments (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.

Parameter Type Default Description
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

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

PMFAddCaseNote()

Add a case note.

Parameter Type Default Description
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.

Returns: 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.

Parameter Type Default Description
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.

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

Tasks and processes (11)

PMFAddUserGroupToTask()

Add user or group to Task

Parameter Type Default Description
taskUid string — Task Uid — The unique Id of the Task.
userGroupUid string — Uid from User or Group — The unique Uid from User or Group.

Returns: int — Result — Returns 1 when is assigned

PMFGetNextAssignedUser()

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

Parameter Type Default Description
application string(32) — Case ID — Id of the case
task string(32) — Task ID — Id of the task

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

PMFGetNextDerivationInfo()

Get next derivation info

Parameter Type Default Description
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

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

PMFGetProcessUidByName()

Get the Unique id of Process by name

Parameter Type Default Description
processName string '' Name of Process — Name of Process

Returns: 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

Parameter Type Default Description
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

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

PMFGetTaskUID()

Get the unique ID of task

Parameter Type Default Description
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

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

PMFProcessList()

Returns a list of processes for the current workspace

No arguments.

Returns: 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.

Parameter Type Default Description
taskUid string — Task Uid — The unique Id of the Task.
userGroupUid string — Uid from User or Group — The unique Id from User or Group.

Returns: int — Result — Returns 1 when is remove

PMFTaskCase()

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

Parameter Type Default Description
caseId string(32) — Case ID — The unique ID for a case.

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

PMFTaskList()

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

Parameter Type Default Description
userid string(32) — User ID — The unique ID of a user.

Returns: array — List of tasks — An array of tasks

PMFTasksListByProcessId()

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

Parameter Type Default Description
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

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

Users, groups and 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.

Parameter Type Default Description
userId string(32) — User ID — The unique ID of the user.
groupId string(32) — Group ID — The unique ID of the group.

Returns: 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.

Parameter Type Default Description
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".

Returns: 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

Deprecated

Method deprecated in Release 3.6.x

Parameter Type Default Description
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

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

PMFGetGroupUID()

Get the unique ID of group

Parameter Type Default Description
groupName string — Name group — The name of group

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

PMFGetGroupUsers()

Get Group Users

Parameter Type Default Description
GroupUID string — Group UID

Returns: array — array

PMFGetUidFromText()

The identifier of the element found using the text.

Parameter Type Default Description
text string — Text
category string — Category
proUid string — ProcessUid
lang string — Language

Returns: array

PMFGetUserEmailAddress()

Returns the email address of the specified user.

Parameter Type Default Description
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.

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

PMFGroupList()

Returns a list of groups from the current workspace

Parameter Type Default Description
regex string null String to search — Optional parameter.
start int null Start — Optional parameter.
limit int null Limit — Optional parameter.

Returns: array — List of groups — An array of groups

PMFInformationUser()

Retrieves information about a user with a given ID.

Parameter Type Default Description
userUid string(32) — User UID — The user UID.

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

PMFNewUser()

Create a new user

Parameter Type Default Description
username string — —
password string — —
firstname string — —
lastname string — —
email string — —
role string — —
dueDate string null —
status string null —
group string null —

Returns: array — Response

PMFRemoveUsersFromGroup()

Remove users from a group

Parameter Type Default Description
groupId string — Group Uid — The unique Uid of the group.
users array — Array of users — Array of users to remove.

Returns: array — array

PMFRemoveUsersToGroup()

Remove users from a group

Deprecated

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

Parameter Type Default Description
groupId string — Group Uid — The unique Uid of the group.
users array — Array of users — Array of users to remove.

Returns: array — array

PMFRoleList()

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

No arguments.

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

PMFUpdateUser()

Update a user with the given data.

Parameter Type Default Description
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.

Returns: 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.

No arguments.

Returns: array — List of users — An array of users

userInfo()

Retrieves information about a user with a given ID.

Parameter Type Default Description
userUid string(32) — User ID — The user unique ID

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

Email and messages (3)

PMFSendMessage()

Sends an email using a template file.

Parameter Type Default Description
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 .

Returns: int — result — Result of sending email

PMFSendMessageToGroup()

Sends emails to user's group using a template file

Parameter Type Default Description
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.

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

getEmailConfiguration()

Returns Email configuration.

No arguments.

Returns: array — Array — Get current email configuration

Documents (4)

PMFAddInputDocument()

Add an Input Document.

Parameter Type Default Description
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.

Returns: 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.

PMFAssociateUploadedFilesWithInputFile()

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

Parameter Type Default Description
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

Returns: none — None — None

PMFCopyDocumentCase()

Copy or attach a file to a Case

Parameter Type Default Description
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).

Returns: 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

Parameter Type Default Description
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

Returns: none — None — None

Case Tracker (2)

jumping()

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

Parameter Type Default Description
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.

Returns: none — None — None

setCaseTrackerCode()

Sets the code and PIN for a case.

Parameter Type Default Description
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.

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

Regenerating

make trigger-functions