Today if we want to share model information with someone (for example here in docs), we need to use screenshots from Architect.
Not only they take too much space, you cannot copy the information from there and when we change Architect UI, all the screenshots become obsolete.
It would be great to create a way how to represent those in Markdown and implement a Copy function in Architect, where the user would be able to quickly Copy/Paste the selected model element data for sharing over Discourse or other means like e-mail etc.
Maybe YAML?
Something like
DatabaseEntity:
Name: Priority
Caption: Priority
Info:
Id: 93be376a-d4cb-4339-ad70-c6d46371c00e
ItemType: DataEntity
PackageName: myapplication
RelativeFilePath: myapplication\DataEntity\myapplication\Priority.origm
SchemaItemType: Origam.Schema.EntityModel.TableMappingItem
SchemaItem:
Ancestors: IOrigamEntity2
Inheritable: false
Entity:
AuditingSecondReferenceKeyColumn: null
AuditingType: None
Mapping:
DatabaseObjectType: Table
GenerateDeploymentScript: true
MappedObjectName: Priority
Misc:
DescribingField: null
LocalizationRelation: null
I can also imagine the possibility to export whole tree structures. The amount of information could be overwhelming so it might also be handy to offer an option to select just some of the attributes and only export a limited set (e.g. only DatabaseObjectType and MappedObjectName, omitting Ancestors, Inheritable, etc.
Example of full BusinessPartnerEntity with just most important elements:
DatabaseEntity:
Name: BusinessPartner
Caption: "Business Partner"
Id: 457a4391-e94f-424c-89d0-dc3804121ce6
ItemType: DataEntity
SchemaItemType: Origam.Schema.EntityModel.TableMappingItem
Audit: All
ReadOnly: false
DatabaseObjectType: Table
GenerateDeploymentScript: true
MappedObjectName: BusinessPartner
Ancestors:
- "Root/DataEntity/Dimensions/IDimensionsReference.origam#IDimensionsReference"
- "Root/DataEntity/__Origam General Interfaces/IOrigamEntity.origam#IOrigamEntity"
Indexes:
- Name: ix_ReferenceCode
Unique: false
Fields:
- name: ReferenceCode
sort: Ascending
- Name: ix_UniqueUserEmail
Unique: true
Fields:
- name: UserEmail
sort: Ascending
Columns:
- Name: UserName
Label: "Login Name"
Type: String
Length: 255
Nullable: true
MappedColumn: UserName
XmlMapping: Element
- Name: FirstName
Label: "First Name"
Type: String
Length: 255
Nullable: true
MappedColumn: FirstName
XmlMapping: Element
- Name: Name
Label: "Name"
Type: String
Length: 255
Nullable: false
MappedColumn: Name
OnCopyAction: PrependCopyText
XmlMapping: Element
- Name: ParentId
Label: "Parent Business Partner"
Type: UniqueIdentifier
Nullable: true
MappedColumn: ParentId
ForeignKey:
Entity: "Root/DataEntity/Partner Management/BusinessPartner.origam#BusinessPartner"
Field: "Root/DataEntity/__Origam General Interfaces/IOrigamEntity.origam#IOrigamEntity/Id"
DefaultLookup: "Root/DataLookup/__system/LookupBusinessPartner.origam#LookupBusinessPartner"
XmlMapping: Element
- Name: UserEmail
Label: "Login E-mail"
Type: String
Length: 255
Nullable: true
MappedColumn: UserEmail
XmlMapping: Attribute
- Name: ReferenceCode
Label: "Shortcut"
Type: String
Length: 255
Nullable: true
MappedColumn: ReferenceCode
XmlMapping: Element
- Name: AvatarFilename
Label: "Avatar"
Type: String
Length: 200
Nullable: true
MappedColumn: AvatarFilename
XmlMapping: Attribute
- Name: AvatarFile
Type: Blob
Nullable: true
MappedColumn: AvatarFile
XmlMapping: Attribute
- Name: refLanguageId
Label: "Language"
Type: UniqueIdentifier
Nullable: true
MappedColumn: refLanguageId
ForeignKey:
Entity: "Root/DataEntity/__system/Language.origam#Language"
Field: "Root/DataEntity/__Origam General Interfaces/IOrigamEntity2.origam#IOrigamEntity2/Id"
DefaultLookup: "Root/DataLookup/__system/Language.origam#Language"
XmlMapping: Attribute
ComputedColumns:
- Name: FirstNameAndName
Label: "Full Name"
Type: String
Length: 600
Nullable: true
XmlMapping: Attribute
Expression:
Function: Concat
Strings:
- If:
Condition: FirstNameEmpty
Then: "_empty_string"
Else:
Concat:
- ref: FirstName
- Space: 1
- ref: Name
Filters:
- Name: GetUserProfile
Expression: Equal(UserName, parUserName)
- Name: GetUsers
Expression: NotEqual(UserName, null)
- Name: GetUsersWithoutME
Expression: NotEqual(Id, parCurrentUserId)
- Name: GetByParentId
Expression: Equal(ParentId, parParentId)
- Name: GetNonUsers
Expression: Not(GetUsers)
- Name: FirstNameEmpty
Expression:
Or:
- Equal(FirstName, null)
- Equal(FirstName, _empty_string)
- Name: GetByReferenceCode
Expression: Equal(ReferenceCode, parReferenceCode)
Relations:
- Name: Resource
ParentChild: true
RelatedEntity: "Root/DataEntity/Resource Management/Resource.origam#Resource"
ColumnPairs:
- BaseField: "IOrigamEntity.Id"
RelatedField: "Resource.refBusinessPartnerId"
Parameters:
- Name: parUserName
Type: String
Nullable: false
Length: 255
- Name: parReferenceCode
Type: String
Nullable: true
Length: 255
- Name: parParentId
Type: UniqueIdentifier
Nullable: true