Output Objects
Note:
- Output lists must not contain a
NULL component
- Output lists must have the same size as the input lists
- Output lists must keep the same order as the input lists
- Output lists can be defined independently — one, two, or three as
needed. There is no requirement to define all three.
Ouput objects must be of the following types:
| Output Object |
Read/Write |
Comments |
oCandidateOccurrences |
Write |
List of the operation occurrences for which
the link has to be rerouted. There is a mapping between this
list and iListOccurrence. The second
component of this list is the candidate for the second
occurrence of iListOccurrence.
|
oListStrategies |
Write |
List of the strategies (default action to
perform) specified for the list of inconsistent links. There
is a mapping between this list and
iListOccurrence. The second component
of this list is the strategy for the second occurrence of
iListOccurrence. Notes:
- This list can be empty if you are only using the
business rule to define strategies. To define
candidate occurrences, the output list has to match
iListOccurrence.
- The Business Logic (BL) is called even if a
candidate has been found. This list may be used to
define different candidates.
- To define a strategy for the first and third
components but not for the second one, set an
integer outside the scope of
strategies:
Let rerouteStrategy(Integer)
Let Strategies(List)
(…)
rerouteStrategy = -1
Strategies->SetItem(rerouteStrategy,2/*index in list*/)
Parameters.SetAttributeObject ("oListStrategies",Strategies)
The
possible values (integer) are:
1: Reroute on the operation
instance without evolving
2: Evolve the operation
instance and reroute on the new evolve
instance
3: Remove the inconsistent
link
4: Ignore
5: Replace by new revision
and reroute
9: Replace by new evolution
and reroute
10: Delete the instance of
the operation
12:
Evolve the instance and remove the link.
|
oListLock |
Write |
List of boolean. It informs you if you can
modify the default strategy. The possible values are:
true: The strategy is locked
false: The stragegy can be
modified. Notes:
- Its size can be
0.
- Its size must be the same size as the list
given as input parameter for
iListOccurrence.
- Each link has to know its lock parameter.
For example: Let Lock(List)
Lock->SetItem(true,1) The first inconsistent link
is locked.set Index=2
for Index while Index <= Size0p0cc
{
Lock->SetItem(false,Index)
}You can modify the strategy for all other
inconsistent links.
|
Sample
<Scripts>
<Script OpeningID="DELPLMOperationOperation_MilWholeListInconsistent_ID" Type="ProdSystemOccurrence" ScriptName="DELPLMOperationOperation_MilWholeListInconsistent" />
</Scripts>
// Declaration of the variable
// Read inputs
//object for which BL is called
set OperationAncestorOccurrence = ThisObject
//Upper scope of object for which BL is called
set OperationAncestorScope=Parameters->GetAttributeObject("iFirstScopeAncestor")
//List Occurrence
set ListOperationOccurrences=Parameters->GetAttributeObject("iListOccurrence")
set SizeOpOcc = ListOperationOccurrences.Size()
//List Scope Occurrence
set ListScopeOccurrence = Parameters->GetAttributeObject("iListFirstScopeOccurrence")
//ListCandidateAlias
set ListCandidateAlias = Parameters->GetAttributeObject("iListCandidateAlias")
//ListeCandodateFound
set ListNbCandidate = Parameters->GetAttributeObject("iListNumberCandidateFound")
// Compute the outputs
// Set ouputs
Parameters.SetAttributeObject ("oCandidateOccurrences",ListCandidateOccurrences)
Parameters.SetAttributeObject ("oListStrategies",Strategies)
Parameters.SetAttributeObject ("oListLock",Lock)