Specify Product Reroute and Default Action for Inconsistent Links Between Products and Items (DELPLMFProcessInstance_RerouteUserListCandidates_ID)

An opening ID is an entry point used to customize business logic. Specify Product Reroute and Default Action for Inconsistent Links Between Products and Items specifies the opening ID run when no candidate is found while repairing inconsistent links between products and items. It lets you specify on which product to reroute the link, and the default action to perform.

Note: For more information about customization by business rules, see Installation and Setup: Customize: Behavior: Data Setup: 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 DELPLMFProcessInstance_RerouteUserListCandidates_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 manufactured item.

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 manufactured item 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 product occurrences involving the list of manufactured item occurrences.

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

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

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

iListRelationStatus Read List of the status (integer) specifying why the relation is unsolved.

This value comes from an analysis of the model. The possible values are:

  • 0 means Solved: the relation is solved (this case should not occur when managing inconsistent links)
  • 1 means Broken_Session: the relation is unsolved because the target component has been deleted in the session
  • 2 means Broken_Remote: the relation is unsolved because the target component has been deleted in the remote persistency
  • 3 means NotOpened: the relation is unsolved because the target component is not opened in the session
  • 4 means Undefined: the relation is unsolved, and the reason why is unknown.

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

Output Objects

Ouput objects must be of the following types:

Output Object Read/Write Comments
oCandidateOccurrences Write List of the product 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.

Notes:
  • 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.
  • To define a strategy for the first and third components but not the second one: in the second position, set a candidate that is not a product. 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.
  • 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 are:

    • 1: Reroute on the manufactured item instance without evolving
    • 2: Evolve the manufactured item instance and reroute on the new evolve instance
    • 3: Remove the inconsistent link
    • 4: Ignore
    • 5: Replace by new revision and reroute
    • 7: Reroute according to user interaction
    • 8: Evolve instance and reroute according to user interaction
    • 9: Replace by new evolution and reroute
    • 10: Delete the instance of the object.

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)