Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

8 watching

Forks

Repository files navigation

Pistar-PGOM

Plugins in Goal Oriented Models.

Plugin-Driven Approach to Selection and Execution of Systems That Use Goal-Oriented Modeling

Pistar is an open-source goal modelling tool. Its key distinguishing characteristics are:

  • it runs entirely on the browser, thus no installation needed
  • high visual fidelity (we want your diagrams to be pretty, even when printed)
  • supports the iStar 2.0 standard

Pistar Model Factory uses the Pistar modeling tool and combines objective modeling with software product line techniques.

Enviromment Configuration File

The environment configuration file is a json file that has fundamental attributes to ensure that different functionalities can be activated from the model generated by Pistar.

The configuration file structure is constructed by the following attributes: environment, buttons and properties.

   {
      "enviromment": String,
      "buttons": Array<Buttons.class>
      "properties": Array<Properties.class>
   }

Enviromment Classes

  InputFile = {
     "type": InputFileTypeEnum.class,
     "extension": InputFileExtensionEnum.class,
     "requestAttributeLabel": String,
     "label": String
  }


 Service = {
     "method":  String,
     "url":  String,
     "resultNameFile":  String,
     "paramType": ParamTypeEnum.class,
     "request": Object.class,
     "inputs": Array<InputFile.class>
  }

  ParamTypeEnum = {
     BODY_PARAM: "bodyParam",
     QUERY_PARAM: "queryParam"
  }

  InputFileTypeEnum = {
     FILE: "file",
     IMAGE: "image"
  }

  InputFileExtensionEnum = {
     HDDL: "hddl",
     XML: "xml",
     JSON: "json",
     TXT: "txt",
     DOC: "doc,docx",
     IMAGE: "image",
     ALL: ""
  }
  
  ElementTypeEnum = {
     GOAL: "GOAL",
     TASK: "TASK",
     QUALITY: "QUALITY",
     ACTION: "ACTION"
  }

  TypesAttributesEnum = {
     BOOLEAN: "BOOLEAN",
     CHECKBOX: "CHECKBOX",
     RADIO_BUTTON: "RADIO_BUTTON",
     EXPRESSION: "EXPRESSION",
     LIST: "LIST",
     OBJECT: "OBJECT",
     OBJECT_NULLABLE: "OBJECT_NULLABLE",
     OBJECT_SELECTABLE: "OBJECT_SELECTABLE",
     TEXT: "TEXT"
  }

Sending Request Object

The [Service] object represents an abstraction of the HTTP request that will be responsible for making the connection with an external application.

Adding goal oriented model in request

To add the goal-oriented model in the body of the request, it is necessary to add the name "PistarModel" to the body of the attribute [request], located inside the [Service] object, as in the example below:

 "request": {
     "content": "PistarModel"
 }

The request will have in its body an attribute with the name of content that will have the oriented model generated by PiStar as its value.

Adding inputs in request

In order for the request body to be mounted, it is necessary to pay attention to the definition of this object.In each object [Service] there is a list of inputs that will be rendered on screen and are responsible for injecting the data received by the user in the request. The [requestAttributeLabel] attribute of the [Input] object performs a binding with the [request] attribute within the object service. so that this link The object is required that the value entered in the [requestAttributeLabel] is also defined as a key in the value of the [request] attribute.

Example:

"request": {
    "modelFile": "PistarModel",
    "hddlFile": "hddlFile",
    "configFile": "configFile",
    "worldFile": "worldFile"            
},
"inputs":[
    {
        "type":"FILE",
        "requestAttributeLabel": "hddlFile",
        "label": "HDDL File",
        "extension": "hddl"
    },
    {
        "type":"FILE",
        "requestAttributeLabel": "configFile",
        "label": "Configuration File",
        "extension": "json"
    },
    {
        "type":"FILE",
        "requestAttributeLabel": "worldFile",
        "label": "World Knowledge File",
        "extension": "xml"
    }
]

In the example above, the modelFile, worldFile and configFile keys are linked to the inputs by the attribute [requestAttributeLabel].

Enviromment

The attribute environment defines the name of the environment that will be loaded.

envName

Buttons

  {
     "id": String,
     "label":  String,
     "service": Service.class
  }

The attribute buttons represent the buttons on the menu that will trigger some service

envButtons

Properties

{
     "name": String,
     "value": String,
     "placeholder": String,
     "checked": Boolean,
     "hide":Boolean,
     "type": TypesAttributesEnum.class,
     "elementType": ElementTypeEnum.class,
     "childrens": Array<Properties>
}

The attribute properties represent the properties displayed in the elements.

  • name : The name of property
  • value : The value of property
  • placeholder : The name displayed in input
  • checked : The boolean that represent the selected input
  • hide : The boolean that show or hide the property
  • type: The property type
  • elementType: The type of element selected
  • childrens: The childrens of property

Link Pistar PGOM: https://pgom-application.herokuapp.com/#

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

8 watching

Forks

Releases

Packages

Contributors

Languages