EKL Server: Functions for PPR Systems

This section describes the functions for Systems on the EKL server.

Note: The "item" objects described in this document were known as "process" objects in previous releases. The term process is still used in the names of functions, types, methods, attributes, and so on. In this case, process now means item.

This page discusses:

GetProcessScopesFromSystem

Returns the items that have a scope link with a given manufacturing system reference.

Signature

GetProcessScopesFromSystem(iSystemReference: DELLmiProductionSystemReference) : List

Arguments

Name Input / Output Required? Type Comment
iSystemReference In DELLmiProductionSystemReference

ReturnType

List

List of DELFmiFunctionReference

GetResourceScopes

Returns the resources that have a scope link with a given manufacturing system reference.

Signature

GetResourceScopes(iSystemReference : DELLmiProductionSystemReference) : List

Arguments

Name Input / Output Required? Type Comment
iSystemReference In DELLmiProductionSystemReference

ReturnType

List

List of VPMReference

GetExecutingResource

Returns the executing (“who”) resource occurrence that is linked to a given manufacturing system occurrence within a given resource scope.

Signature

GetExecutingResource(iResourceScope : VPMReference, iSystemOccurrence : List) : List

Arguments

Name Input / Output Required? Type Comment
iResourceScope In VPMReference
iSystemOccurrence In List List of PLMCoreInstance

ReturnType

List

List of VPMInstance

GetLocalizationResource

Returns the localization (“where”) resource occurrence that is linked to a given manufacturing system occurrence within a given resource scope.

Signature

GetLocalizationResource(iResourceScope : VPMReference, iSystemOccurrence : List) : List

Arguments

Name Input / Output Required? Type Comment
iResourceScope In VPMReference
iSystemOccurrence In List List of PLMCoreInstance

ReturnType

List

List of VPMInstance

GetUsedResources

Returns the used (“with”) resource occurrences that are linked to a given manufacturing system occurrence within a given resource scope.

Signature

GetUsedResources(iResourceScope : VPMReference, iSystemOccurrence : List) : List

Arguments

Name Input / Output Required? Type Comment
iResourceScope In VPMReference
iSystemOccurrence In List List of PLMCoreInstance

ReturnType

List

List of List of VPMInstance

GetImplementedObjectFromResource

Returns the manufacturing system occurrences that are linked to a given resource occurrence within a given manufacturing system scope.

Signature

GetImplementedObjectFromResource(iSystemScope : DELLmiProductionSystemReference, iResourceOccurrence : List) : List

Arguments

Name Input / Output Required? Type Comment
iSystemScope In DELLmiProductionSystemReference
iResourceOccurrence In List List of VPMInstance

ReturnType

List

List of PLMCoreInstance

Example of Use

The following EKL script uses functions to check the maturity change of a system.

Let process_scopes(List)
Let process_reference(DELFmiFunctionReference)
Let system_reference(DELLmiProductionSystemReference)
Let resource_scopes(List)
Let resource_reference(VPMReference)
Let resource_instance(VPMInstance)
Let scope_resource_reference(VPMReference)
Let system_or_op_instance(PLMCoreInstance)
Let ListChildren(List)
Let operation_occurrence(List)
Let localization_resource_occurrence(List)
Let executing_resource_occurrence(List)
Let used_resource_occurrences(List)
Let used_resource_occurrence(List)
Let ListSize(Integer)
Let index(Integer)

Validation = true

/*************************/
/* Verify process scopes */
/*************************/
process_scopes = GetProcessScopesFromSystem(ThisObject)
ListSize = process_scopes.Size()
Trace (1, "Process_Scopes_Size = " + ListSize)
if (ListSize <> 2)
{
   Validation = false
}
index=0
for index while index < ListSize
{
   index = index + 1
   process_reference = process_scopes.GetItem(index)
   Trace (1, "PLM_ExternalID=", process_reference.PLM_ExternalID)
}

/**************************/
/* Verify resource scopes */
/**************************/
resource_scopes = GetResourceScopes(ThisObject)
ListSize = resource_scopes.Size()
Trace (1, "Resource_Scopes_Size = " + ListSize)
if (ListSize <> 2)
{
   Validation = false
}
index=0
for index while index < ListSize
{
   index = index + 1
   resource_reference = resource_scopes.GetItem(index)
   Trace (1, "PLM_ExternalID=", resource_reference.PLM_ExternalID)
   if (resource_reference.PLM_ExternalID == "Organizational73") 
   {
      scope_resource_reference = resource_reference
   }
}

/***********************************/
/* Initialize Operation Occurrence */
/***********************************/
ListChildren = ThisObject.Children
ListSize = ListChildren.Size()
if (ListSize <> 1)
{
   Validation = false
}
system_or_op_instance = ListChildren.GetItem(1)
operation_occurrence.Append(system_or_op_instance)
ListChildren = system_or_op_instance.Children
ListSize = ListChildren.Size()
if (ListSize <> 1)
{
   Validation = false
}
system_reference = ListChildren.GetItem(1)
ListChildren = system_reference.Children
ListSize = ListChildren.Size()
if (ListSize <> 1)
{
Validation = false
}
system_or_op_instance = ListChildren.GetItem(1)
operation_occurrence.Append(system_or_op_instance)

/***************************/
/* Verify "where" resource */
/***************************/
localization_resource_occurrence = GetLocalizationResource(scope_resource_reference,operation_occurrence)
ListSize = localization_resource_occurrence.Size()
Trace (1, "Depth of Localization Resource Occurrence = " + ListSize)
if (ListSize <> 1)
{
   Validation = false
}
index=0
for index while index < ListSize
{
index = index + 1
   resource_instance = localization_resource_occurrence.GetItem(index)
   Trace (1, "PLM_ExternalID=",
   resource_instance.PLM_ExternalID)
}

/*************************/
/* Verify "who" resource */
/*************************/
executing_resource_occurrence =
GetExecutingResource(scope_resource_reference,operation_occurrence)
ListSize = executing_resource_occurrence.Size()
Trace (1, "Depth of Executing Resource Occurrence = " + ListSize)
if (ListSize <> 2)
{
   Validation = false
}
index=0
for index while index < ListSize
{
   index = index + 1
   resource_instance = executing_resource_occurrence.GetItem(index)
   Trace (1, "PLM_ExternalID=", resource_instance.PLM_ExternalID)
}

/***************************/
/* Verify "with" resources */
/***************************/
used_resource_occurrences = GetUsedResources(scope_resource_reference, operation_occurrence)
ListSize = used_resource_occurrences.Size()
Trace (1, "Number of Used Resources = " + ListSize)
if (ListSize <> 1)
{
   Validation = false
}
used_resource_occurrence = used_resource_occurrences.GetItem(1)
ListSize = used_resource_occurrence.Size()
Trace (1, "Depth of Used Resource Occurrence = " + ListSize)
if (ListSize <> 2)
{
   Validation = false
}
index=0
for index while index < ListSize
{
   index = index + 1
   resource_instance = used_resource_occurrence.GetItem(index)
   Trace (1, "PLM_ExternalID=", resource_instance.PLM_ExternalID)
}

/*************************************************/
/* Verify implemented object for "with" resource */
/*************************************************/
operation_occurrence = GetImplementedObjectFromResource(ThisObject, used_resource_occurrence)
ListSize = operation_occurrence.Size()
Trace (1, "with: Depth of Operation Occurrence = " + ListSize)
if (ListSize <> 2)
{
   Validation = false
}
index=0
for index while index < ListSize
{
   index = index + 1
   system_or_op_instance = operation_occurrence.GetItem(index)
   Trace (1, "PLM_ExternalID=", system_or_op_instance.PLM_ExternalID)
}

/************************************************/
/* Verify implemented object for "who" resource */
/************************************************/
operation_occurrence = GetImplementedObjectFromResource(ThisObject, executing_resource_occurrence)
ListSize = operation_occurrence.Size()
Trace (1, "who: Depth of Operation Occurrence = " + ListSize)
if (ListSize <> 2)
{
   Validation = false
}
index=0
for index while index < ListSize
{
   index = index + 1
   system_or_op_instance = operation_occurrence.GetItem(index)
   Trace (1, "PLM_ExternalID=", system_or_op_instance.PLM_ExternalID)
}

/*************************************************/
/* Verify implemented object for "where" resource */
/*************************************************/
operation_occurrence = GetImplementedObjectFromResource(ThisObject, localization_resource_occurrence)
ListSize = operation_occurrence.Size()
Trace (1, "where: Depth of Operation Occurrence = " + ListSize)
if (ListSize <> 2)
{
   Validation = false
}
index=0
for index while index < ListSize
{
   index = index + 1
   system_or_op_instance = operation_occurrence.GetItem(index)
   Trace (1, "PLM_ExternalID=", system_or_op_instance.PLM_ExternalID)
}