Manage Inconsistent Links Between Operations (DELPLMOperationOperation_MilWholeListInconsistent_ID)

An opening ID is an entry point used to customize business logic. Manage Inconsistent Links Between Operations automatically reconnects links between operations. This Business Logic (BL) is able to identify that a content is an evolution of another one. By default, it reroutes to the evolution one. For every inconsistent link, you can define: an Action to perform by default (sometimes called Strategy), a Candiate to reroute and a lock.

Note: For more information about customization by business rules, see Customization by Business Rules.

This page discusses:

General Information

The table below provides you with information related to the definition of the opening ID.

PLM Opening ID DELPLMOperationOperation_MilWholeListInconsistent_ID
Customization intent Execution
Execution context Client

Input Objects

Input objects must be of the following types:

Input Object Read/Write Comments
ThisObject Occurrence of the selected operation or system.

This object is a parent of instances involved by an inconsistent link, but it may not have any inconsistent link by itself.

iListOccurrence Read List of the operation occurrences holding the inconsistent link.
Notes:
  • The order of this list is important: it is used to map the list of outputs. For example, the second component of the output list is identified with the second component of the input list.
  • It contains true components. No component of this list can be NULL.
iListFirstScopeOccurrence Read List of the first scope operation occurrences involving the list of operation occurrences.

For example: the second component of this list is the first scope operation of the second component of iListOccurrence.

iListCandidateAlias Read List of the operation alias (string) stored in the link, i.e., the old implemented operations. This alias contains the retrieved path.

The second component of this list is the alias regarding the second component of iListOccurrence.

Note: iListOccurrence, iListFirstScopeOccurrence, iListCandidateAlias, and iListNumberCandidateFound match.

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.

Note:
  • This list can be empty if you are only using the business rule to define strategies. To define candidate resources, the output list has to match iListOccurrence.
  • If you want to define candidate occurrences, the output list must be the same size as iListOccurrence.
  • To define a strategy for the first and third components but not for the second one: in the second position, set a candidate that is not an operation. For example:
    Let NullCandidate(String)
    ListCandidateOccurrences->SetItem(CandidateAlias,2/*index in list*/)
    // Set output
    Parameters.SetAttributeObject ("oCandidateOccurrences",ListCandidateOccurrences)

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)