yuuvis® RAD Q&A

0 votes
by (750 points)

Is there any possibility right now to mix the structure and reference tree's together?
For example we have the following tree:

The problem right now is that the "kaufmännischer Fragebogen" can contain multiple files and also can exist before the "Auftragsakte" so we changed the system so that the "kaufmännischer Fragebogen" has an own context folder and is referenced to the "Auftragsakte" once it's created.

But the other problem now is that we can't have it under point 3 "Auftragsbestätigung" anymore cause it's a reference now. (we also moved the references up with custom css so dont get confused by that).

And it's hard to explain to our ousers why it has to be outside now so it would be nice to have a "mixed" tree.

Maybe some concept where you can write simple Scripts to generate the tree with JavaScript for the future could be interesting for yuuvis.

for example the structure tree could be just a simple definition or some script like that and would also allow all forms of custom conditions etc.

// Simple structure tree like now    
[
        {
            "title": "Auftragsakte",
            "expanded": true,
            "key": "auftragalledokumente",
            "folder": [
                {
                    "title": "1. Vertragsannahme",
                    "key": "vertragsannahme",
                    "condition": "type='akteverhandlungsprotokoll' OR (type='akteschriftverkehr' AND akteschriftverkehr.art='Beauftragung')",
                    "expanded": false,
                    "folder": [
                        {
                            "title": "Beauftragung",
                            "condition": "type='akteschriftverkehr' AND akteschriftverkehr.art='Beauftragung'",
                            "key": "beauftragung"
                        },
                        {
                            "title": "Verhandlungsprotokoll",
                            "condition": "type='akteverhandlungsprotokoll'",
                            "key": "verhandlungsprotokoll"
                        }
                    ]
                }
            ]
        }
    ]
    
    
    // Advanced custom tree for more complex things
    
    // object could look like this:
    //  {
    //      "type": string type of the object
    //      "reference": true / false,
    //      "data": { ... },
    //      ...
    //  }
    (objects) => {
        return [
            {
                "title": "Auftragsakte",
                "expanded": true,
                "key": "auftragalledokumente",
                "folder": [
                    {
                        "title": "1. Vertragsannahme",
                        "key": "vertragsannahme",
                        "condition": "type='akteverhandlungsprotokoll' OR (type='akteschriftverkehr' AND akteschriftverkehr.art='Beauftragung')",
                        "expanded": false,
                        "folder": [
                            {
                                "title": "Beauftragung",
                                "entries": (objects) => objects.filter((entry) => entry.type === 'akteschriftverkehr' && entry.akteschriftverkehr.art === 'Beauftragung'),
                                "key": "beauftragung"
                            },
                            {
                                "title": "Verhandlungsprotokoll",
                                "condition": "type='akteverhandlungsprotokoll'",
                                "key": "verhandlungsprotokoll"
                            }
                        ]
                    }
                ]
            }
        ];
    }

of course this could be way more advanced to allow a much more flexible structure.

But for now is there a way to replace the structure tree somehow with custom JavaScript and still keep the functionality or something like that? This would be really helpfull! :)
Thanks in advance!

1 Answer

+2 votes
by (3.3k points)

Hello,
currently it is not possible to merge the structure tree and reference tree together.
The trees get distinct inputs: While the structure tree is using all child documents of the folder - the reference tree uses all folder and documents that are referencing the folder. But the parent-child relation between the folder and the child documents can be seen as a system internal reference.
From this point of view we investigate possibilities to merge all input data together while not confusing the user and to still be able to build up the aggregation tree with a single elastic search query. This change may be incorporated in version 9.0 - but this depends on the result of the investigation.

There is no way in the standard client to inject custom scripting for the structure/reference tree. With a custom client this is possible, while using the structure service as data source.

br

Related questions

...