UC: Edit Holon Type - evomimic/map-proto1 GitHub Wiki

Description: This abstract use case enables a Metaspace Steward to edit a Holon Type that has been staged for editing. The Holon Type could either be a new (i.e., not yet created Holon Type) or an already created Holon Type. The use case allows the steward to edit meta-properties, and add, edit or remove steward-defined properties. In the future, capabilities will be added that allow steward-defined actions to be added or removed from this Holon Type. At the conclusion of this use case the staged Holon Type will either be discarded or committed to persistent storage.

Actor: Metaspace Steward

Preconditions:

  • A Holon Type has been staged for editing, either by selecting an existing Holon Type and selecting it for edit, creating a new Holon Type, or cloning an existing Holon Type.

Post-conditions: The staged Holon Type will either have been discarded or committed to persistent storage.

Assumptions:

Main Flow

  1. This use case starts when included by its including use case.

  2. The system responds by presenting a Holon Type Node Visualizer that displays the various (meta-)properties of MAP Holon Type Descriptors in an editable representation. In this view, the Steward may enter/update values for the editable meta-properties (e.g., type_name, description). If the current state of Holon Type definition includes one or more steward-defined properties, they are displayed in the properties box with an indication (e.g., via a check box) as to whether they are currently selected or not. Additionally, the system offers the following actions:

    • Cancel the editing operation
    • Submit the Holon Type to create / update in the persistent store
    • Update meta-property Values (e.g., to set or change the Holon Type Name and Description).
    • Add Property -- consists of the following group of actions:
    • Edit Property -- this action is only available if the Holon Type has exactly one existing property selected.
    • Remove Selected Properties -- this action is only available if the Holon Type has one or more existing properties selected.
  3. The Steward (possibly) edits one or more of the meta-properties and selects one of the offered actions. If the Steward selects:

    • Cancel, the edits/create are abandoned, the Edit Holon Type visualizer is dismissed, and this use case ends.
    • Submit, follow Alternate Flow: Submit Holon Type.
    • Add Property, then follow Alternate Flow: Add Property.
    • Edit Property, follow Alternate Flow: Edit Steward-Defined Property
    • Remove Selected Properties, follow Alternate Flow: Remove Selected Properties.
  4. If the Steward:

    • supplies a value for a meta-property, the system stages that value and the Main Flow resumes at Step 3.
    • selects Add Property, follow Alternate Flow: Add Steward-Defined Property.
    • selects Remove Property, follow Alternate Flow: Remove Steward-Defined Property.
    • selects Edit Property, follow Alternate Flow: Edit Steward-Defined Property.
    • selects Cancel, follow Alternate Flow: Cancel Edit
    • selects Submit, the system requests that the staged Holon Type version be committed to the persistent store and responds to the Steward with the message that their request has been submitted.
  5. The Steward acknowledge the confirmation and this use case ends.

Alternate Flows

Alternate Flow: Add Property

This flow is followed when the Steward selects the Add Property action from within an Edit Holon Node Visualizer page or an Edit Composite Visualizer page.

  1. The system presents the Add Property Dialog that prompts the steward to provide the property_name and then indicate whether they want to define a new Property Type or select an existing Property Type for this property.
  2. The Steward enters a property_name and selects either Define New Property Type or Select Existing Property Type option.
  3. If the Steward selected the Define New Property Type, follow Alternate Flow: Define New Property Type
  4. The system presents a Composite Property Visualizer for the specified Property Type that prompts the Steward to provide values for the header and details properties for the selected BaseType.
  5. The Steward supplies values that characterize that Property and hits Submit.
  6. The system adds the property to the definition of the Holon Type or Composite Property Type being staged, and displays it in the Properties area of the Holon Type Visualizer.
  7. Resume the Main Flow at Step 2.

Alternate Flow: Remove Selected Properties

This flow is followed when the Steward selects one or more existing properties and then selects the Remove Selected Properties action.

Alternate Flow: Edit Steward-Defined Property Issue #9

TBD

Alternate Flow: Submit Holon Type

TBD

Alternate Flow: Edit Property

TBD

Wireframes

Edit Holon Type with Add Property Selection

image

Holon Type Descriptor Node Visualizer Issue #8

Initial Holon Type Descriptor Node Visualizer -- no support for steward-defined properties:

Issues

Implementation Notes

Commands

The following command object classes (structs that implement the UndoableCommand trait) need to offered via the WASM API for this use case:
* UpdateMetaPropertyValue -- allows update of a single meta-property of a HolonTypeDescriptor.
* Cancel
* Commit

Commands added by Issue #9:
* AddProperty
* UpdatePropertyAttributes
* RemoveProperty

Future Commands:
* AddAction * RemoveAction * UpdateAction