All product information in wiki.bizagi.com is only valid for Bizagi BPM Suite 9.1.X.
For newer Bizagi BPM Suite versions (10.X and up) please visit the User Guide.
 

Object Model: CHelper

From Business Process Management, BPM and Workflow Automation Wiki | BizAgi BPMS

Jump to: navigation, search

<keywords content="keywords"> CHelper, Object CHelper, CHelper class, class, advanced expression, advanced rules, advanced expressions, advanced rules, expression module, expression, for user, foruser </keywords> 

Contents

Helper in Bizagi rules (CHelper)

This article lists the functions available in the Helper Object of Bizagi (CHelper) for advanced business rules.

The CHelper class contains functions which are useful to obtain information and execute commands on different processes. Some of these functionalities involve: the possibility to trace the rules' execution in a custom manner, throwing validation error messages, and evaluating an attribute's value, amongst others.


The CHelper class is used within an expression module in a Bizagi business rule, and its functions are suggested by the intellisense's autocomplete feature:



CHelper functions

In the following table, the main and recommended functions of the CHelper class are described:


Function Syntax Description
abortProcess CHelper.abortProcess(Me, iCaseId, eAbortOptions) Aborts the specified case; abort consists of closing abruptly the case and setting the state to abort. Example
getAssignedWorkItems CHelper.getAssignedWorkItems (Me, iCaseId, iCurrAssigneeId, bIncludeSubProcs) Returns an array list with the activities of the specified case and assigned to the specified user.
getAttrib CHelper.getAttrib(sEntityName,oEntityKey,sAttribName) Returns the value of the given attribute of a specific record. This function is also available from the CEntityManager object.
getCaseUsers CHelper.getCaseUsers(sRadNumber) Returns an array list with the ids of all the users who have been a participant of the case (has worked in it). Example.
getEntityAttrib CHelper.getEntityAttrib(sEntityName,sAttibute,sAttribWithFilter) Returns the value of the given attribute according to the filter included.
getEffectiveDuration CHelper.getEffectiveDuration (Me, dtFromDate, dtToDate) Returns the number of minutes between two dates. The calculation considers the working time schedule and holidays configured for the organization. Example 1- Example 2
getEffectiveDurationForUser CHelper.getEffectiveDurationForUser(idUser,dtFromDate,dtToDate) Returns the number of minutes between two dates. The calculation considers the working time schedule and holidays configured for the specific User (idUser). Example
getEstimatedDate CHelper.getEstimatedDate(Me,dtFromDate,iDuration) Returns the end date given a start date (dtFromDate). The calculation is done by adding the number of specified minutes (iDuration), and based on the working time schedule and holidays configured for the organization. This function is similar to getSolutionDate but in this one, the duration can be specified as a negative number. Example
getEstimatedDateForUser CHelper.getEstimatedDateForUser(idUser,dtFromDate,iDuration) Returns the end date given a start date (dtFromDate). The calculation is done by adding the number of specified minutes (iDuration), and based on the working time schedule and holidays configured for the User (idUser). This function is similar to getSolutionDateForUser but in this one, the duration can be specified as a negative number. Example
getNextSeqValueStr CHelper.GetNextSeqValueStr(SequenceName) Auto-generates the next number which follows the sequence (as defined by the user in Bizagi Studio. Example
getOpenProcessesId CHelper.getOpenProcessesId(sRadNumber) Returns an array list of open cases given a creation number.
getParentProcessId CHelper.getParentProcessId(iProcId,iWfClassId) Returns the parent case Id, given the child process id and the wfclass.
getSiblingProcessesId CHelper.getSiblingProcessesId(Me, iWfClassId) Returns an array list with the Ids of the related cases given a work item and a workflow class.
getSolutionDate CHelper.getSolutionDate (Me, dtFromDate, iDuration) Returns the end date given a start date(dtFromDate). The calculation is done by adding the number of specified minutes (iDuration), and based on the working time schedule and holidays configured for the organization. Example
getSolutionDateForUser CHelper.getSolutionDateForUser(idUser,dtFromDate,iDuration) Returns the end date given a start date (dtFromDate). The calculation is done by adding the number of specified minutes (iDuration), and based on the working time schedule and holidays configured for the specific User (idUser). Example
getSubProcessesId CHelper.getSubProcessesId(Me) Returns an array list with a set of sub processes Ids of the current case.
getUsersForPosition CHelper.getUsersForPosition(idPosition) Returns an array list with the ids of all the users who have the given Position. Example.
getUsersForRole CHelper.getUsersForRole(idRole) Returns an array list with the ids of all the users who have the given Role. Example.
getUsersForSkill CHelper.getUsersForSkill(idSkill) Returns an array list with the ids of all the users who have the given Skill. Example.
GetValueAsCollection CHelper.GetValueAsCollection(oValue) Convert a Value to an array list Example.
IsEmpty CHelper.IsEmpty(oValue) Returns true if oValue is empty; otherwise, the method returns false. Example
IsNull CHelper.IsNull(oValue) Returns true if oValue is null; otherwise, the method returns false. Example
IsWorkingDay CHelper.IsWorkingDay(Me,dtDate) Returns true if the specified date (dtDate)falls under a day which is a working day (otherwise, it returns false). The calculation considers the working time schedule and holidays configured for the organization. Example
IsWorkingDayForUser CHelper.IsWorkingDayForUser(idUser, dtDate) Returns true if the specified date (dtDate)falls under a day which is a working day (otherwise, it returns false). The calculation considers the working time schedule and holidays configured for the specified User (idUser). Example
IsWorkingMinute CHelper.IsWorkingMinute(Me,dtDate) Returns true if the specified date (dtDate)falls under a day and exact time which is a working hour (otherwise, it returns false). The calculation considers the working time schedule and holidays configured for the organization. Example
IsWorkingMinuteForUser CHelper.IsWorkingDayForUser(idUser,dtDate) Returns true if the specified date (dtDate)falls under a day and exact time which is a working hour (otherwise, it returns false). The calculation considers the working time schedule and holidays configured for the specified User (idUser). Example
relateXPathFact CHelper.relateXPathFact(Me, item, factName) Allows the identification of records from a master entity on which a multiple sub process intends to be launched. Available only for Enterprise .NET Edition.
resolveVocabulary CHelper.resolveVocabulary(Me, definitionName) Gets the value stored in the vocabulary. Example 1 - Example 2
sendEmail CMailer.sendEmail (sMail, iTemplateId, sEntityName, iEntityKey) Send a notification by using the specified message template (iTemplateId). Available only for Enterprise Edition (.NET and JEE)
setAttrib CHelper.setAttrib(sEntityName,oEntityKey,sAttribName,oAttribValue) Assigns a value to the given attribute of a specific record. This function is also available from the CEntityManager object.
thereAreOpenProcesses CHelper.thereAreOpenProcesses(sRadNumber) Returns true when cases are opened for the specified case creation number (otherwise, it returns false).
ThrowValidationError CHelper.ThrowValidationError(sMesage) Displays a validation exception message for the work portal user. Example
trace CHelper.trace(sFileName, sText) Creates a trace file with the information required. Example


 


Related Articles


<comments />