CheckOut
You can use this function for Optiva Workflows.
Purpose
This function unlocks an Optiva object.
Syntax
int CheckOut(string objSymbol, string objKey)
Return Value
The function displays a value one (1) if checked out and zero (0) if the object is not checked.
Arguments
| Part | Description |
|---|---|
objSymbol |
The object type or current object type of the data.
Note: Use empty quotation marks to indicate the current symbol of the workflow.
|
objkey |
The object key or current object type of the data.
Note: Use empty quotation marks to indicate the current object of the workflow.
|
Description
Checkout locks an object. It returns a value of 0 or 1.
| Value | |
|---|---|
| 0 | Did not check out the object. May already be checked out. |
| 1 | Checked out the object. |
If the object is already checked out and the workflow returns 0, you can use IsLockedBy to verify by whom.
Examples
This example checks out the current object from which the Workflow was launched
Dim rc As Integer = CheckOut("","")
If rc = 1 Then
MessageList(_OBJECTSYMBOL & " " & _OBJECTKEY & " checked out.")
Else
MessageList(_OBJECTSYMBOL & " " & _OBJECTKEY & " not checked out.")
End if
This example checks out a specific object
Dim rc As Integer = CheckOut("FORMULA","FS-0010\0001")
If rc = 1 Then
MessageList("Formula FS-0010\0001 has been checked out.")
Else
MessageList("Formula FS-0010\0001 could not be checked out.")
End if
Locks the formula FS-0010\0001
CheckOut("FORMULA","FS-0010\0001");
Locks the objectkey upon which the workflow is launched.
CheckOut();