Creación de ejemplo de criterios de navegación propios
Al crear cargas útiles de JSON para filtrar un plan de proceso convertido, puede resultarle útil ver ejemplos que utilizan sus propios datos. Puede crear un ejemplo que incluya ciertas combinaciones de los tipos criterios de navegación soportados o todas ellas.
Procedimiento para crear un ejemplo de criterios de navegación propios:
3. Limpie los criterios de navegación devueltos antes de utilizarlos como carga útil de JSON para un parámetro de entrada en el
servicio ConvertFromProcessPlanID:
◦ Elimine las claves siguientes del elemento raíz del filtro guardado:
{
"Centricity": "...",
"@odata.context": "...",
"ID": "...",
"LastModified": "...",
"Name": "...",
"SharedToAll": "..."
"CreatedOn": "..."
}
◦ Elimine todas las instancias de la clave siguiente:
{ "DisableRuleChecking": "..." }
|
La clave HideUnresolvedDependents no afecta a la conversión del plan de proceso, sea cual sea su configuración (verdadera o falsa). Los dependientes no resueltos no se procesan en la conversión. Esta clave se puede conservar u omitir en las cargas útiles de JSON.
|
Los criterios de navegación limpiados ya se pueden utilizar como carga útil de JSON para un parámetro de entrada en el
servicio ConvertFromProcessPlanID.
Ejemplo: Criterios de navegación en bruto
El ejemplo siguiente muestra los criterios de navegación en bruto devueltos para un filtro guardado en Windchill MPMLink. Este filtro se guardó en el conjunto de acciones Filtrar de la ficha Estructura para un plan de proceso. Incluye varios tipos de criterios de navegación. Debe limpiar este contenido para poder usarlo como carga útil de JSON del parámetro de entrada processPlanNavigationCriteria:
{
"ApplicableType": "PTC.MfgProcMgmt.ProcessPlan",
"ApplyToTopLevelObject": true,
"Centricity": false,
"ConfigSpecs": [{
"@odata.type": "#PTC.NavCriteria.WTPartBaselineConfigSpec",
"Baseline": "wt.vc.baseline.ManagedBaseline:284734"
},
{
"@odata.type": "#PTC.NavCriteria.WTPartStandardConfigSpec",
"WorkingIncluded": false,
"View": "Design",
"LifeCycleState": {
"Value": "RELEASED",
"Display": "Released"
},
"Variation1": {
"Value": "production",
"Display": "Production"
},
"Variation2": {
"Value": "002",
"Display": "002"
}
},
{
"@odata.type": "#PTC.NavCriteria.WTPartEffectivityUnitConfigSpec",
"EffectiveUnit": "1",
"EffectivityType": {
"Value": "MSN",
"Display": "MSN"
},
"EffectiveContext": "wt.part.WTPartMaster:245852",
"View": "Design",
"Variation1": {
"Value": "production",
"Display": "Production"
},
"Variation2": {
"Value": "001",
"Display": "001"
}
},
{
"@odata.type": "#PTC.NavCriteria.WTPartEffectivityDateConfigSpec",
"EffectiveDate": "2019-12-02T05:00:00Z",
"EffectiveContext": "wt.part.WTPartMaster:246691",
"View": "Design",
"Variation1": {
"Value": "production",
"Display": "Production"
},
"Variation2": {
"Value": "001",
"Display": "001"
}
}
],
"CreatedOn": "2019-11-15T19:52:32Z",
"Filters": [{},
{
"@odata.type": "#PTC.NavCriteria.OptionFilter",
"DisableRuleChecking": false,
"OverrideOptionSetRevision": "OR:com.ptc.windchill.option.model.OptionSet:294292",
"OptionFilterConfigSpecs": [{
"@odata.type": "#PTC.NavCriteria.OptionFilterConfigSpec",
"LifeCycleState": null,
"LatestActive": true,
"LifeCycleActive": false,
"EffActive": false,
"EffectiveDate": null
}],
"FilterMode": {
"InternalCode": 1,
"Name": "Standard"
},
"ChoiceValues": [{
"ID": "OR:com.ptc.windchill.option.model.Choice:246812",
"Name": "AUTOMATIC"
}]
}
],
"HideUnresolvedDependents": false,
"ID": "OR:wt.filter.NavigationCriteria:284749",
"LastModified": "2019-12-02T16:15:58Z",
"Name": "mega_dwu_filter",
"SharedToAll": false,
"UseDefaultForUnresolved": false
}
Ejemplo: Carga útil de JSON corregida
El código siguiente muestra el contenido limpiado del ejemplo anterior. Ya se puede usar como carga útil de JSON del parámetro de entrada
processPlanNavigationCriteria del
servicio ConvertFromProcessPlanID:
{
"ApplicableType": "PTC.MfgProcMgmt.ProcessPlan",
"ApplyToTopLevelObject": true,
"ConfigSpecs": [{
"@odata.type": "#PTC.NavCriteria.WTPartBaselineConfigSpec",
"Baseline": "wt.vc.baseline.ManagedBaseline:284734"
},
{
"@odata.type": "#PTC.NavCriteria.WTPartStandardConfigSpec",
"WorkingIncluded": false,
"View": "Design",
"LifeCycleState": {
"Value": "RELEASED",
"Display": "Released"
},
"Variation1": {
"Value": "production",
"Display": "Production"
},
"Variation2": {
"Value": "002",
"Display": "002"
}
},
{
"@odata.type": "#PTC.NavCriteria.WTPartEffectivityUnitConfigSpec",
"EffectiveUnit": "1",
"EffectivityType": {
"Value": "MSN",
"Display": "MSN"
},
"EffectiveContext": "wt.part.WTPartMaster:245852",
"View": "Design",
"Variation1": {
"Value": "production",
"Display": "Production"
},
"Variation2": {
"Value": "001",
"Display": "001"
}
},
{
"@odata.type": "#PTC.NavCriteria.WTPartEffectivityDateConfigSpec",
"EffectiveDate": "2019-12-02T05:00:00Z",
"EffectiveContext": "wt.part.WTPartMaster:246691",
"View": "Design",
"Variation1": {
"Value": "production",
"Display": "Production"
},
"Variation2": {
"Value": "001",
"Display": "001"
}
}
],
"Filters": [{},
{
"@odata.type": "#PTC.NavCriteria.OptionFilter",
"OverrideOptionSetRevision": "OR:com.ptc.windchill.option.model.OptionSet:294292",
"OptionFilterConfigSpecs": [{
"@odata.type": "#PTC.NavCriteria.OptionFilterConfigSpec",
"LifeCycleState": null,
"LatestActive": true,
"LifeCycleActive": false,
"EffActive": false,
"EffectiveDate": null
}],
"FilterMode": {
"InternalCode": 1,
"Name": "Standard"
},
"ChoiceValues": [{
"ID": "OR:com.ptc.windchill.option.model.Choice:246812",
"Name": "AUTOMATIC"
}]
}
],
"UseDefaultForUnresolved": false
}