Optiva Scripting for Workflows, Copy Methods, Equations
Optiva scripting is a programming language that is used in the Optiva software suite. These scripts enable each company to customize how:
- Parameters and formulas are calculated
- New objects are created
- Attributes are applied
- Workflows are carried out
This example shows the scripting language that is used in Optiva Workflow Management. This workflow first checks the status of a formula. If the status of the formula is 400, it is ready for approval. Then, the formula is approved and security is applied so that users cannot edit it.
' Get formula status
Dim oStatus As Object = ObjProperty("STATUSIND.STATUS")
' If status is ready for approval, lock down formula.
if (oStatus = 400) then
MessageList("This formula has been approved.")
SetSecurity("","",3,3,3)
return 111
' If not, cancel workflow.
else
MessageList("Formula is not ready for approval. Workflow is cancelled.")
return 9111
end if
You can use scripts to decide what constitutes an approved formula. In this case, an approved formula has a status value of 400. You decide what an approved formula requires; in this case, a formula cannot be edited.
Optiva Scripting integrates with Visual Basic .NET, which give you ability to extend the scripting functions accordingly to meet your business needs.
In this example, the Visual Basic .NET concatenation and ctype
functionality are incorporated into the Optiva scripting (ObjProperty
). The script includes the sender's full name instead of a user
code.
dim ofirst, olast as object
dim sname as string
ofirst = ObjProperty("FIRSTNAME","USER",Context._STARTUSER)
olast = ObjProperty("LASTNAME","USER",Context._STARTUSER)
sname = ctype(ofirst, string) & ctype (olast, string)