Difference between revisions of "OS.bee Documentation for Designer"
(→DSL Table) |
(→OS.bee Documentation for Designer) |
||
Line 376: | Line 376: | ||
Answer: | Answer: | ||
+ | |||
+ | ===DSL authorization (CRUD)=== | ||
+ | |||
+ | Question: | ||
+ | |||
+ | We tried to authorize the CRUD operations for some position in different ways. | ||
+ | All CRUD operations for a given entity "Customer" | ||
+ | |||
+ | [[File:position_accounting.png|center|frame|''Position Accounting'']] | ||
+ | |||
+ | [[File:position_projectintern.png|center|frame|''Position ProjectIntern'']] | ||
+ | |||
+ | Assumpiton: | ||
+ | * For each positon there i a user available | ||
+ | * Each position has an assigned rolte (organization) | ||
+ | * Both user uses the same perspecitve (table/dialog) | ||
+ | * The dialog uses a general toolbar with the necessary actions | ||
+ | |||
+ | [[File:CRUD.png|center|frame|]] | ||
+ | |||
+ | Login with user assigned to Position Accounting, create a new datarow (new Customer) and save the data (o.k) | ||
+ | Login with user assigned to Position ProjectIntern, select the new Customer in the table, activate delete Button (Row deleted not expected) | ||
+ | Is there something to take care about we neglected? | ||
+ | |||
+ | Answer: | ||
+ | |||
+ | |||
Revision as of 11:47, 28 March 2018
Contents
- 1 OS.bee Documentation for Designer
- 1.1 Get Started
- 1.2 Modeling
- 1.2.1 I18N.properties (Reorganization of obsoleted values)
- 1.2.2 Display values from ENUMS in Table
- 1.2.3 References to images
- 1.2.4 Perspective with master/slave relationship
- 1.2.5 Perspective use border to show boundary for each sash
- 1.2.6 Datainterchange Export (does not overwrite existing file)
- 1.2.7 Logged in user as part of the data-record
- 1.2.8 bpmn2 file reference in blip-DSL
- 1.2.9 How to add the missing icon images to a new created ENUM combo box
- 1.2.10 table DSL (as grid) create new data records
- 1.2.11 DSL entity (Multiplicity of properties)
- 1.2.12 UI-Design
- 1.2.13 DSL Dialog: Autosuggestion for DomainKey or DomainDescritpion
- 1.2.14 DSL Table
- 1.2.15 datamart DSL (condition filtered) table does not refresh
- 1.2.16 DSL authorization (CRUD)
- 1.3 Core Dev
- 1.4 Apps
OS.bee Documentation for Designer
Here are frequently asked questions from designers which are not mentioned by other Documentation. In this Page, you could find the answer to your question.
Get Started
Pitfalls with new Eclipse installations
Be aware that when installing a new Eclipse environment to look at the preferences for DS Annotations and check the box "Generate descriptors from annotated sources" as OS.bee makes heavy use of automatically generated component descriptors in the OSGI-INF directory. It is unchecked by default for incomprehensible reasons.
Don't forget to set your target platform correctly as described in the installation guide.
Eclipse Installation / Installation SWF / New Project from GIT
Question:
Using Eclispe Neon, execution of Installation Software-Factory as described in the Installation notes, Connect to a GIT Archiv, After Building Workspace the application is not valid (see Screen-Shot) Try to clean the Project was not successful.
Answer:
The version of the installed Software Factory and the version needed for the project do not match.
Please install the appropriate Software Factory version.
cvs2app - question regarding ENUM types
Question:
cvs2app is mentioned in the documentation "App up in 5 minutes" and gives the possibility to create one app directly out of the csv file. One of the first steps is to create an entity, which is generated based on the information on the first line (which contains the column names). In consequence I have 2 questions regarding ENUMS:
- Is it possible to create an entity ENUM out the csv - FILE?
- Is it possible to use an existing ENUM entity during the creation of the app?
For example:
in the entity there is already a definition:
enum type_ps {
PROCESS_DESCRIPTION, ORGANISATIONAL
}
and the csvfile looks as follows:
ticket_type_number;ticket_type_description;ticket_type_ps_type
1;CRS handling;PROCESS_DESCRIPTION
2;Administrative;ORGANISATIONAL
3;Delivery package;ORGANISATIONAL
4;Software behaviour;PROCESS_DESCRIPTION
Answer:
Yes it is possible. When using the latest version (from feb 2018), it is possible to supply various meta-information to each column. One meta-info is the hint to the application builder that this column is meant to be a ENUM. By default it wouldn't be possible to guess that fact.
Launch Application from Eclipse (very slow)
Question:
When starting the Application from within the Eclipse it took very long time until the application is up. Are there some settings to be controlled?
Answer:
If you experience very slow performance with Eclipse itself as well as the application you launch from Eclipse it might be a good idea to check the virus scanner you have installed. Some virus scanners check all the files inside the Eclipse installation directory, the Eclipse workspace and the GIT repository which might lead to extreme slow performance. Ask your Administrator how to avoid this.
Structure of the documentation page
In the OS.bee Software Factory Documentation page, there are 3 Headlines used to structure the page:
- OS.bee DSL Documentation
- Other OS.bee-Specific Solutions
- OS.bee Third-Party Software Solutions
At the end of Chapter one there are some helpful hints to work with eclipse. To start with Eclipse and the SWF these hints could be very useful.
- One more hint: to Use STRG-Shift-O to organize the import inside the DSL.
Modeling
I18N.properties (Reorganization of obsoleted values)
Question:
Each DSL has its own I18N.properties to translate the values. The property file includes values that are no longer used in the Modell-Description. (For example based on an addition correction of orthography)
The update of the properties seems to be one-way. Is there a function to reorganize the values (with the target to drop all obsoleted values)?
Answer:
No, there is no way to delete unused entries for security reasons. Translations to foreign languages are expensive. The modeler is responsible to delete obsoleted entries.
Display values from ENUMS in Table
Question:
We are using a perspective with the combination of table and dialog to maintain master data. The dialog contains combo-boxes to select values based on ENUMS. The selected value is displayed in the dialog, but is not displayed in the table. Is there a way to display the values of the selected ENUM in the table, with the objective to use the filter?
Answer:
This is not yet implemented but on schedule.
References to images
Question:
Using for example MENU.DSL Documentation:
package <package name>[{
expandedImage <expandedImage String>
Keyword expandedImage and collapsedImage is used to define the menu image when the menu expanded or collapsed. Where can we find the valid names of the Images to use in the String?
Answer:
The images can be selected by using hitting <CTRL>+<space> right behind the keyword. This will lead you to the image picker. Double-click on "Select icon...“ , then you can select the image from the image pool. The corresponding name will be added to the model. If you want to add own images to the pool follow How to add pictures.
Perspective with master/slave relationship
Question: We created a perspective with a "master" table and 5 related "slave" tables. The target is to select one row in the master table and automatically filter the data rows in the slave tables related to the selected data. Where can we find information about the way to realize this goal?
Answer:
With "master" you probably mean an entity that has relative to the "slave" an one2many relationship. Views of their underlying tables will synchronize if they share a filter with the selection of another table. The filter must use the same entity as the entity of a table that selected a row. So every datamart of a "slave" must have a condition in a many2one join where the "one" side is the entity that should synchronize while selecting rows. In effect the selected row tries to change all filters to the same ID if the same entity is used. This applies to all open views in all open perspectives.
In datamartDSL, using the keyword "filtered", the result in the application is a combo-box in the header of the table, which allows to select a value which is used as a filter of all tables of the perspective which have use the same condition; using the keyword “selected”, the result will be a list-box.
Perspective use border to show boundary for each sash
Question:
Is it possible to show border between each sash-container used in a perspective? From our point of view the arrangement is not pretty clear to the user. It could be helpful to get a clearer view to show (optional) real visible border between sash-container and even between parts. for example:
- green border between parts of a sash-container
- blue border between sash-container
Is this already possible?
Answer:
For the moment there are no plans to colorize borders by means of grammar keywords. It is possible by changing the CSS for the currently selected theme.
Datainterchange Export (does not overwrite existing file)
Question:
We defined an interchange for a specific entity. The created TriggerView is called in a perspective, which is called in the menu. We also used an adjusted dialog with a toolbar with the export command. When the defined target filesystem is empty, the export file was created. A second try to export the data does not create a new file. Is there something to consider to allow an "overwrite" of existing data?
Answer:
Datainterchange tries not to overwrite already exported files and appends a running number to the end of the filename. When it is not work, you have to debug. The Action-buttons of the created Trigger-View are accidently colored as disabled but they are not. This will be changed in the future.
If you think they are very pale (not easy to read). It is also possible to define the layout of the buttons.
Logged in user as part of the data-record
Question:
We want to create an entity, where the logged in user, who insert a record is referenced in each data-record that be created. Is there a way (function or something else) to handle this request?
Answer:
This request is already a ticket.
bpmn2 file reference in blip-DSL
Question:
There is no hint about where to save the *.bmpn2 files. So we created a subfolder in net.osbee.app.XXX.model.blip, which is named of “bpm”. Using the new subfolder we created a new jBPM Process Diagram. As the description during the creation we remove "defaultPackage." as Prefix for Process-ID: The model is simple (Start-Event / User-Task / End-Event) When we try to reference the bpm2 model inside the blip-dsl, the name could not be resolved. Is there something to take care about?
Answer: You must right click the new folder “bpm” and when the mouse is over "Build Path", select "use as source folder". After this is done you should press STRG+SHIFT+O in the Blip DSL to "organize imports".
How to add the missing icon images to a new created ENUM combo box
Question:
Defining an ENUM at the entity DSL model instance, a corresponding combo box is created, but the corresponding icon image for each ENUM component is missing.
Answer:
For the solution have a look at How to add pictures. We would like to enforce the usage of icons in OS.bee. So if you use EnumComboBox without images, there will be a "missing icon" icon appears in the combo-box, it was introduced with intent to remind the designer that there is a missing icon. There is still a problem, in the case, for example there are 10 Enum values per Enum type and 10 Enum types are used in an entity, 100 image names must be generated and deposited. Even if all use the same picture. This takes a lot of effort and costs time - just writing the file names per picture. Some of the designer wants to use EnumComboBox without images. Although great user experience comes from great effort, for designers who want to hold on to the slipshod way we will introduce a setting in OS.bee preferences to avoid displaying icons at all when at least one of the entries of a combo box is missing. For a pretty user experience we must decide between text and icon per combo box.
table DSL (as grid) create new data records
Question: Is it possible to create new data records while using a grid? Existing data records can be changed for defined attributes (editable prop) using a double-click on the data row What must be changed to allow the creation of data rows?
Answer: This is not yet possible, but on schedule.
DSL entity (Multiplicity of properties)
Question:
We defined an entity for customer data, with the goal that some attributes must be entered during creation of new data-records. To use only the property seems not to be enough to prevent a data-record to be saved, without filling non-nullable attributes. What have to be done to reach the goal?
Code-example:
var int [1]customer_no
var String [1] customer_name
var boolean portalrequired
var String country
Snippet of documentation
Answer: This is a very interesting question. So I will explain some important facts about binding and validation (formerly known as Plausi). As OS.bee implements the Model-View-Controller pattern, UI fields, business logic and data layer are strictly separated. The link between them is realized by a "bean binding" mechanism. This mechanism propagates changes between the MVC elements in every desired direction. There is a layer between this mechanism which is called bean validation. For every direction of binding a validation can be implemented to avoid or allow a certain change. Even conversions between values from model to presentation and vice-versa are implemented in the binding mechanism. There are some pre-defined validation rules available in the Datatype DSL. As we follow the domain concept to define things as close to the base of the DSL hierarchy as possible, this is the place to go for validations.
For your request, you must define a new datatype as following:
datatype StringNotNull jvmType java.lang.String isNotNull[severity=error]
You can apply a validation rule to every "non-primitive" jvmType (jvm = Java Virtual Machine): Double, Integer..., but not for double, integer... Validation rules are cumulative. The severity of the user response on violation of the rule is definable in 3 flavors:
- info
- warn
- error
Each of them stylable via CSS. The following validation rules are available right now:
- isNotNull
- isNull
- minMaxSize (applies to Strings)
- maxDecimal and minDecimal (applies to Double, Long and Integer - Float is not supported by OS.bee)
- regex (regular expression must be matched - for the advanced designer)
- isPast (applies to date)
- isFuture (applies to date)
► Examples:
datatype DoubleRange jvmType java.lang.Double maxDecimal (10.00) minDecimal (20.00)
datatype String5to8Chars jvmType java.lang.String minMaxSize(5,8)
As a last step you must use the newly created datatype in your entity to let the validation work. There is one additional validation accessible as keyword from the Entity DSL. If you want to enforce the uniqueness of an attribute value like "fullName" you can use the unique keyword in the entity.
► Example:
entity Employee extends BaseID {
persistenceUnit "businessdata"
domainKey unique String fullName
When you are about to save a newly created entry, during bean validation the database is accessed and it is verified, that the given attribute content is not already in the database. Else a validation error with severity error appears in the front-end.
UI-Design
Question:
Is it possible to design a Combo-box/List-box where I can sort the entries by myself? Like in eclipse > Configure Working Sets... Here I ‘m able to select Up / Down to sort the working sets.
In the moment I realize this in the entity with the field listPrio:
entity Title extends BaseUUID {
persistenceUnit "businessdata"
domainKey String
title var
int listPrio
}
Then I sort the entries by giving a value for listPrio. But this is not a good solution.
Answer:
Sorry, not for this time. Sounds useful. I will create a ticket for it.
DSL Dialog: Autosuggestion for DomainKey or DomainDescritpion
Question:
I develop an address management. In the Entity DSL, I have the fields:
domainKey String decription
var String firstname
var String lastname
If I create a user:
firstname: Hans
lastname: Maier
Is it possible to get for the field description automatically suggested the value: Hans-Maier? Like a kind of derived or Operations in Entitiy DSL, but only for suggestion.
Answer:
Yes. After the definition of all attributes, you have the possibility to define methods that can be called by JPA thru annotations.
domainKey String description
...
@PostLoad
def void makeFullName() {
description = firstName+"-"+lastName
}
Remember that decription is completely transient. You could also use @PrePersist or @PreUpdate.
DSL Table
Question:
I have a Table with 100 address data.
Is there a possibility of multi-selection?
► Example of selection of 5 addresses:
- I want to delete in one step 5 addresses.
- I want to send to these 5 addresses the same email.
Answer:
Not for the OSBP version. If you have the BPM option, then the token for BPM can be built using a selectable table. The resulting workload could send emails or deletes against the data base in the following system task.
datamart DSL (condition filtered) table does not refresh
Question:
In a perspective we use organigram / table (user) / dialog (user). The table based on a datamart using the semantic element conditions. Not all position in the organization have assigned user. When a position with assigned user is selected the data rows of the table are filtered. When a position is selected (where no user is assigned) the table does not refresh. What can we change in the model to refresh the table even when there is no corresponding data?
Answer:
DSL authorization (CRUD)
Question:
We tried to authorize the CRUD operations for some position in different ways. All CRUD operations for a given entity "Customer"
Assumpiton:
- For each positon there i a user available
- Each position has an assigned rolte (organization)
- Both user uses the same perspecitve (table/dialog)
- The dialog uses a general toolbar with the necessary actions
Login with user assigned to Position Accounting, create a new datarow (new Customer) and save the data (o.k) Login with user assigned to Position ProjectIntern, select the new Customer in the table, activate delete Button (Row deleted not expected) Is there something to take care about we neglected?
Answer: