Introduction
Creating a script at
Gargantua
database level
Scripts management screen - Available tabs
“Properties” tab
“Dependencies” tab
Displaying dependencies in list mode
What is the “Show dependencies for last deployed version” option for?
Displaying dependencies graphically
What is the “Show dependencies for all deployed versions” option for?
“Compilation” tab
How and when to use the
Gargantua
compiler
Structure of the messages list
Customizing the compiler’s behavior
“Summary” tab
“Log” tab
Form scripts
What is a form script?
Form script editor
Gargantua
API for forms
JavaScript functions for form elements
gfxGetAttrIdByLabel
gfxGetAttrLabelById
getElementValue
getElementKey
gfxVal
gfxEnable
gfxDisable
gfxVisible
getElementValueEx
setElementValue
setElementKey
getElementColor
setElementValueEx
setElementColor
setElementColor2
setElementTitle
setElementVisible
setElementVisible2
setElementEdit
setElementEdit2
setElementEnabled
isElementEnabled
disabledEditor
enabledEditor
form_getValues
form_getAttributeType
form_getAttributeTypeId
form_getPage
Miscellaneous JavaScript functions
form_getVersion
form_lang
form_getDisplayMode
form_enableGroup
form_setGroupVisible
form_expandSection
form_collapseSection
form_toggleSection
form_toggleAllSections
form_isSectionExpanded
form_addSectionIcon
form_toggleSectionIcon
form_removeSectionIcon
form_setSectionIconStyle
form_stickySection
form_sectionsToTabs
form_sectionGroupsToTabs
form_refresh
form_escapeHtml
form_refreshViewer
form_cleanupHtml
form_log
form_info
form_warn
form_error
form_waitstart
form_waitstop
form_formatDate
form_parseDate
form_formatUserName
form_hasDocuments
form_getDocuments
form_filterList
form_setDocTemplateOptions
JavaScript functions for customisizing the user interface
flashElement
form_displayButtonBar
form_displayDocumentListToggle
form_displayDocumentList
form_displaySelectorArea
form_displayDefaultButtonBar
form_setCustomButtonEnabled
form_displayCustomButtonBar
form_setCustomButtonVisible
form_setCustomButtonHidden
form_refreshDocumentList
form_displayDocumentListOnReturn
form_processAreaVerticalMaximize
form_processAreaResizeToggle
form_processAreaResize
form_displayAlert
form_closeAlert
form_displayDialog
form_displayCustomDialog
form_closeDialog
form_getDialogControl
form_getDialogElement
Parameters
Return value
Example
Button
Buttons
form_loadScript
form_loadScripts
form_loadStylesheet
form_loadStylesheets
JavaScript functions for triggering actions
resetElement
runServerScript
runServerScript2
form_runScript
form_apiRequest
form_scanDocuments
form_scanDocumentsExt
form_scanDocumentsExt2
form_scanDocumentsExt3
form_createDocument
form_addDocuments
form_addDocumentsDirect
form_certifyDocument
form_editDocument
form_viewDocument
form_signDocument
form_viewDocuments
form_downloadDocuments
form_editObject
form_save
form_saveImmediate
form_saveDraft
form_saveDraftImmediate
form_saveTaskImmediate
form_saveTask
form_cancelDraft
form_cancel
form_finish
form_startProcess
form_cancelTask
form_finishTask
form_executeSearch
form_escalateTask
doValidateForm
handler_onSwitchPage
form_switchForm
form_gotoTasks
form_invokePlugin
Advanced JavaScript functions
form_newControl
form_destroyControl
form_getControl
form_getElement
getElementKeyAndValue
setElementKeyAndValue
form_saveGlobalGrids
form_validateLatency
form_getValidateLatency
form_validateLatencyOffset
form_validateMode
form_getValidateMode
form_getValidationMessage
form_setSubmitOnEnter
Controls
General behavior
getValue
setValue
enable
disable
isEmpty
reset
isEnabled
hasError
Simple input fields
Simple string input
Numeric input
getNumber
setNumber
Date input
getDate
setDate
Time input
getTime
setTime
Date & time input
getTimestamp
setTimestamp
Time delay input
getDelay
setDelay
Email input
Lists
Autocomplete
Example
getKey
setKey
getKeyAndValue
setKeyAndValue
Simple list
Example
getKey
setKey
getKeyAndValue
setKeyAndValue
Multi-line list
Radio button list
Checkbox list
Grid
Definition and properties
Columns
Header
Toolbar
Functions
Events
Scripting the grid
Functions
addColumn
addToolbarButton
append
appendBefore
bindEvent
appendAfter
callFunction
editCell
editCheckbox
forceEditCell
getCell
getCellData
getCellValue
getColsCount
getColumnIndexById
getColumnProps
getRow
getRowIndex
getRowsCount
getSelectedRow
getToolbarButtonProps
getValue
hasError
groupRowsByColumn
isCellEditable
isCellReadOnly
isFunction
hasRowErrors
isCellInvalid
isEmpty
isReadOnly
layout
moveup
movedown
remove
loadData
removeAll
setCellColor
selectRow
setCellData
setCellEditable
setCellInvalid
setCellReadOnly
setCellValue
setColumnReadOnly
setReadOnly
setRowInvalid
setRowReadOnly
setValue
unbindEvent
updateEditCell
updateToolbarButton
updateToolbar
updateHeader
Other input fields
File input
Phone input
Form callback functions
fun_form_pre_load
fun_form_load
fun_form_post_load
fun_form_displayControls
fun_form_pre_loadattrs
fun_form_post_loadattrs
fun_form_pending_validate
fun_form_pre_validateattrs
fun_form_pre_validatereponse
fun_form_validate
fun_form_post_validatereponse
fun_form_get_validationmessage
fun_form_pre_submitform
fun_form_confirm_submitform
fun_form_post_submitform
fun_form_pre_sendtask
fun_form_get_editnative_options
fun_form_refresh_docs
fun_form_pre_escalatetask
fun_form_get_ocr_attributes
fun_form_set_ocr_attributes
fun_form_post_sign_documents
fun_form_reset
Services available through AJAX requests
ajax_syncServerRequestXML
/api/search/attr?request
/api/get?request
Information accessible from the form
Deprecated APIs
Process scripts
What is a process script?
Where and why to use scripts in a process
In an automatic task
In a sub-process start task
In a custom event
Summary table
Process script syntax and available classes
JavaScript reminders valid for process scripts
Declaring associative tables
Declaring a variable
Declaring a function
JavaScript and Java and
Gargantua
frameworks
Summary
Entry points (functions called by the workflow engine)
In sub-process start tasks: “onLaunch” function
In automatic task scripts: “execute” function
In custom events: “check” function
Managing process scripts
At
Gargantua
database level
At process level
Exercise: Writing your first script
Instructions
Correction
Hint: displaying the contextual choices list
Debugging
Including error files to the workflow
Using the debugger
Starting the server in command mode
Configuring the server to use the debugger
Adding a directive before the scripts
Exercise
Case study: updating the workflow using a “.properties” file
Problem
Corresponding script
Explanation
Important note on data types
Using the
Gargantua
API to update the process data (”majProcessus” method)
Using Java libraries
Installing a Java library
Exercise: Connecting to an external system using a Java API
Instructions
Preparation
Help: example of a connection through JDBC to MySQL in Java
Correction
Scripting API
Package com.siatel.scripting.framework
Classes
AdminScripting
AuditScripting
DesignScripting
FlowScripting
GedScripting
MailScripting
MiscScripting
PluginScripting
SearchScripting
SiatelFactory
StorageScripting
Package com.siatel.defs
Interfaces
Archive
Commented
Dated
DatedEx
Deletable
Deployable
DeployableEx
Described
Expirable
Flagged
Identified
Labeled
Lifecycled
Managed
Modified
Numbered
Owned
Packageable
Parsable
Presented
Prioritized
Privileged
Realized
RealizedEx
Referenced
Replicable
Sampled
Securable
Shared
Signable
Tagged
Timeboxed
TimeboxedEx
Timed
UUIDEnabled
Version
Versioned
Viewable
ViewableEx
Package com.siatel.domain
Interfaces
ArchiveComment
ArchiveDocument
ArchiveDocumentVersion
ArchiveFolder
ArchiveNote
Assignment
Attribute
Certificate
ClassificationElement
ClassificationTreeElement
Comment
Database
Dependency
DistributionListEntry
Document
DocumentVersion
ExpirableDownloadLink
ExtendedProperty
Folder
Form
Grid
Group
HierarchyCreator
InterventionReport
IsJob
Layouted
Lifecycle
Manager
ModelOCR
Note
ObjectExtendedProperty
Package
Planner
PlannerDay
Portal
Process
ProcessDefinition
ProcessDefinitionVersion
Resource
Role
Rule
Script
Storage
Task
Type
User
UserDelegation
View
ViewElement
ViewElementVersion
ViewVersion
Classes
AttributeModifier
AttributeProp
Attributes
Constants
FilterCriterion
Flag
Prefix
Siatel_0
Siatel_1
Siatel_1_1
Siatel_1_2
Siatel_1_3
Siatel_1_4
Siatel_2
Siatel_3
Tag
UniqueCriterion
ValueToken
Shortcut and helper functions
_id
_dbid
_obj
_g
_cached
_p, _plugin
_sleep
_log
_debug
_info
_warn
_error
_enter
_exit
_l
_i
_d
_s
_b
_list
_arrayList
_dto
_bomified
_debomified
_or
_and
_df
_now
Special functions
Misc.signRequest
Sign envelope
The cycleData object
Merge or overwrite sign envelope data
Sign envelope stages
Start stage
Sign stage
Publish stage
Broadcast stage
Documents
A complete example
Scripts pour les modules complémentaires
Scripting
Perform a keyword search
Administration
All audits
Automatic task
C:\siatel\Gargantua7server
Configuring the server to use the debugger
Correction
Installing a Java library
Starting the server in command mode
CSV Export
Compilation
Creating a script at
Gargantua
database level
How and when to use the
Gargantua
compiler
Scripts management screen - Available tabs
“Compilation” tab
Compile
Content
Creating a script at
Gargantua
database level
Scripts management screen - Available tabs
Create
Create a database
Create table
Custom event
Databases
Dependencies
Scripts management screen - Available tabs
“Dependencies” tab
Deploy
Deployment history
What is the “Show dependencies for all deployed versions” option for?
What is the “Show dependencies for last deployed version” option for?
“Properties” tab
Description
Display
Display dependencies graphically
End date
Enter
Form
Gargantua 7 Server
Correction
Installing a Java library
Starting the server in command mode
Go
Help
Log
Scripts management screen - Available tabs
“Log” tab
Log entries
Manage database scripts
Manage scripts
Modules
Month audits
Name
Preparation
“Properties” tab
New
Number of columns
Only Show error audits box
Operation
Options
Package
Properties
Creating a script at
Gargantua
database level
Scripts management screen - Available tabs
“Properties” tab
Reset
Save
Preparation
“Log” tab
Script editor
In a custom event
In an automatic task
In a sub-process start task
Scripts
At
Gargantua
database level
At process level
Correction
Creating a script at
Gargantua
database level
Server log
Show dependencies for all deployed versions
Show dependencies for last deployed version
Show login/logout events
Start another process
Start date
Summary
Scripts management screen - Available tabs
“Summary” tab
Type
User
Users
Week audits
Workflow
At
Gargantua
database level
Correction
Creating a script at
Gargantua
database level
Year audits
Open
Siatel
Contents
Index