getRouteContents()This method returns the contents connected to the route in Precommit.SignaturegetRouteContents(String, Boolean) Arguments
ReturnTypeList Example
let CurrentState(String)
let ListChildren(List)
let i(Integer)
// This variable is required to differentiate between restarted route and completed route
let RouteStatusVariable(String)
// Declare all the variables for different types
let DocumentVariable(Document)
CurrentState = ThisObject.current
RouteStatusVariable = ThisObject.GetAttributeString("Route Status”)
Validation = true
//Executes only if route gets complete manually through tasks
if (CurrentState == "Complete" and RouteStatusVariable == "Finished") {
// Get all the contents attached to the route of the type Document and it includes Ad-Hoc Contents
ListChildren = ThisObject.getRouteContents("Document", true)
if (ListChildren.Size() > 0) {
i=1
//Iterate through the list and check if the document is promoted to Release state, and only then set Change Required attribute to true
for i while i<=ListChildren.Size(){
DocumentVariable = ListChildren.GetItem(i)
if(DocumentVariable.current == "RELEASED"){
SetChangeControlledStatus(DocumentVariable,true)
}
}
}
Validation = true
}
Example
let CurrentState(String)
let ListChildren(List)
let i(Integer)
let DocumentVariable(Document)
let RouteStatusVariable (String)
CurrentState = ThisObject.current
RouteStatusVariable = ThisObject.GetAttributeString("Route Status")
Validation = true
if (CurrentState == "Complete" and RouteStatusVariable == "Finished") {
ListChildren = ThisObject.getRouteContents("",true)
if (ListChildren.Size() > 0) {
i=1
for i while i<=ListChildren.Size(){
SetChangeControlledStatus(ListChildren.GetItem(i),true)
}
}
Validation = true
}
Notes:
| |||||||||||||||||||||||||||