CHelper Functions
CHelper
Overview
The CHelper is an object that contains a group of functions used to perform operations or get information about non-contextualized information. Non-contextualized means that these functions are not necessarily related to the case or BPMN element where the rule is executed. So you can operate two numbers, or get information from other elements in the project.
See our Bizagi Business Rules API
The following table contains the different functions you can find within the CHelper object.
FUNCTION | DESCRIPTION | SYNTAX |
---|---|---|
Cancel Process | Cancel cases and those related to them (sibling, child and parent cases). | CHelper.abortProcess(Me, CaseId, AbortOption, AbortReason) |
Concatenate documents from files array | Concatenates documents from a files array into a PDF document or a Word document according to the selected function. | CHelper.ConcatDocumentsFromFilesArrayToPDF(filesArray) / CHelper.ConcatDocumentsFromFilesArrayToWord(filesArray) |
Concatenate documents from two XPaths | Concatenates documents from two different XPaths into a PDF document or a Word document according to the selected function. | CHelper.ConcatDocumentsFromTwoXpathsToPDF(Me, Xpath1, Xpath2) / CHelper.ConcatDocumentsFromTwoXpathsToWord(Me, Xpath1, Xpath2) |
Concatenate documents from XPath | Concatenates documents from an XPath into a PDF document or a Word document according to the selected function. | CHelper.ConcatDocumentsFromXpathFileToPDF(Me, XPath) / CHelper.ConcatDocumentsFromXpathFileToWord(Me, XPath) |
Convert a date from user time zone to server time zone | Returns a date time attribute converted from a user time zone, for example UTC - 5, to the server time zone where the project runs for example UTC. | ConvertUserTimetoServerTime(UserId,Date) |
Count | Counts the number of elements of an Entity. | CHelper.entityListCount(String entityName, String filter) |
Get Assigned WorkItems | Returns all the WorkItems that have an active allocation to a given user. | CHelper.getAssignedWorkItems(Me, CaseId, CurrentAsigneeId, IncludeSubProcesses) |
Get attribute | Returns the value of a given attribute of a specific record in an entity. | CHelper.getAttrib(sEntityName, oEntityKey, sAttribName) |
Get Boolean | Returns true if the parameter equals 1 or true, false otherwise. | CHelper.getBoolean(value) |
Obtain case object | Returns the case object without the need of context. | CHelper.getCaseById(CaseId) |
Get case users | Obtains the users that have worked on a case. | CHelper.getCaseUsers(CaseNumber) |
Get current time for user | Obtains the current user's time. | CHelper.GetCurrentTimeForUser(idUser) |
Get effective duration | Returns the time difference, in minutes, considering only working days. | CHelper.getEffectiveDuration(Me, Start, End) |
Get effective duration for user | Returns the time difference, in minutes, considering only working days for the specified user. | CHelper.getEffectiveDurationForUser(idUser, Start, End) |
Get entity attribute | Obtains a value from an Entity not related to the Data Model. | CHelper.getEntityAttrib(Entity, ValueToReturn, filter, filterParameters) |
Get estimated date | Returns a date given an initial date and a period of time, considering the Working Time Schema. | CHelper.getEstimatedDate(Me, dtFromDate, iDuration) |
Get estimated date for user | Returns a date given user id, a start date and a number of minutes. | CHelper.getEstimatedDateForUser(idUser, dtFromDate, iDuration) |
Get estimated date from user date time | Calculates a date considering the time schema and user timezone. | CHelper.getEstimatedDateFromUserDateTime(UserId,iDuration) |
Get localized value | Returns the value of a localized entity attribute using the current user's language. | CHelper.GetLocalizedValue(EntityName, AttribName, SurrogateKeyValue) |
Get next sequence value | Obtains the next value of a sequence. | CHelper.GetNextSeqValueStr("SequenceName") |
Get parameter value | Obtains the value of a custom parameter. | CHelper.getParameterValue(parameterName) |
Get parent process Id | Retrieves the parent identifier of a child process, without the need of context. | CHelper.getParentProcessId(caseId, wfclassName) |
Get sibling processes' Id | Obtains the identifiers of the sibling Processes (Sub-Processes with the same parent Process) of a specific Process. | CHelper.getSiblingProcessesId(Me, WfClassName) |
Get Solution date | Returns a date given an initial date and a period of time, considering the Working Time Schema and holidays. | CHelper.getSolutionDate(Me, dtFromDate, iDuration) |
Get solution date for user | Returns a date given user id, a start date and a number of minutes, it considers the user's Working Time Schema and holidays. | CHelper.getSolutionDateForUser(idUser, dtFromDate, iDuration) |
Get String Extended | Retrieves the value stored in an Extended object. | CHelper.GetStringExtended("ExtendedObjectName", Default value, Culture) |
Get Sub-Processes' Id | Obtains the identifier of all child processes. | CHelper.getSubProcessesId(Me) |
Get given Sub-Processes' Id | Obtains the identifier of all the given child processes. | CHelper.getSubProcessesId(Me, WfClassName) |
Get users for Position | Obtains a list of the users who hold a certain Position within the organization. | CHelper.getUsersForPosition(posName) |
Get filtered users for position | Obtains a list of the active users who hold a certain Position within the organization, if the "filterActive" parameter is true. | CHelper.getUsersForPosition(posName, filterActive) |
Get users for role | Obtains a list of the users who hold a certain Role within the organization. | CHelper.getUsersForRole(roleName) |
Get filtered users for role | Obtains a list of the active users who hold a certain Role within the organization, if the parameter is true. | CHelper.getUsersForRole(roleName, filterActive) |
Get users for skill | Obtains a list of the users who have a certain Skill within the organization. | CHelper.getUsersForSkill(skillName) |
Get filtered users for skill | Obtains a list of the active users who have a certain Skill within the organization, if the parameter is true. | CHelper.getUsersForSkill(skillName, filterActive) |
Get users by Stakeholder | Obtain all users given a Stakeholder. | CHelper.GetUsersForStakeholder("StakeholderName") |
Get XSD | Obtains a predefined schema for any entity, as configured in Bizagi Studio. | CHelper.getXSD(entityName, xsdName) |
Get XSL | Obtains a predefined transformation file that you registered for any entity, as configured in Bizagi Studio. | CHelper.getXSL(entityName, xslName) |
Grant case access | Grants the given user, access to the given case. | CHelper.GrantCaseAccess(idCase, idUser) |
Is empty | Returns true if the object specified as parameter is empty or null; otherwise, returns false. | CHelper.IsEmpty(Variable) |
Is null | Returns true if the object specified as parameter is null; otherwise, returns false. | CHelper.IsNull(Variable) |
Is working day | Verifies if a Date is a Working day. | CHelper.IsWorkingDay(Me,Date) |
Is working day for user | Verifies if a Date is a Working day for a specific user. | CHelper.IsWorkingDayForUser(idUser, Date) |
Is working hour | Returns true if a specific date falls under the organization's working time schema; otherwise, it returns false. | CHelper.IsWorkingMinute(Me, Date) |
Is working hour for user | Returns true if a specific date falls under the given user's working time schema; otherwise, it returns false. | CHelper.IsWorkingMinuteForUser(idUser, Date) |
Get the next assigned user by load | Returns the id of the next user available for assignment by load. | CHelper.LoadAssig(AssigneeList, Me) |
New case | Creates a new case with the creator user defined. | CHelper.NewCase(idUser,WFClassName) |
New case with business information | Creates a new case based on the information provided in the input parameter (string XML). | CHelper.NewCase(XML) |
Perform activity | Executes an activity, it's the equivalent of pressing the NEXT button. | CHelper.PerformActivity(XML_ActivityInfo) |
Raise cancel intermediate event | Raises a cancellation and adds a cancellation log file in the project folder. | CHelper.RaiseCancelIntermediateEvent(message) |
Raise error intermediate event | Interrupts the current activity and deviates the normal path towards the error path. This function will add an error log file in the project folder. | CHelper.RaiseErrorIntermediateEvent(message) |
Raise cancel end event | Interrupts the transactional Sub-Process and deviates the normal path towards the cancel path. | CHelper.RaiseCancelEndEvent(message) |
Raise error end event | Interrupts the transactional Sub-Process and deviates the normal path towards the error path. | CHelper.RaiseErrorEndEvent(message) |
Resolve Vocabulary | Obtains the value stored in a specific Vocabulary. | CHelper.resolveVocabulary(Me, VocabularyName) |
Get the next assigned user by sequence | Returns the id of the next user available for assignment by sequence. | CHelper.SecuentialAssig(AssigneeList, Me) |
Set attribute | Modifies specific attributes values from specific records of an entity. | CHelper.setAttrib(sEntityName, oEntityKey, sAttribName, oAttribValue) |
Execute event | Executes an available intermediate Event in Bizagi, which has no specific type defined. | CHelper.setEvent(Me, Caseid, eventName, null) / CHelper.setEvent(xml) |
Evaluate if there are open processes | Evaluates if cases are open for a specific case creation number. | CHelper.thereAreOpenProcesses(CaseNumber) |
Evaluate if there are open processes | Evaluates if cases are open for a specific case creation number and WfClassName. | CHelper.thereAreOpenProcesses(caseNumber, wfclassName) |
Throw validation error | Displays an error message on the Work Portal. | CHelper.ThrowValidationError(message) |
Throw validation alert | Displays a customized alert message on the Work Portal. | CHelper.ThrowValidationAlert(message) |
To base64 | Converts files to base64. | CHelper.ToBase64(data) |
To Integer | Converts a string to Integer. | CHelper.ToInt(sText) |
Trace | Logs the user-defined traces which are manually included in Business Rules. | CHelper.trace(sFileName, sText) |
Update ECM metadata | Maps business information into a document to be stored at the ECM. | CHelper.UpdateECMMetadata(Me, data, XPath) |
Force attribute to deploy | Forces Bizagi to include attributes that are not included in a deployment. | CHelper.usingXPath(xpath) / CHelper.usingXPath(EntityName, xpath) |