So now that I’ve extolled the virtues of ExecuteCustomMethod, it’s time for me to gripe. Turns out ExecuteCustomMethod is only available for sub-classes of ExtensibleObject. Those aren’t the only classes that can have a custom method, it’s just that classes that aren’t derived from extensible method can’t have their custom methods executed from another object or script.
Now, most of the objects you work with on a regular basis are going to support execute custom method (most of the stuff you’d put on a diagram is covered), but the diagram itself isn’t, which is where I got caught. So, if you follow my advice and start using ExecuteCustomMethod be aware of those classes that can’t expose a custom method before you write a bunch of code that won’t work.
I’ve sliced the classes that WON’T work from the help file in case you’re interested.
-
- IdentifiedObject
+-ShortcutBase +-TargetModel +-BaseReplication +-BaseDiagram | \-PackageDiagram | +-BaseDialogView | | +-BaseExtensibleDialogView | | | \-DependencyMatrix | | +-RequirementsDocumentView | | +-TraceabilityMatrixView | | \-UserAllocationMatrixView | +-BusinessProcessDiagram | +-ProcessHierarchyDiagram | +-ProcessServiceDiagram | +-BaseLogicalConceptualDiagram | | +-ConceptualDiagram | | \-LogicalDiagram | +-InformationLiquidityDiagram | +-TransformationDiagram | +-TransformationControlFlowDiagram | +-FreeDiagram | +-ProjectDiagram | +-FrameworkMatrixDiagram | +-EnterpriseArchitectureDiagram | | +-ApplicationArchitectureDiagram | | +-CityPlanningDiagram | | +-OrganizationChartDiagram | | +-TechnologyInfrastructureDiagram | | +-ProcessMapDiagram | | +-BusinessCommunicationDiagram | | \-ServiceOrientedDiagram | +-ImpactAnalysisDiagram | +-MeriseTreatmentDiagram | | +-FlowDiagram | | +-ConceptualDiagram | | \-OrganizationalDiagram | +-BaseUMLDiagram | | +-ClassDiagram | | +-UMLPackageDiagram | | +-UseCaseDiagram | | +-SequenceDiagram | | +-ComponentDiagram | | +-ActivityDiagram | | +-StatechartDiagram | | +-DeploymentDiagram | | +-CommunicationDiagram | | +-InteractionOverviewDiagram | | +-ObjectDiagram | | \-CompositeDiagram | +-PhysicalDiagram | +-MultidimensionalDiagram | \-XMLDiagram +-ReportBaseClass | \-ReportParagraphContainer | \-BaseReport | \-BaseModelReport | +-IntraModelReport | \-MultiModelReport | +-BaseLinkObject | | +-ExtendedDependency | | +-ConditionalLink | | | +-MessageFlow | | | | +-Flow | | | | \-ResourceFlow | | | +-ControlFlow | | | \-FlowLink | | | +-Transition | | | \-ActivityFlow | | +-ReferenceJoin | | +-ViewReferenceJoin | | +-CubeDimensionAssociation | | +-BaseLogicalInheritanceLink | | | +-InheritanceLink | | | \-InheritanceLink | | +-AssociationLink | | +-RelationshipJoin | | +-DependencyLink | | +-BaseOperationTriggering | | | +-OperationTriggering | | | \-PhaseTriggering | | +-EventEmission | | | +-OperationEmission | | | \-PhaseEmission | | +-InnerLink | | +-InstanceLink | | \-AssociationClassLink | +-CompositionLink | | +-Permission | | +-FaultMessage | | +-DataAccess | | +-BaseDataMapping | | | +-EmissionDataMapping | | | \-ReceptionDataMapping | | +-RoleAssociation | | \-TraceabilityLink | +-BaseStructuralFeatureMapping | | +-DefaultStructuralFeatureMapping | | +-ExternalColumnMapping | | +-StructuralFeatureMapping | | | +-ColumnMapping | | | +-AttributeMapping | | | \-MeasureMapping | | +-BaseAttributeMapping | | | +-EntityAttributeMapping | | | +-AssociationAttributeMapping | | | \-InheritanceAttributeMapping | | +-ExternalBaseAttributeMapping | | | +-ExternalEntityAttributeMapping | | | +-ExternalAssociationAttributeMapping | | | \-ExternalInheritanceAttributeMapping | | +-ClassAttributeMapping | | +-AttributeMapping | | +-ColumnMapping | | +-AttributeMapping | | +-TableColumnMapping | | +-ClassAttributeMapping | | \-ExternalAttributeMapping | +-BaseMappingBehavioralFeatureMapping | | +-DefaultBehavioralFeatureMapping | | \-OperationMapping | +-Artifact | +-ListReportResultSet | +-BaseImpactAnalysisObject | | \-ImpactAnalysisObject | +-IndexColumn | +-EventScript | +-ImpactAnalysisCategory | +-DataAccess | +-Annotation | +-BaseInteractionFragment | | +-InteractionReference | | \-InteractionFragment | +-InteractionActivity | +-UserAllocation | \-Component | +-AnnotatedComponent | | +-AnyAttribute | | +-AttributeBase | | | +-Attribute | | | \-AttributeGroup | | +-Content | | | +-ComplexContent | | | \-SimpleContent | | +-Derivation | | | +-Extension | | | +-Restriction | | | +-SimpleTypeList | | | \-SimpleTypeUnion | | +-External | | | +-Import | | | +-Include | | | \-Redefine | | +-Facet | | | +-EnumerationFacet | | | +-MaxExclusiveFacet | | | +-MaxInclusiveFacet | | | +-MinExclusiveFacet | | | +-MinInclusiveFacet | | | +-NumericFacet | | | | +-FractionDigitsFacet | | | | +-LengthFacet | | | | +-MaxLengthFacet | | | | +-MinLengthFacet | | | | \-TotalDigitFacet | | | +-PatternFacet | | | \-WhitespaceFacet | | +-Field | | +-IdentityConstraint | | | +-Key | | | +-KeyRef | | | \-Unique | | +-Notation | | +-Particle | | | +-Group | | | +-Any | | | +-Element | | | \-GroupParticle | | +-Selector | | \-Type | | +-ComplexType | | \-SimpleType | +-Annotation | \-AnnotationItem | +-AppInfo | \-Documentation +-ExtendedBaseCollection | +-ExtendedCollection | \-ExtendedComposition +-GenerationTargetDefinition | +-ReportLanguage | +-ExtendedModelDefinition | +-UserProfile | +-DBMS | +-ProcessLanguage | +-AnalysisRule | +-ObjectLanguage | \-SchemaLanguage +-ObjectSelection +-PersistentSelectionManager +-PersistentSelection +-BaseTransformation | +-MDATransformation | \-Transformation | +-Partitioning | | +-HorizontalPartitioning | | \-VerticalPartitioning | \-TableCollapsing +-TransformationSource +-TransformationTarget | +-TargetTable | \-Partition +-XmlNamespaceBase | +-Namespace | +-XmlNamespace | \-XmlNamespace +-ArtifactFolder +-Settings +-BaseAttribute | +-InheritanceAttribute | +-AssociationAttribute | \-EntityAttribute +-DataStructureSortedColumn +-DataStructureJoin +-ImpactAnalysisImpactedModel +-AttributeValue +-TypeParameterValue \-FlowMappingParameter
If you DIM a variable at the top of the Global Script, it becomes a global variable. I added a Getter method on one design object and a setter method on a different design object. Both worked appropriately.