These are the Java classes and methods which are available in the [Script Task]. There are Questetra-specific classes and Java standard classes.
BPMN icon:[Script Task]
1. Questetra-specific Classes
1-1. Class for retrieving/updating the Workflow platform
com.questetra.bpms.core.event.scripttask.WorkflowEngine
1-2. Class for retrieving the Workflow App definition (business process definition)
com.questetra.bpms.core.event.scripttask.WorkflowEngine
com.questetra.bpms.core.event.scripttask.ProcessDataDefinitionView
com.questetra.bpms.core.event.scripttask.SubDataDefinitionView
1-3. Class for retrieving/updating the properties of Cases flowing in a Workflow App
com.questetra.bpms.core.event.scripttask.ProcessInstanceView
1-4. Class for retrieving/updating business data stored in a Case that flows into a Workflow App
com.questetra.bpms.core.event.scripttask.WorkflowEngine
1-5. Class for retrieving a child Case
com.questetra.bpms.core.event.scripttask.ScriptTaskEngine
1-6. Class for manipulating Select-type data(SELECT, SELECT_SINGLE, SELECT_CHECKBOX)
com.questetra.bpms.core.event.scripttask.ItemView
com.questetra.bpms.core.event.scripttask.ItemDaoWrapper
1-7. Class for manipulating Datetime-type data(DATE, DATE_YMD, DATE_YM, DATE_Y, DATE_MD, DATETIME)
com.questetra.bpms.util.AddableDate
com.questetra.bpms.util.AddableTimestamp
com.questetra.bpms.core.event.scripttask.DateFormatWrapper
1-8. Class for manipulating User-type data(QUSER)
com.questetra.bpms.core.event.scripttask.QuserView
com.questetra.bpms.core.event.scripttask.QuserDaoWrapper
1-9. Class for manipulating Organization-type data(QGROUP)
com.questetra.bpms.core.event.scripttask.QgroupView
com.questetra.bpms.core.event.scripttask.QgroupDaoWrapper
1-10. Class for manipulating Roles(QROLE)
com.questetra.bpms.core.event.scripttask.QroleView
com.questetra.bpms.core.event.scripttask.QroleDaoWrapper
1-11. Class for manipulating Titles(QTITLE)
com.questetra.bpms.core.event.scripttask.QtitleView
com.questetra.bpms.core.event.scripttask.QtitleDaoWrapper
1-12. Class for manipulating Table-type data(LIST)
com.questetra.bpms.core.event.scripttask.ScriptListArray
com.questetra.bpms.core.event.scripttask.ScriptListArray.ScriptListRow
1-13. Class for manipulating File-type data(FILE)
com.questetra.bpms.core.event.scripttask.QfileView
com.questetra.bpms.core.event.scripttask.NewQfile
com.questetra.bpms.core.event.scripttask.FileRepositoryWrapper
fileRepository sample (script for service task definition (Addon-XML))
1-14. Class for manipulating strings and collections
com.questetra.bpms.core.event.scripttask.Base64UtilsWrapper
com.questetra.bpms.core.event.scripttask.HexWrapper
com.questetra.bpms.core.event.scripttask.DigestUtilsWrapper
com.questetra.bpms.core.event.scripttask.RSAWrapper
com.questetra.bpms.core.event.scripttask.HmacUtilsWrapper
com.questetra.bpms.core.event.scripttask.Joiner
com.questetra.bpms.core.event.scripttask.StringEscapeUtilsWrapper
com.questetra.bpms.core.event.scripttask.MarkdownUtilsWrapper
1-15. Class for manipulating XML
com.questetra.bpms.core.event.scripttask.XPathWrapper
com.questetra.bpms.core.event.scripttask.XPathWrapper.NodeWrapper
com.questetra.bpms.core.event.scripttask.XPathWrapper.NodeListWrapper
xpath sample (script for service task definition (Addon-XML))
1-16. Class for manipulating byte array
com.questetra.bpms.core.event.scripttask.ByteArrayWrapper
1-17. Class for controlling posting to Collab Chat
com.questetra.bpms.core.event.scripttask.FeedServiceWrapper com.questetra.bpms.core.event.scripttask.FeedServiceWrapper.FeedMessageWrapper
feedService sample (Script for service task definition (Addon-XML))
1-18. Class for controlling HTTP communication
com.questetra.bpms.core.event.scripttask.HttpClientWrapper
com.questetra.bpms.core.event.scripttask.HttpClientWrapper.HttpRequestWrapper
com.questetra.bpms.core.event.scripttask.HttpClientWrapper.HttpResponseWrapper
com.questetra.bpms.core.event.scripttask.AuthSettingWrapper
authSetting sample (Script for service task definition (Addon-XML))
1-19. Class for controlling SMTP (Email) communication
com.questetra.bpms.core.event.scripttask.EmailServiceWrapper
com.questetra.bpms.core.event.scripttask.EmailServiceWrapper.EmailMessageWrapper
2. Classes that Retrieve Config values of a Service Task Definition (Add-on)
For scripts described in Service Task definition (Add-on) (M416)
Code example
const processId = configs.get( "conf_ProcessId" );
| Type | Method (constructor) / Description |
|---|---|
| String |
get(String configName) Returns the following string, depending on the form-type setting - TEXTFIELD, TEXTAREA: Returns the entered string or (If el-enabled="true") the result of the EL expression being evaluated- SELECT: Returns the data definition number of the specified Data Item or (if editable="true") the entered character string- SELECT_ITEM: Returns the value of the selected choice ( item)- TOGGLE: Returns a boolean as a string ( true or false)- QUSER: Returns the user ID of the selected Quser - OAUTH2: Returns the settingName of the selected OAuth2 settings |
| Object |
getObject(String configName) Returns the following objects, depending on the form-type setting - SELECT: Data definition object (if editable="true" and a fixed value is specified it will be null))- SELECT_ITEM: Choice object ( ItemVeiw)- TOGGLE: boolean ( true or false)- QUSER: Quser object ( QuserView)- OAUTH2: HTTP Auth-setting object ( AuthSettingWrapper)- TEXTFIELD, TEXTAREA, OAUTH2: null
|
3. Java standard Classes
java.lang.String
java.lang.Long
java.lang.Math
java.util.ArrayList
java.util.Date
java.util.HashMap
java.util.Locale
java.util.regex.Pattern
java.util.regex.Matcher
java.math.BigDecimal
java.text.SimpleDateFormat
java.text.DecimalFormat
java.sql.Date
java.sql.Timestamp
Details of Questetra-specific Classes
com.questetra.bpms.core.event.scripttask.WorkflowEngine
Code example
const item = engine.findDataDefinitionByName( "Customer Name" );
Method for updating the Workflow platform
| Type | Method (constructor) / Description |
|---|---|
| String |
getTimeZoneId() Returns the time zone ID of the system |
| int |
getTimeZoneOffsetInMinutes() Returns the offset of the system time zone in minutes |
| void |
log(String message) Outputs log messages to the processing records |
Methods for retrieving the Workflow App definition
| Type | Method (constructor) / Description |
|---|---|
| List<ProcessDataDefinitionView> |
findDataDefinitions() Returns a list of Data Items |
| ProcessDataDefinitionView |
findDataDefinitionByName(String name) Returns the Data Item searched by name. If there are multiple Data Items with the same name, the first one is returned |
| ProcessDataDefinitionView |
findDataDefinitionByNumber(String dataDefNum) Returns the Data Item searched by the definition number |
| ProcessDataDefinitionView |
findDataDefinitionByNumber(Long dataDefNum) Returns the Data Item searched by the definition number |
| ProcessDataDefinitionView |
findDataDefinitionByVarName(String fieldName) Return the Data Item searched by the field name |
Methods for retrieving/updating business data
| Type | Method (constructor) / Description |
|---|---|
| Object or List<Object> |
findDataByVarName(String fieldName) Returns the object of the Data Item specified by the field name. (For the object type, see the description of findData()) |
| Object or List<Object> |
findDataByName(String name) Returns the Data Item object specified by the Data Item Name. (For the object type, see the description of findData()) |
| Object or List<Object> |
findDataByNumber(String dataDefNum) Returns the Data Item object specified by the data definition number. (For the object type, see the description of findData()) |
| Object or List<Object> |
findDataByNumber(Long dataDefNum) Returns the Data Item object specified by the data definition number. (For the object type, see the description of findData()) |
| Object or List<Object> |
findData(ProcessDataDefinitionView pocket) Returns the object stored in the Data Item specified by the data definition object. - String-type: java.lang.String- Numeric-type: java.math.BigDecimal- Select-type: List<com.questetra.bpms.core.event.scripttask.ItemView>- Date-type: com.questetra.bpms.util.AddableDate- Datetime-type: com.questetra.bpms.util.AddableTimestamp- File-type: List<com.questetra.bpms.core.event.scripttask.QfileView>- User-type: com.questetra.bpms.core.event.scripttask.QuserView- Organization-type: com.questetra.bpms.core.event.scripttask.QgroupView- Table-type: com.questetra.bpms.core.event.scripttask.ScriptListArray
|
| void |
setDataByVarName(String fieldName, Object value) Assigns a value to a Data Item specified by the field name |
| void |
setDataByName(String name, Object value) Assigns a value to the Data Item specified by the Data Item name |
| void |
setDataByNumber(String dataDefNum, Object value) Assigns a value to the Data Item specified by the data definition number |
| void |
setDataByNumber(Long dataDefNum, Object value) Assigns a value to the Data Item specified by the data definition number |
| void |
setData(ProcessDataDefinitionView pocket, Object value) Assigns a value (data object) to a Data Item specified by the data definition object |
com.questetra.bpms.core.event.scripttask.ScriptTaskEngine
Code example
const childProcess = engine.findChildProcessInstance( "1234" );
Methods that reference Child Cases
| Type | Method (constructor) / Description |
|---|---|
| ProcessInstanceView |
findChildProcessInstance(String pid) Returns the child Case specified by the Case ID (Error when trying to access a Case other than the child Case) |
| ProcessInstanceView |
findChildProcessInstance(Long pid) Returns the child Case specified by the Case ID (Error when trying to access a Case other than the child Case) |
| Object or List<Object> |
findChildDataByVarName(ProcessInstanceView childPi, String fieldName) Returns an object of the Data Item specified by field name from the specified child Case (Error when trying to access a Data Item that is not allowed to be referenced by the parent Case) (For object types, see the description of WorflowEngine.findData()) |
com.questetra.bpms.core.event.scripttask.ProcessDataDefinitionView
| Type | Method (constructor) / Description |
|---|---|
| String |
getName() Returns the Data Item name |
| long |
getNumber() Returns the Data Definition number |
| String |
getVarName() Returns the field name |
| List<SubDataDefinitionView> |
getSubDataDefinitions() Returns a list of table items for Table-type cases |
| ScriptListArray |
createListArray() Creates an empty table (an empty ScriptListArray object) for Table-type cases |
| boolean |
matchDataType(String dataType) dataType: data types that are |
com.questetra.bpms.core.event.scripttask.SubDataDefinitionView
| Type | Method (constructor) / Description |
|---|---|
| String |
getName() Returns the table item name |
| String |
getVarName() Returns the field name of the table item. If the field name is undefined it returns null |
| long |
getNumber() Returns the table item number |
| boolean |
matchDataType(String dataType) dataType: data types that are |
com.questetra.bpms.core.event.scripttask.ProcessInstanceView
Code example
const appId = processInstance.getProcessModelInfoId();
| Type | Method (constructor) / Description |
|---|---|
| Long |
getProcessModelInfoId() Returns the App ID |
| String |
getProcessModelInfoName() Returns the App name |
| String |
getProcessModelInfoCategory() Returns the App Category |
| Long |
getProcessModelVersion() Returns the version of the App with which the Case was started |
| Long |
getProcessInstanceId() Returns the Case ID |
| Long |
getParentProcessInstanceId() Returns the Case ID of the parent Case |
| String |
getProcessInstanceState() Returns the Case status - STARTED: Incomplete - ENDED: Finished - FAILED: Abnormal end |
| String |
getProcessInstanceTitle() Returns the Title of the Case |
| QuserView |
getProcessInstanceInitQuser() Returns the Case Start User |
| Long |
getProcessInstanceInitQuserId() Returns the Case Start User ID |
| String |
getProcessInstanceInitQuserName() Returns the Case Start User Name |
| QgroupView |
getProcessInstanceInitQgroup() Returns the Case Start Organization |
| Long |
getProcessInstanceInitQgroupId() Retrieves the Case Start Organization ID |
| String |
getProcessInstanceInitQgroupName() Returns the Case Start Organization Name |
| AddableTimestamp |
getProcessInstanceStartDatetime() Returns the Case Start DateTime |
| Long |
getProcessInstanceSequenceNumber() Returns the Case Sequence Number |
| void |
setProcessInstanceTitle(String title) Sets the Title of the Case |
| boolean |
getProcessInstanceDebug() Determines if the Case is a Debug Case. |
com.questetra.bpms.core.event.scripttask.ItemView
| Type | Method (constructor) / Description |
|---|---|
| String |
getValue() Returns the option ID |
| String |
getDisplay() Return the choice labels |
com.questetra.bpms.core.event.scripttask.ItemDaoWrapper
Code example
const options = itemDao.findAll("customer_master.xml", true);| Type | Method (constructor) / Description |
|---|---|
| List<ItemView> |
findAll(String fileName, boolean isSharedFile) Returns all choices of the specified choice master |
| List<ItemView> |
findAll(ProcessDataDefinitionView dataDef) Returns all choices in the specified Select-type Data Item (Error if the Type of data source is "Get choice list via HTTP") |
| List<ItemView> |
findAll(SubDataDefinitionView subDataDef) Returns all choices in the specified Select-type Sub Data Item of Table-type Date Item |
| ItemView |
findByValue(String fileName, boolean isSharedFile, String value) Returns a choice with the specific value (choice ID) from the specified choice master |
| ItemView |
findByValue(ProcessDataDefinitionView dataDef, String value) Returns a choice with the specific value (choice ID) in the specified Select-type Data Item (Error if the Type of data source is "Get choice list via HTTP") |
| ItemView |
findByValue(SubDataDefinitionView dataDef, String value) Returns a choice with the specific value (choice ID) in the specified Select-type Sub Data Item of Table-type Data Item (Error if the Type of data source is "Get choice list via HTTP") |
com.questetra.bpms.util.AddableDate
| Type | Method (constructor) / Description |
|---|---|
| (AddableDate) |
AddableDate() Returns the Date when called (year, month, day/YMD) |
| (AddableDate) |
AddableDate(long time) Returns the Date specified in milliseconds ( time) since 1970-01-01 00:00:00 UTC (year, month, day/YMD) |
| AddableDate |
addDays(int days) Returns a Date adding the number of days specified (Specified a negative value, it will go back in time) |
| AddableDate |
addMonths(int months) Returns a Date adding the number of months specified (Specified a negative value, it will go back in time) |
| long |
getTime() The Date-type value |
| AddableDate |
getFirstDateInMonth() Returns the first day of the month |
| AddableDate |
getFirstDateInWeek() Returns the first day of the week (Monday) |
| AddableTimestamp |
getFirstTimeInDate() Returns the first time of the day (0:00:00, 0ms) |
| AddableDate |
getLastDateInMonth() Returns the last day of the month. The day before the 1st of the next month |
| String |
toString() Returns strings in the format according to date subtype - Y/M/D: yyyy-MM-dd- M/D: MM-dd- Y/M: yyyy-MM- Y: yyyy
|
| AddableDate | getFirstTimeInMonth() *deprecated |
| AddableDate | getLastTimeInMonth() *deprecated |
com.questetra.bpms.util.AddableTimestamp
| Type | Method (constructor) / Description |
|---|---|
| (AddableTimestamp) |
AddableTimestamp() Returns the Timestamp at the time of the call |
| (AddableTimestamp) |
AddableTimestamp(long time) Returns the Timestamp specified in milliseconds ( time) since 1970-01-01 00:00:00 UTC
|
| AddableTimestamp |
addMinutes(int minutes) Returns the Timestamp adding the specified minutes (Specified a negative value, it will go back in time) |
| AddableTimestamp |
addHours(int hours) Returns the Timestamp adding the specified hours (Specified a negative value, it will go back in time) |
| AddableTimestamp |
addDays(int days) Returns the Timestamp adding the specified days (Specified a negative value, it will go back in time) |
| AddableTimestamp |
addMonths(int months) Returns the Timestamp adding the specified months (Specified a negative value, it will go back in time) |
| long |
getTime() The Datetime value |
| AddableTimestamp |
getFirstTimeInDate() Returns the first time of the day (0:00:00, 0ms) |
| AddableTimestamp |
getFirstTimeInWeek() Returns the first time of the first day of the week (0:00:00, 0ms of Monday.) |
| AddableTimestamp |
getFirstTimeInMonth() Returns the first time of the first day of the month (0:00:00, 0ms of the 1st.) |
| AddableTimestamp |
getLastTimeInMonth() Returns the last time of the last day of the month (1 ms before the first day of the next month) |
| String |
toString() Returns strings in yyyy-MM-dd HH:mm format |
com.questetra.bpms.core.event.scripttask.DateFormatWrapper
Code example
const text = dateFormatter.format('GMT+0900', 'yyyyMMdd HHmmZ', myTime);
const datetime = dateFormatter.parse('yyyy-MM-dd HH:mm', '2020-03-14 09:45');| Type | Method (constructor) / Description |
|---|---|
| String |
format(String timeZone, String format, AddableTimestamp datetime) Returns a formatted string out of the Datetime data by specifying a time zone |
| String |
format(String format, AddableTimestamp datetime) Returns a formatted string out of the Datetime data |
| String |
format(String format, AddableDate date) Returns a formatted string out of the Date data |
| AddableTimestamp |
parse(String format, String textDatetime) Parses the string in the specified format and returns a timestamp |
com.questetra.bpms.core.event.scripttask.QuserView
| Type | Method (constructor) / Description |
|---|---|
| Long |
getId() Returns the User ID |
| String |
getName() Returns the User Name |
| String |
getEmail() Returns the User's email address |
| boolean |
isDeleted() Determines if the User is deleted |
| boolean |
isDeletedInFuture() Determines if it is scheduled for deletion |
com.questetra.bpms.core.event.scripttask.QuserDaoWrapper
Code example
const quser = quserDao.findByEmail( "ques@example.com" );
| Type | Method (constructor) / Description |
|---|---|
| QuserView |
findByEmail(String email) Returns a Quser (user) for the specified email address |
| QuserView |
findById(Long id) Returns a Quser (user) for the specified User ID |
| List<QuserView> |
findByQgroup(QgroupView qgroup) Returns a list of Qusers (users) who belong to the Organization |
| List<QuserView> |
findByQrole(QroleView qrole) Returns a list of Qusers (users) who belong to the specified role |
| List<QuserView> |
findByQuery(String query) Returns a list of Qusers (users) that satisfy the specified query |
| boolean |
isMemberOfQrole(QuserView quser, QroleView qrole) Determines whether the user belongs to the specified role |
| boolean |
isMemberOfQgroup(QuserView quser, QgroupView qgroup) Determines whether the user belongs to the designated organisation |
| boolean |
isMemberOfQgroup(QuserView quser, QgroupView qgroup, boolean hasTitle) Determines whether the user belongs to the designated organisation as With Position/No Position |
| boolean |
isMemberOfQgroup(QuserView quser, QgroupView qgroup, QtitleView qtitle) Determines whether the user belongs to the designated organisation in the specified position |
| boolean |
isMemberOfParentQgroup(QuserView quser, QgroupView qgroup) Determines whether the user belongs in the parent organisation of the designated organisation |
| boolean |
isMemberOfParentQgroup(QuserView quser, QgroupView qgroup, boolean hasTitle) Determines whether the user belongs in the parent organisation of the designated organisation as With Position/No Position |
| boolean |
isMemberOfParentQgroup(QuserView quser, QgroupView qgroup, QtitleView qtitle) Determines whether the user belongs in the parent organisation of the designated organisation in the specified position |
| boolean |
isMemberOfAnyChildQgroups(QuserView quser, QgroupView qgroup) Determines whether the user belongs in one of the designated organisation's child organisations |
| boolean |
isMemberOfAnyChildQgroups(QuserView quser, QgroupView qgroup, boolean hasTitle) Determines whether the user belongs in one of the designated organisation's child organisations as With Position/No Position |
| boolean |
isMemberOfAnyChildQgroups(QuserView quser, QgroupView qgroup, QtitleView qtitle) Determines whether the user belongs in one of the designated organisation's child organisations in the specified position |
| boolean |
isMemberOfAnyAncestorQgroups(QuserView quser, QgroupView qgroup) Determines whether the user belongs to one of the upper organisations of the designated organisation |
| boolean |
isMemberOfAnyAncestorQgroups(QuserView quser, QgroupView qgroup, boolean hasTitle) Determines whether the user belongs to one of the upper organisations of the designated organisation as With Position/No Position |
| boolean |
isMemberOfAnyAncestorQgroups(QuserView quser, QgroupView qgroup, QtitleView qtitle) Determines whether the user belongs to one of the upper organisations of the designated organisation in the specified position |
| boolean |
isMemberOfAnyDescendantQgroups(QuserView quser, QgroupView qgroup) Determines whether the user belongs in any of the lower organisations of the designated organisation |
| boolean |
isMemberOfAnyDescendantQgroups(QuserView quser, QgroupView qgroup, boolean hasTitle) Determines whether the user belongs in any of the lower organisations of the designated organisation as With Position/No Position |
| boolean |
isMemberOfAnyDescendantQgroups(QuserView quser, QgroupView qgroup, QtitleView qtitle) Determines whether the user belongs in any of the lower organisations of the designated organisation in the specified position |
| List<QuserView> |
findMembersOfQgroup(QgroupView qgroup) Returns a list of Qusers (users) belonging to the specified organisation Same as existing findByQgroup(QgroupView)
|
| List<QuserView> |
findMembersOfQgroup(QgroupView qgroup, QtitleView qtitle) Returns a list of Qusers (users) who belong to the specified organisation in the specified position |
| List<QuserView> |
findMembersOfQgroup(QgroupView group, boolean hasTitle) Returns a list of Qusers (users) who belong to the specified organisation as With Position/No Position Same as existing findByQgroupAndPosition(QgroupView, boolean) |
| List<QuserView> |
findMembersOfParentQgroup(QgroupView qgroup) Returns a list of Qusers (users) who belong to the parent organisation of the specified organisation |
| List<QuserView> |
findMembersOfParentQgroup(QgroupView qgroup, QtitleView qtitle) Returns a list of Qusers (users) who belong to the parent organisation of the specified organisation in the specified position |
| List<QuserView> |
findMembersOfParentQgroup(QgroupView qgroup, boolean hasTitle) Returns a list of Qusers (users) who belong to the parent organisation of the specified organisation as With Position/No Position |
| List<QuserView> |
findMembersOfAnyChildQgroups(QgroupView qgroup) Returns a list of Qusers (users) who belong to one of the specified organisation's child organisations |
| List<QuserView> |
findMembersOfAnyChildQgroups(QgroupView qgroup, QtitleView qtitle) Returns a list of Qusers (users) who belong to one of the child organisations of the specified organisation in a specified position |
| List<QuserView> |
findMembersOfAnyChildQgroups(QgroupView qgroup, boolean hasTitle) Returns a list of Qusers (users) who belong to one of the specified organisation's child organisations as With Position/No Position |
| List<QuserView> |
findMembersOfAnyAncestorQgroups(QgroupView qgroup) Returns a list of Qusers (users) who belong to one of the upper organisations of the specified organisation |
| List<QuserView> |
findMembersOfAnyAncestorQgroups(QgroupView qgroup, QtitleView qtitle) Returns a list of Qusers (users) who belong to one of the upper organisations of the specified organisation in the specified position |
| List<QuserView> |
findMembersOfAnyAncestorQgroups(QgroupView qgroup, boolean hasTitle) Returns a list of Qusers (users) who belong to one of the upper organisations of the specified organisation, as With Position/No Position |
| List<QuserView> |
findMembersOfAnyDescendantQgroups(QgroupView qgroup) Returns a list of Qusers (users) who belong to one of the lower organisations of the specified organisation |
| List<QuserView> |
findMembersOfAnyDescendantQgroups(QgroupView qgroup, QtitleView qtitle) Returns a list of Qusers (users) who belong to one of the lower organisations of the specified organisation in the specified position |
| List<QuserView> |
findMembersOfAnyDescendantQgroups(QgroupView qgroup, boolean hasTitle) Returns a list of Qusers (users) who belong to one of the lower organisations of the specified organisation as With Position/No Position |
| List<QuserView> |
findMembersOfQrole(QroleView qrole) Returns a list of Qusers (users) who belong to the specified role |
com.questetra.bpms.core.event.scripttask.QgroupView
| Type | Method (constructor) / Description |
|---|---|
| Long |
getId() Returns the Organization ID |
| String |
getName() Returns the Organization Name |
| String |
getEmail() Returns the Organization's email address |
| boolean |
isDeleted() Determines if an Organization is deleted |
| boolean |
isDeletedInFuture() Determines if it is scheduled for deletion |
com.questetra.bpms.core.event.scripttask.QgroupDaoWrapper
Code example
const qorg = qgroupDao.findById( 3 );
| Type | Method (constructor) / Description |
|---|---|
| QgroupView |
findById(Long id) Returns a Qgroup (group) for the specified Organization ID |
| QgroupView |
findByName(String name) Returns a Qgroup (group) for the specified Organization name |
| QgroupView |
findParentQgroup(QgroupView qgroup) Returns a Qgroup (group) which is the parent Organization of the specified Organization |
| QgroupView |
findPrimaryQgroup(QuserView quser) Returns a Qgroup (group) which the specified User primarily belongs to |
| List<QgroupView> |
findByQuser(QuserView quser) Returns a list of Qgroups (groups) which the specified User belongs to |
| List<QgroupView> |
findByQuser(QuserView quser, boolean hasTitle) Returns a list of Qgroups (groups) which the specified user belongs to as With Position/No Position |
| List<QgroupView> |
findByQuser(QuserView quser, QtitleView qtitle) Returns a list of Qgroups (groups) which the user belongs to in a specific position |
| List<QgroupView> |
findByQuery(String query) Returns a list of Qgroups (groups) which satisfy the specified query |
| List<QgroupView> |
findChildQgroups(QgroupView qgroup) Returns a list of Qgroups (groups) showing child organizations of the specified organization |
| List<QgroupView> |
findAncestorQgroups(QgroupView qgroup) Returns a list of Qgroups (groups) showing upper organizations of the specified organization |
| List<QgroupView> |
findDescendantQgroups(QgroupView qgroup) Returns a list of Qgroups (groups) showing lower organizations of the specified organization |
| boolean |
isParentOf(QgroupView qgroupParent, QgroupView qgroupChild) Determines whether the organization is a parent of the specified organization |
| boolean |
isChildOf(QgroupView qgroupChild, QgroupView qgroupParent) Determines whether the organization is a child of the specified organization |
| boolean |
isAncestorOf(QgroupView qgroupAncestor, QgroupView qgroupDescendant) Determines whether the organization is an upper organization to the specified organization |
| boolean |
isDescendantOf(QgroupView qgroupDescendant, QgroupView qgroupAncestor) Determines whether the organization is a lower organization to the specified organization |
com.questetra.bpms.core.event.scripttask.QroleView
| Type | Method (constructor) / Description |
|---|---|
| Long |
getId() Returns the Role ID |
| String |
getName() Returns the Role Name |
| boolean |
isDeletedInFuture() Determines if it is scheduled for deletion |
com.questetra.bpms.core.event.scripttask.QroleDaoWrapper
Code example
const qrole = qroleDao.findById( 2 );
| Type | Method (constructor) / Description |
|---|---|
| QroleView |
findById(Long id) Returns a Qrole (role) for the specified Role ID |
| QroleView |
findByName(String name) Returns a Qrole (role) for the specified Role name |
| List<QroleView> |
findByQuser(QuserView quser) Returns a list of Qroles (roles) which the specified User belongs to |
| List<QroleView> |
findByQuery(String query) Returns a list of Qroles (roles) which satisfies the specified query |
com.questetra.bpms.core.event.scripttask.QtitleView
| Type | Method (constructor) / Description |
|---|---|
| Long |
getId() Returns Title ID |
| String |
getName() Returns Title Name |
com.questetra.bpms.core.event.scripttask.QtitleDaoWrapper
Code example
const qtitle = qtitleDao.findById( 2 );
| Type | Method (constructor) / Description |
|---|---|
| QtitleView |
findById(Long id) Returns a Qtitle (title) for the specified Title ID |
| QtitleView |
findByName(String name) Returns a Qtitle (title) for the specified Title name |
| List<QtitleView> |
findByQuery(String query) Returns a list of Qtitles (titles) which satisfies the specified query |
| QtitleView |
findByQuserAndQgroup(QuserView quser, QgroupView qgroup) Returns a Qtitle associated with both the specified Quser and Qgroup |
com.questetra.bpms.core.event.scripttask.ScriptListArray
| Type | Method (constructor) / Description |
|---|---|
| ScriptListArray.ScriptListRow |
addRow() Appends an empty row |
| String |
get(int rowIndex, int colIndex) Returns cell data as String - rowIndex : Row number 0-index - colIndex : Column number 0-index String format - String-type: (entered character string) - Numeric-type: Standard format (period as decimal point, no thousands separator) - Select-type: Choice ID - Date-type: yyyy-mm-dd
|
| String |
get(int rowIndex, String fieldName) Returns cell data as String (See above for String format) |
| Object |
getObject(int rowIndex, int colIndex) Returns a cell data object - rowIndex : Row number 0-index - colIndex : Column number 0-index Object types - String-type: java.lang.String- Numeric-type: java.math.BigDecimal- Select-type: com.questetra.bpms.core.event.scripttask.ItemView- Date-type com.questetra.bpms.util.AddableDate
|
| Object |
getObject(int rowIndex, String fieldName) Returns a cell data object (See above for object types) |
| ScriptListArray.ScriptListRow |
getRow(int rowIndex) Returns the specified row |
| List<ScriptListArray.ScriptListRow> |
getRows() Returns all rows |
| ScriptListArray.ScriptListRow |
getSummary() Returns the contents in the summary row at the end of table ( null if it does not exist) |
| ScriptListArray.ScriptListRow |
removeRow(int rowIndex) Deletes the specified row |
| int |
size() Returns the number of rows |
| String |
toXmlString() Returns the table in XML string |
com.questetra.bpms.core.event.scripttask.ScriptListArray.ScriptListRow
| Type | Method (constructor) / Description |
|---|---|
| String |
get(String fieldName) Returns the column specified by the field name String format - String-type: (entered character string) - Numeric-type: Standard format (period as decimal point, no thousands separator) - Select-type: Choice ID - Date-type: yyyy-mm-dd
|
| String |
getCol(int colIndex) Returns the specified column (String format same as get()) |
| List<String> |
getCols() Returns all columns (String format same as get()) |
| Object |
getObject(int colIndex) Returns a column data object in the specified column - index: Column number 0-index Object type - String-type: java.lang.String- Numeric-type: java.math.BigDecimal- Select-type: com.questetra.bpms.core.event.scripttask.ItemView- Date-type: com.questetra.bpms.util.AddableDate
|
| Object |
getObject(String fieldName) Returns a column data object specified by field name (See above for object types) |
| String |
put(String fieldName, String cellString) Overwrites the column specified by the field name, then retrieves the previous value String ( cellString) format- String-type: (entered character string) - Numeric-type: Standard format (period as decimal point, no thousands separator) - Select-type: Choice ID - Date-type: yyyy-mm-dd
|
| void |
setCol(int colIndex, String cellString) Overwrites the specified column String ( cellString) format- String-type: (entered character string) - Numeric-type: Standard format (period as decimal point, no thousands separator) - Select-type: Choice ID - Date-type: yyyy-mm-dd
|
| void |
setObject(int colIndex, Object value) Overwrites the specified column Object type - String-type: String - Numeric-type: BigDecimal / String (Standard format)- Select-type: ItemView / String (Choice ID)- Date-type: AddableDate / String (yyyy-mm-dd) |
| void |
setObject(String fieldName, Object value) Overwrites the specified column by the field name (See above for object types) |
| int |
size() Returns the number of columns |
com.questetra.bpms.core.event.scripttask.QfileView
| Type | Method (constructor) / Description |
|---|---|
| Long |
getId() Returns the File ID |
| String |
getName() Returns the File Name |
| Long |
getLength() Returns the File size |
| String |
getLengthText() Returns the File size as text |
| String |
getContentType() Returns the Content-Type of the File |
| String |
getCharset() Returns the charset value in the Content-Typeof the file. |
| String |
getMalwareScanStatus() Returns the malware scan status of the file - null: File was saved before malware scanning was enabled- SCANNING: Scanning in progress - NO_THREATS_FOUND: No threats found - THREATS_FOUND: File identified as containing malware - UNSUPPORTED: File cannot be scanned (e.g., encrypted files) - TIMEOUT: Cases where scanning could not be completed and determined within the specified time limit - ACCESS_DENIED, FAILED, UNKNOWN: Cases that do not normally occur during standard operations |
| Long |
getProcessDataInstanceId() Returns the ID of the File type data instance in which the File is stored |
| Boolean |
isImage() Determines whether the file is an image Returns |
| Boolean |
isInline() Returns |
com.questetra.bpms.core.event.scripttask.NewQfile
| Type | Method (constructor) / Description |
|---|---|
| (NewQfile) |
NewQfile(String fileName, String contentType, String text) Saves the text data as a file by specifying the Content-Type
|
| (NewQfile) |
NewQfile(String fileName, String contentType, String charset, String text) Saves the text data as a file by specifying the Content-Type and the character code (charset) |
| (NewQfile) |
NewQfile(String fileName, String contentType, ByteArrayWrapper data) Saves the binary data as it is |
| (NewQfile) |
NewQfile(String fileName, String contentType, QfileView copyFrom) Duplicates and saves the file data as it is |
| String |
getName() Returns the file name |
| Long |
getLength() Returns the file size |
| String |
getContentType() Returns the Content-Type of the file |
| String |
getCharset() Returns the charset value in the Content-Type of the file |
com.questetra.bpms.core.event.scripttask.FileRepositoryWrapper
Code example
fileRepository.readFile(file, "UTF-8", function(line) {
text += line + '\n';
});| Type | Method (constructor) / Description |
|---|---|
| String |
readFile(QfileView qfile, String encoding) Reads the text files with specified character encoding (The size of the file that can be read is limited to 1MB) |
| void |
readFile(QfileView qfile, String encoding, java.util.function.Consumer<String> function) Reads the text file using the specified character encoding and passes each line to the specified function (For a text file with 10 lines, the function is called 10 times.) |
| ByteArrayWrapper |
readFile(QfileView qfile) Reads the file as a byte array (The size of the file that can be read is limited to 1MB) |
| void |
readFile(QfileView qfile, int size, java.util.function.Consumer<ByteArrayWrapper> function) Reads the file as a byte array in chunks of the specified size and passes each chunk to the specified function |
com.questetra.bpms.core.event.scripttask.Base64UtilsWrapper
Code example
const base64Str = base64.encodeToString( "Email subject" );
| Type | Method (constructor) / Description |
|---|---|
| String |
encodeToString(ByteArrayWrapper bytes) Encodes to Base64 (RFC 4648) |
| String |
encodeToString(String src) Encodes to Base64 as UTF-8 characters (RFC 4648) |
| String |
encodeToUrlSafeString(ByteArrayWrapper bytes) Encodes to Base64 (RFC 4648: URL and Filename Safe Alphabet) (Uses - _ instead of + /) |
| String |
encodeToUrlSafeString(String src) Encodes to Base64 as UTF-8 characters (RFC 4648: URL and Filename Safe Alphabet) (Uses - _ instead of + /) |
| String |
decodeFromString(String src) Decodes Base64 from UTF-8 characters (RFC 4648) |
| String |
decodeFromUrlSafeString(String src) Decodes Base64 from UTF-8 characters (RFC 4648: URL and Filename Safe Alphabet) (Uses - _ instead of + /) |
| ByteArrayWrapper |
decodeFromStringToByteArray(String src) Decodes Base64 into binary data (RFC 4648) |
| ByteArrayWrapper |
decodeFromUrlSafeStringToByteArray(String src) Decodes Base64 into binary data (RFC 4648: URL and Filename Safe Alphabet) (Uses - _ instead of + /) |
com.questetra.bpms.core.event.scripttask.HexWrapper
Code example
const file = q_file.get(0); const md5_hex = hex.encodeToString(digest.md5(file)); // Outputs MD5 hash in hexadecimal
| Type | Method (constructor) / Description |
|---|---|
| String |
encodeToString(ByteArrayWrapper bytes) Outputs in hexadecimal |
com.questetra.bpms.core.event.scripttask.RSAWrapper
Code example
const privateKeyPem = `-----BEGIN PRIVATE KEY----- (Base64 encoded private key) -----END PRIVATE KEY-----`; // Read private key const privateKey = rsa.readKeyFromPkcs8(privateKeyPem); // Signature const sign = rsa.signRsa256(privateKey, 'hogehoge'); // Base64 encode const signString = base64.encodeToString(sign);
| Type | Method (constructor) / Description |
|---|---|
| PrivateKeyWrapper |
readKeyFromPkcs8(String privateKeyPem) Reads the private key in KCS#8 format |
| ByteArrayWrapper |
signRsa256(PrivateKeyWrapper privateKey, String text) Signs with RSA-SHA256 |
com.questetra.bpms.core.event.scripttask.PrivateKeyWrapper
Private key object class
com.questetra.bpms.core.event.scripttask.HmacUtilsWrapper
Code example
const key = engine.findDataByVarName('q_HMAC_key');
const text = engine.findDataByVarName('q_HMAC_text');
const hash = hex.encodeToString(hmac.sha256(key, text));| Type | Method (constructor) / Description |
|---|---|
| ByteArrayWrapper |
sha256(String key, String text) Calculates the authentication code with HMAC-SHA256 |
com.questetra.bpms.core.event.scripttask.DigestUtilsWrapper
Code example
const file = q_file.get(0); const md5_hex = hex.encodeToString(digest.md5(file)); // Outputs MD5 hash in hexadecimal const sha256_base64 = base64.encodeToString(digest.sha256(file)); // Outputs SHA256 hash in Base64
| Type | Method (constructor) / Description |
|---|---|
| ByteArrayWrapper |
md5(ByteArrayWrapper bytes) Calculates the MD5 hash value |
| ByteArrayWrapper |
md5(QfileView qfile) Calculates the MD5 hash value |
| ByteArrayWrapper |
sha1(ByteArrayWrapper bytes) Calculates the SHA1 hash value |
| ByteArrayWrapper |
sha1(QfileView qfile) Calculates the SHA1 hash value |
| ByteArrayWrapper |
sha256(ByteArrayWrapper bytes) Calculates the SHA256 hash value |
| ByteArrayWrapper |
sha256(QfileView qfile) Calculates the SHA256 hash value |
| ByteArrayWrapper |
sha384(ByteArrayWrapper bytes) Calculates the SHA384 hash value |
| ByteArrayWrapper |
sha384(QfileView qfile) Calculates the SHA384 hash value |
| ByteArrayWrapper |
sha512(ByteArrayWrapper bytes) Calculates the SHA512 hash value |
| ByteArrayWrapper |
sha512(QfileView qfile) Calculates the SHA512 hash value |
com.questetra.bpms.core.event.scripttask.Joiner
Code example
const selects = engine.findDataByVarName("q_checkbox"); // Select-type (Checkbox)
let text = joiner.join(selects, ', ', select => `${select.value}:${select.display}`);| Type | Method (constructor) / Description |
|---|---|
| String |
join(Collection collection, String prefix, String suffix, String joiner, Function<Object, String> converter) Concatenates the collection by specifying the Prefix/Suffix/Joiner/Converter |
| String |
join(Collection collection, String prefix, String suffix, String joiner) Concatenates the collection by specifying the Prefix/Suffix/Joiner |
| String |
join(Collection collection, String prefix, String suffix, Function<Object, String> converter) Concatenates the collection by specifying the Prefix/Suffix/Converter |
| String |
join(Collection collection, String prefix, String suffix) Concatenates the collection by specifying the Prefix/Suffix |
| String |
join(Collection collection, String joiner, Function<Object, String> converter) Concatenates the collection by specifying the Joiner/Converter |
| String |
join(Collection collection, String joiner) Concatenates the collection by specifying the Joiner |
| String |
splitJoin(String lines, String prefix, String suffix, String joiner) Splits the multi-line string into individual lines and concatenates them by specifying the Prefix/Suffix/Joiner |
| String |
splitJoin(String lines, String prefix, String suffix) Splits the multi-line string into individual lines and reconnects them by specifying the Prefix/Suffix |
| String |
splitJoin(String lines, String joiner) Splits the multi-line string into individual lines and concatenates them by specifying the Joiner |
com.questetra.bpms.core.event.scripttask.StringEscapeUtilsWrapper
Code example
text = escaper.escapeHtml(text);
| Type | Method (constructor) / Description |
|---|---|
| String |
escapeEcmaScript(String input) Escapes for EcmaScript |
| String |
escapeJson(String input) Escapes for JSON |
| String |
escapeHtml(String input) Escapes for HTML |
| String |
escapeXml(String input) Escapes for XML |
| String |
escapeMarkdown(String input) Escapes for Markdown (Converts half-width symbols to HTML entities) |
com.questetra.bpms.core.event.scripttask.MarkdownUtilsWrapper
Code example
ss="language-auto"htmlText = markdown.toHtml(markdownText);
| Type | Method (constructor) / Description |
|---|---|
| String |
escape(String text) Escapes for Markdown (Converts half-width symbols to HTML entities) |
| String |
toHtml(String markdownText) Converts the Markdown text to HTML text |
com.questetra.bpms.core.event.scripttask.XPathWrapper
Code example
const xmltext = '<sales vendor="John">' + '<merchandise type="Orange" price="4" quantity="6"/>' + '<merchandise type="Apple" price="3" quantity="10"/>' + '<merchandise type="Peach" price="5" quantity="3"/>' + '</sales>'; const nodeList = xpath.findNodeList(xmltext, '/sales/merchandise');
| Type | Method (constructor) / Description |
|---|---|
| NodeWrapper |
findNode(NodeWrapper node, String xpathText) Returns a DOM Node matching XPath expression from the Node |
| NodeWrapper |
findNode(String xml, String xpathText) Returns a DOM Node matching the XPath expression from the XML |
| NodeListWrapper |
findNodeList(NodeWrapper node, String xpathText) Returns a list of DOM Nodes matching the XPath expression from the Node |
| NodeListWrapper |
findNodeList(String xml, String xpathText) Returns a list of DOM Nodes matching the XPath expression from the XML |
| String |
findNodeText(NodeWrapper node, String xpathText) Returns the DOM Node that matches the XPath expression from the Node and returns its text |
| String |
findNodeText(String xml, String xpathText) Returns the DOM Node matching the XPath expression from the XML and return its text |
com.questetra.bpms.core.event.scripttask.XPathWrapper.NodeWrapper
| Type | Method (constructor) / Description |
|---|---|
| String |
getNodeName() Returns the node name |
| String |
getNodeValue() Returns the node value |
| short |
getNodeType() Returns the node type |
| NodeWrapper |
getParentNode() Returns the parent node |
| NodeListWrapper |
getChildNodes() Returns a list of child nodes |
| NodeWrapper |
getFirstChild() Returns the first child node |
| NodeWrapper |
getLastChild() Returns the last child node |
| NodeWrapper |
getPreviousSibling() Returns the previous node |
| NodeWrapper |
getNextSibling() Returns the next node |
| boolean |
hasChildNodes() Determines if it has child nodes |
| String |
getNamespaceURI() Returns a namespace URI |
| String |
getPrefix() Returns a namespace prefix |
| String |
getLocalName() Returns the local part of the qualified name of a node |
| boolean |
hasAttributes() Determines if it has attributes |
| String |
getBaseURI() Returns the absolute base URI of a node |
| String |
getTextContent() Returns the text content of the specified node and descendants of the node |
com.questetra.bpms.core.event.scripttask.XPathWrapper.NodeListWrapper
| Type | Method (constructor) / Description |
|---|---|
| int |
getLength() Returns the length of the node list |
| NodeWrapper |
item(int N) Returns the Nth item |
com.questetra.bpms.core.event.scripttask.ByteArrayWrapper
| Type | Method (constructor) / Description |
|---|---|
| int |
getLength() Returns the length of a byte array |
com.questetra.bpms.core.event.scripttask.FeedServiceWrapper
Code example
feedService.begin() .setMessage( "Post message" ) .post();
| Type | Method (constructor) / Description |
|---|---|
| FeedMessageWrapper |
begin() Creates a post message |
| void |
createPublicChannel(String channelName) Creates a public channel |
| int |
getPostingLimit() Returns the maximum number of message posts |
com.questetra.bpms.core.event.scripttask.FeedServiceWrapper.FeedMessageWrapper
| Type | Method (constructor) / Description |
|---|---|
| FeedMessageWrapper |
setMessage(String message) Sets the message body (Limits: 8000 characters) Conflicts with setMarkdown() (the latter takes precedence) |
| FeedMessageWrapper |
setMarkdown(String message) Sets the message body (Limits: 8000 characters) Conflicts with setMarkdown() (the latter takes precedence)(Version 18.0 and later) |
| FeedMessageWrapper |
setChannel(String channelName) Specify a channel (From Ver. 17.0 onwards, an error will occur when posting without specifying a channel) (Specify the posting channel using either setChannel(String) or setShareQgroup(QgroupView)) |
| FeedMessageWrapper |
setShareQgroup(QgroupView qgroup) Sets a shared-scope Organization |
| FeedMessageWrapper |
setMessageId(Long messageId) Sets the ID of the message to which the comment will be posted If specified, post() will post a comment to that message (if not specified, a new message will be posted)The return value of post() is the comment IDSpecifying a non-existent message ID or a message ID that does not match the channel will result in an error (Version 18.0 and later) |
| FeedMessageWrapper |
attachFile(QfileView qfile) Attaches the file (Limits: 10 files per post, total 100MB ) |
| FeedMessageWrapper |
attachLink(String url) Attaches a hyperlink (Limits: 10 links per post, does not retrieve the title by accessing the Web site) |
| Long |
post() Posts the message |
com.questetra.bpms.core.event.scripttask.HttpClientWrapper
Code example
const httpLimit = httpClient.getRequestingLimit();
| Type | Method (constructor) / Description |
|---|---|
| HttpRequestWrapper |
begin() Creates an HTTP Request |
| AuthSettingWrapper |
findAuthSetting(String authSettingName, boolean sharedOrNot) Returns [HTTP Authorization Setting] object - sharedOrNot is true: Reffers to [Settings shared by all workflow apps]- sharedOrNot is false: Reffers to [Workflow app specific settings] |
| String |
getOAuth2Token(AuthSettingWrapper authSetting) Returns Token by referring to [HTTP Authorization Setting] - [OAuth2] [OAuth2 Client Credentials Grant Type]: Returns saved Access Token. If the Access Token has expired / has not been acquired, gets a new Access Token from the Authorization Server and returns the Token. - [Token Fixed Value]: Returns {Entered String} ("Fixed token value", "API key", etc) - [Basic Authentication] [OAuth2 JWT Bearer]: Error |
| int |
getRequestingLimit() Returns the maximum number of HTTP Requests |
com.questetra.bpms.core.event.scripttask.HttpClientWrapper.HttpRequestWrapper
| Type | Method (constructor) / Description |
|---|---|
| HttpRequestWrapper |
queryParam(String name, String value) Adds a text parameter to the query (on top of the URL encoding) |
| HttpRequestWrapper |
authSetting(AuthSettingWrapper authSetting) Adds an Authorization header by referring to [HTTP Authorization Setting]- [OAuth2] [OAuth2 Client Credentials Grant Type]: Authorization: Bearer {managed AccessToken}- [Token Fixed Value]: Authorization: Bearer {string you entered}- [Basic Authentication]: Authorization: Basic{base64 encoded USR:PASSWORD}
|
| HttpRequestWrapper |
authorization(String type, String credentials) Adds an Authorization header by specifying the type and credentials directly |
| HttpRequestWrapper |
googleOAuth2(QuserView quser, String serviceName) Adds an Authorization header by referring to the authentication settings for [Google Connectivity] by the specified UserserviceName: "Drive", "Calendar"
|
| HttpRequestWrapper |
basic(String userName, String password) Adds Basic Authentication to the header |
| HttpRequestWrapper |
bearer(String token) Adds Bearer Authentication to the header |
| HttpRequestWrapper |
header(String name, String value) Adds a custom header to the header (Custom HTTP headers that can be added [R2253]) |
| boolean |
containsHeader(String name) Determines if the specified header has already been set in the request |
| HttpRequestWrapper |
body() Sets the body part empty (without Content-Type) |
| HttpRequestWrapper |
body(QfileView qfile) Sets the file in the body |
| HttpRequestWrapper |
body(QfileView qfile, String contentType) Sets the file in the body by specifying Content-Type
|
| HttpRequestWrapper |
body(String content, String contentType) Sets the text in the body by specifying Content-Type
|
| HttpRequestWrapper |
body(ByteArrayWrapper content, String contentType) Sets the binary data in the body by specifying Content-Type
|
| HttpRequestWrapper |
formParam(String name, String value) Adds the text parameters to the body ( application/x-www-form-urlencoded) |
| HttpRequestWrapper |
multipart(String name, String value) Adds the text parameters to the body ( multipart/form-data) |
| HttpRequestWrapper |
multipart(String name, QfileView qfile) Adds the file data to the body ( multipart/form-data) |
| HttpRequestWrapper |
multipart(String name, String fileContent, String contentType, String fileName) Adds the file data to the body after converting text data to character code ( multipart/form-data) |
| HttpResponseWrapper |
get(String url) Sends a GET request |
| HttpResponseWrapper |
post(String url) Sends a POST request |
| HttpResponseWrapper |
patch(String url) Sends a PATCH request |
| HttpResponseWrapper |
put(String url) Sends a PUT request |
| HttpResponseWrapper |
delete(String url) Sends a DELETE request |
- A
Questetra-Pidheader (the value is a numeric Case ID) is always added when sending HTTP requests - For debugging Cases, a
Questetra-Debug: true" header is added- If a value is explicitly specified, such as
header("Questetra-Debug", "false"), it takes precedence
- If a value is explicitly specified, such as
- When an HTTP request is sent, the Questetra-Initiator header is automatically added (v18.0 and later)
- Information about the sending workflow app, case, node, etc., is stored in key=value format (separated by semicolons)
- Included keys: a (Access ID), m (App ID), p (Case ID), n (Node Number)
- Example values:
a=example; m=1078; p=131303; n=2
- Example values:
com.questetra.bpms.core.event.scripttask.HttpClientWrapper.HttpResponseWrapper
| Type | Method (constructor) / Description |
|---|---|
| int |
getStatusCode() Returns the status code of the HTTP response |
| ByteArrayWrapper |
getResponse() Returns HTTP responses as binary data |
| String |
getResponseAsString() Returns HTTP responses as a string |
| String |
getContentType() Returns the Content-type of the HTTP response |
| String |
getCharset() Returns the character code of the HTTP Response |
| List<String> |
getHeaderNames() Returns a list of HTTP response headers |
| List<String> |
getHeaderValues(String headerName) Returns a list of the values of specified headers in the HTTP response |
com.questetra.bpms.core.event.scripttask.AuthSettingWrapper
| Type | Method (constructor) / Description |
|---|---|
| String |
getName() Returns the [HTTP Authorization Setting] name |
| String |
getAuthorizationCodeRequestUrl() Returns the value set in the Authorization Endpoint URL of [HTTP Authorization Setting] (Error if the HTTP authentication setting does not have the corresponding setting item) |
| String |
getAccessTokenRequestUrl() Returns the value set in the Token Endpoint URL of [HTTP Authorization Setting] (Error if the HTTP authentication setting does not have the corresponding setting item) |
| String |
getScope() Returns the value set in the Scope of [HTTP Authorization Setting] (Error if the HTTP authentication setting does not have the corresponding setting item) |
| String |
getClientId() Returns the value set in the Client ID of [HTTP Authorization Setting] (Error if the HTTP authentication setting does not have the corresponding setting item) |
| String |
getClientSecret() Returns the value set in the Client Secret of [HTTP Authorization Setting] (Error if the HTTP authentication setting does not have the corresponding setting item) |
| String |
getToken() Returns the value of the Token in [HTTP Authorization Setting] (Only for Token Fixed Value. Error if the HTTP authentication setting does not have the corresponding setting item) |
| String |
getBasicUserName() Returns the value set in the User Name of [HTTP Authorization Setting] (Only for Basic Authorization. Error if the HTTP authentication setting does not have the corresponding setting item) |
| String |
getBasicPassword() Returns the value set in the Password of [HTTP Authorization Setting] (Only for Basic Authorization. Error if the HTTP authentication setting does not have the corresponding setting item) |
com.questetra.bpms.core.event.scripttask.EmailServiceWrapper
Code example
emailService.begin()
.addTo("yamada@example.com", "YAMADA")
.setSubject("Email subject")
.setBody( mail_body )
.send();| Type | Method (constructor) / Description |
|---|---|
| EmailMessageWrapper |
begin() Creates an email message |
| int |
getSendingLimit() Returns the maximum number of emails sent |
com.questetra.bpms.core.event.scripttask.EmailServiceWrapper.EmailMessageWrapper
| Type | Method (constructor) / Description |
|---|---|
| EmailMessageWrapper |
addTo(String emailAddress, String fullName) Adds the To address |
| EmailMessageWrapper |
addCc(String emailAddress, String fullName) Adds the Cc address |
| EmailMessageWrapper |
addBcc(String emailAddress, String fullName) Adds the Bcc address |
| EmailMessageWrapper |
setFrom(String emailAddress, String fullName) Sets the From address |
| EmailMessageWrapper |
setReplyTo(String emailAddress, String fullName) Sets the ReplyTo address |
| EmailMessageWrapper |
setSubject(String subject) Sets the email subject |
| EmailMessageWrapper |
setBody(String body) Sets the email body, same as setTextBody()
|
| EmailMessageWrapper |
setTextBody(String textBody) Sets the email body text |
| EmailMessageWrapper |
setHtmlBody(String htmlBody) Sets the email body in HTML |
| EmailMessageWrapper |
addAttachment(QfileView qfile) Adds the file as an attachment(up to 5MB) |
| EmailMessageWrapper |
addAttachment(String fileName, String contentType, String fileContent) Converts the text data using the character encoding and attaches the data as a file |
| void |
send() Sends the email |
-
Set either setTextBody ()orsetHtmlBody (). If both are missing it will result in an error. - If both
setTextBody()andsetHtmlBody()are set, it will be amultipart/alternativemail. - It is not possible to embed inline images in an HTML mail.
- In
addAttachment(), ifContent-Typecontains Java's owncharset,charsetis omitted- For example: text/plain; charset=x-UTF-16LE-BOM