For the Boss class, I need the name of all the agents who made the sales with the highest value (something like: foreach agent, select agent name if he has
max(foreach command, total = total + price of the product * quantity from command).
How do I do this in OCL?
How to possibly do this in ocl?
320 views Asked by Simply Me At
1
There are 1 answers
Related Questions in UML
- steps to create a web app with backend and database and web
- How to present this example concept in UML: Using 2 LCD displays in C/C++
- In the UML diagram, in the Class diagram, what does stereotype mean <<compound>>?
- UML representation of containerized services
- uml class diagram for boxing match
- Polymorphism can be described as:
- Why am I getting a plantUML syntax error with a statechart in a package?
- System or external system as an actor in a use case?
- How to model statechart behavior inheritance using UML?
- Can we have an interface create objects of another interface in UML Class Diagrams?
- Is my relationships correct in my class diagram
- How to attach a Port shape to a class shape?
- How to correctly create a sequence diagram?
- How can I insert activity diagram image to an use case in Enterprise architect?
- Use case extends or include
Related Questions in DIAGRAMS
- representing total partial participation in sql / mysql from er diagrams
- In Javascript, how do I print 2 diagrams side by side?
- How can I fetch data from shapes and diagrams of a word document using gembox document bundle?
- Understanding UART Timing Diagrams
- Rails chartkick how to add names
- excel change diagram characteristics with VBA
- Not exactly following what is depicted on project UML diagrams
- What type of composition would this be?
- Class Diagrams relationships Interfaces
- What is an order of transitions in state diagram? How to use history pseudo-states?
- How to possibly do this in ocl?
- Translating mouse-over text in NVD3.js
- graphviz rows of nodes
- fUML, Papyrus and Basic Operations
- UML design for a nodeJS web application
Related Questions in OCL
- Merge Project models through EML using complex comparison rules
- get "SAXSparseEception: Content is not allowed in prolog" when parsing an OCL file in my Eclipse plugin
- UML constraint {xor} between two associations
- Validate OCL attributes of my model using Eclipse papyrus
- Object Constraint Language (OCL) syntax checker
- Generate Java Code from OCLInEcore in MWE2 Workflow
- Write OCL restrictions related to associations with other classes
- Representing QVT-Operational transformations in XML, JSON or or any other serialized format
- OCL - Composition relation, can it be referenced backwards?
- How can I add OCL restriction to the class variable?
- Can you use dot notation when referring to classes in relation to other classes in OCL?
- How do I find a UML object if I only know the value of one of its attributes in OCL?
- Get ocl string attribute length
- Understanding the semantics of some OCL operands
- How to use MDriven OclPs to find all objects matching a list of strings?
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Popular Tags
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)

If you consider that you are at the root of the model (no context in particular) in order to select the
20first top Agents:and from a
Bossinstance:The idea behind the request is (for the 1st one):
Agent.allInstances())...->sortedBy(...))... sale->...->sum())quantity*product.price)...sale->collect(...))sumone), inverse the result to have the top in first positions (... - sale->collect()->sum()...)...->subSequence(1,X))EDIT>
Just a detail about association class navigation (from the "OCL Specification", p.21)
Following the early version of the specification, the
Association Classname is said to be put as lower case, in the later version, the name is let untouched.EDIT2>
In order to get the higher score and the agents name who hits this highest score:
The first let select the higher score (collect all the scores, sort them in reverse order and select the first element), then select all the workers who have a score equals to the previously computed one.