General InformationThe table below provides you with information related to the definition of the opening ID.
Input ObjectsInput objects must be of the following types:
Note:
iListOccurrence, iListFirstScopeOccurrence,
iListCandidateAlias, and
iListRelationStatus match.Output ObjectsOuput objects must be of the following types:
Note:
An output list must not contain a
NULL
component.Sample
Let ProcessAncestorOccurrence(FProcessOccurrence)
Let ProcessAncestorScope(ProductOccurrence)
Let ListProcessOccurrences(List)
Let ListScopeOccurrence(List)
Let ListCandidateOccurrences(List)
Let ListCandidateAlias(List)
Let ListChildOccurrence(List)
Let CandidateAlias(String)
Let ScopeOccurrence(ProductOccurrence)
Let ChildOccurrence(ProductOccurrence)
Let Index(Integer)
Let Size(Integer)
Let SizePcsOcc(Integer)
Let SizeChild(Integer)
Let Strategies(List)
Let rerouteStrategy(Integer)
// Read inputs
//object for which BL is called
set ProcessAncestorOccurrence = ThisObject
//Upper scope of object for which BL is called
set ProcessAncestorScope=Parameters->GetAttributeObject("iFirstScopeAncestor")
//List Occurrence
set ListProcessOccurrences=Parameters->GetAttributeObject("iListOccurrence")
set SizePcsOcc = ListProcessOccurrences.Size()
//List Scope Occurrence
set ListScopeOccurrence = Parameters->GetAttributeObject("iListFirstScopeOccurrence")
//ListCandidateAlias
set ListCandidateAlias = Parameters->GetAttributeObject("iListCandidateAlias")
//we get the first scope as canddiate for 1st link
set ScopeOccurrence = ListScopeOccurrence->GetItem(1)
set ListChildOccurrence = ScopeOccurrence.Children
set SizeChild = ListChildOccurrence.Size()
if (SizeChild > 3)
{
set ChildOccurrence = ListChildOccurrence.GetItem(1)
ListCandidateOccurrences->SetItem(ChildOccurrence,1)
//Split
rerouteStrategy = 2
Strategies->SetItem(rerouteStrategy,1)
set ChildOccurrence = ListChildOccurrence.GetItem(2)
ListCandidateOccurrences->SetItem(ChildOccurrence,2)
//Split
rerouteStrategy = 2
Strategies->SetItem(rerouteStrategy,2)
set ChildOccurrence = ListChildOccurrence.GetItem(3)
ListCandidateOccurrences->SetItem(ChildOccurrence,3)
//Reroute Only
rerouteStrategy = 1
Strategies->SetItem(rerouteStrategy,3)
set ChildOccurrence = ListChildOccurrence.GetItem(4)
ListCandidateOccurrences->SetItem(ChildOccurrence,4)
//Split
rerouteStrategy = 2
Strategies->SetItem(rerouteStrategy,4)
}
//for the rest of list we do not set any candidate
//nor any strategy
set Index=5
for Index while Index <= SizePcsOcc
{
ListCandidateOccurrences->SetItem(CandidateAlias,Index)
//unset strategy
rerouteStrategy = -1
Strategies->SetItem(rerouteStrategy,Index)
}
// .....................
// Set output
Parameters.SetAttributeObject ("oCandidateOccurrences",ListCandidateOccurrences)
Parameters.SetAttributeObject ("oListStrategies",Strategies)
| ||||||||||||||||||||||||||||||||||||||||