Question on ECA Rule to execute for a new Taxonomy in EDG

56 views
Skip to first unread message

deviredd...@gmail.com

unread,
Nov 26, 2021, 7:43:33 AM11/26/21
to TopBraid Suite Users
Hi,
     There is requirement to add an user as Viewer automatically in the background whenever a brand new Taxonomy is created in Enterprise Data Governance (EDG). For this can the Event Condition Action Framework be used? If yes then please share an example Rule for adding an user automatically to a new Taxonomy.

Thanks,
Sanjeev

Holger Knublauch

unread,
Nov 26, 2021, 8:45:43 PM11/26/21
to topbrai...@googlegroups.com

ECA rules will only execute after changes to an existing asset collection, but you will need something to execute while the asset collection is being created.

For this we have a notion of project constructors. See the rdfs:comment at teamwork:projectConstructor. Basically you need to define an SWP file that links defines an SWP element, e.g. ex:MyMethod as subclass of ui:Methods that adds the extra teamwork:viewer triples, and then add

    taxonomies:ProjectType teamwork:projectConstructor ex:MyMethod

to make sure it gets executed whenever a new Taxonomy gets created.

The ui:prototype of ex:MyMethod could be as simple as

<ui:group let:teamGraph="{= teamwork:currentTeamGraph() }">
    <ui:setContext ui:queryGraph="{= ?teamGraph }">
        <ui:update ui:updateQuery="{! INSERT { ?teamGraph teamwork:viewer <WHOEVER> } WHERE { } }"/>
    </ui:setContext>
</ui:group>

(This is untested)

HTH
Holger
--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/e49cedbb-cbdb-4506-94fa-135d29c2344bn%40googlegroups.com.

Holger Knublauch

unread,
Nov 28, 2021, 7:25:23 PM11/28/21
to topbrai...@googlegroups.com

Hi Sanjeev,

I took another look at this and have attached a version that should work out of the box.

HTH
Holger

ProjectConstructorExample.ui.ttlx

deviredd...@gmail.com

unread,
Dec 1, 2021, 1:24:56 AM12/1/21
to TopBraid Suite Users
Thanks, Holger.
      Yes, it works for Taxonomies. Is it possible to extend this to other Asset Collections(Ontologies, Crosswalks) that we use?

Thanks,
Sanjeev

Holger Knublauch

unread,
Dec 1, 2021, 1:29:23 AM12/1/21
to topbrai...@googlegroups.com

Yes. You'd just need to replace taxonomies:ProjectType with the target ProjectType that you want from

taxonomies:ProjectType
  teamwork:projectConstructor """
<ex:ExampleProjectConstructor/>
"""^^ui:Literal ;
.

For example, owl:import ontologyprojects.ui.ttlx and then use ontologyprojects:ProjectType instead.

Holger

deviredd...@gmail.com

unread,
Dec 1, 2021, 2:18:59 AM12/1/21
to TopBraid Suite Users
Thanks, Holger. Could you please check my following queries also?
1. Where can I find the allowed ProjectType literals(taxonomies:ProjectType, ontologyprojects:ProjectType)?
2. Both dash:js & ui:prototype seem having same logic. Is that true? If yes then is that needed to have both?
3. I see other triples/definitions in SWP Element Form but not ProjectType triple. Is it possible to view/update the 'ProjectType' triple/declaration/definition from the SWP Element Form/User Interface?
     taxonomies:ProjectType
            teamwork:projectConstructor """
            <ex:ExampleProjectConstructor/>
            """^^ui:Literal ;
            .

Thanks,
Sanjeev

Holger Knublauch

unread,
Dec 1, 2021, 2:31:37 AM12/1/21
to topbrai...@googlegroups.com


On 2021-12-01 5:18 pm, deviredd...@gmail.com wrote:
Thanks, Holger. Could you please check my following queries also?
1. Where can I find the allowed ProjectType literals(taxonomies:ProjectType, ontologyprojects:ProjectType)?
Open edg.topbraidlive.org\1.0\collection\COLLECTION_EDG-EVERYTHING_v1.0.ttl and search for all instances of teamwork:ProjectType

2. Both dash:js & ui:prototype seem having same logic. Is that true? If yes then is that needed to have both?
No this was just for the file that I have you but you can ignore the dash:js for now. However, in the 7.1 release users have the option to seamlessly switch between ui:prototype and dash:js for all SWP elements.

3. I see other triples/definitions in SWP Element Form but not ProjectType triple. Is it possible to view/update the 'ProjectType' triple/declaration/definition from the SWP Element Form/User Interface?
     taxonomies:ProjectType
            teamwork:projectConstructor """
            <ex:ExampleProjectConstructor/>
            """^^ui:Literal ;
            .

When you import the corresponding graph (e.g. by importing the EVERYTHING graph above) you should see these links from the ProjectType on the forms.

HTH
Holger


Reply all
Reply to author
Forward
0 new messages