Hello Emad, there is no suck a feature in Ofbiz. To analyse which screens/components/requests are present in a screen you'll have to do a bit of "low level" work.
The first I would do is to view the source page view from the browser: in there you can find the name and location of the screens/decorator/ftl templates rendered in that page. This at least narrows the circle and avoids you to randomly search within all the source code. Then if you would like to see what request IS fired by a link or a Button in a page you can inspect with the browser that particular element (dev tools) and check out the url associated to it. For example if you see something like: /ordermgr/control/orderview in a href attribuite of a <a> element, you know that link will fire the orderview request and it is to be searched in the ordermgr controller.xml and the ordermgr webapp is in the applications/order directory of the Ofbiz installation. In addition, you can take a look At The ofbiz logs, when you perform some action in a screen, because there Will be printed all the chained requests (if any), services run (if any) and rendered views. For visited code I think this is the best you can do at the beginning: gather as much info as possible and narrow the search around the framework, keeping always in mind that the whole framework follows the MVC pattern, so it all beginf from a request and ends (in most cases) with a view and in the middle, services, events and groovy scripts act together to build the business logic behind. Regards, Giulio On Sat, Feb 12, 2022, 15:09 Emad Radwan <[email protected]> wrote: > Hello Giulio, > > Thanks again for the suggested trick and it's amazing. > > Another related issue, please. Is there something similar for tracking > ‘visited’ code? The fact that Ofbiz execution depends on a lot of XML files > makes debugging a bit hard. > > So, I’ll really appreciate it if there’s some admin screen that shows > which modules/functions/services were executed while running a certain > screen. > > Regards, > > Emad > > > On 12 Feb 2022, at 3:13 PM, Giulio Speri - MpStyle Srl < > [email protected]> wrote: > > > > Hello Emad, > > > > To perform that kind of check, you'll find a useful tool in the Webtools > > backoffice application, named *Entity Engine*. > > Once in the Webtools, you'll find the *EntityEngine* menu voice and from > > there different kinds of operations can be performed through specific > > Tabs. > > IMO the two most useful tools are *Entity Data Maintenance* and *Entity > SQL > > Processor*. > > The *Entity Data Maintenance* lists all the entities and view entities in > > the ofbiz db, and you can search for records in a specific table: with > this > > tool you should be able to do the "related" search you desire. In fact, > for > > example, if you search for the table Party and the PK "10000", the entity > > engine will show you obviously that record, but also it lists in a > > drop-down element all the related entities and view-entities (ie: > > PartyRole, PartyContactMech,...) letting the user explore related data. > > This is a fast way to check all the values and entities related to a > table. > > > > The *Entity SQL Processor* is a tool with which you can perform SQL > queries > > to the db. > > > > I hope I've been helpful. > > > > Best regards, > > Giulio > > > > On Sat, Feb 12, 2022, 13:19 Emad Radwan <[email protected]> wrote: > > > >> Hello Community, > >> > >> Part of my strategy in understanding Ofbiz internal design is by > >> inspecting values created in the DB, I do that by searching for values > that > >> I enter in Ofbiz GUI and trying to find what different tables contain > such > >> values. > >> > >> When the Primary key value for a certain entity - Party for example - is > >> open for data entry such as in the ‘Create Customer’ screen, it’ll be > easy > >> for me to achieve the above. On the other hand, in tables that the > primary > >> key is filled internally by a ‘sequence number’ that wouldn’t be > possible. > >> > >> My question here is, is there a way to control what kind of value is > being > >> inserted in such PK fields so I can find in my DB search all related > tabes > >> that was used while creating a certain transaction from the GUI? > >> > >> Regards, > >> > >> Emad > >
