Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 2 Point Cut Query Language : Examples of Point Cuts Defined Using Query Language

Examples of Point Cuts Defined Using Query Language
1.
Select all the FileEventSource activities.
<pointcut name = "allFileEvsActivities">
<query queryLanguage = "http://schemas.tibco.com/bw/poa/pointCutSelectionLanguage">
activity ( type = "bw.FileEventSource" )
</query>
</pointcut>
2.
<pointcut name = "allJMSActivities">
<query queryLanguage = "http://schemas.tibco.com/bw/poa/pointCutSelectionLanguage">
activity ( type = "bw.JMS*" )
</query>
</pointcut>
3.
Select all FileRead and FileWrite activities.
<pointcut name = "fileActivities">
<query queryLanguage = "http://schemas.tibco.com/bw/poa/pointCutSelectionLanguage">
activity ( type = "bw.FileReadActivity" || type = "bw.FileWriteActivity" )
</query>
</pointcut>
4.
Select all the Event Source activities.
<pointcut name = "eventSourceActivities">
<query queryLanguage = "http://schemas.tibco.com/bw/poa/pointCutSelectionLanguage">
activity ( kind = "event-source" )
</query>
</pointcut>
5.
Select all activities that have "@TODO" in their description.
<pointcut name = "allTODOActivities">
<query queryLanguage = "http://schemas.tibco.com/bw/poa/pointCutSelectionLanguage">
activity ( description = "*@TODO*" )
</query>
</pointcut>
6.
<pointcut name = "purchaseOrderActivities">
<query queryLanguage = "http://schemas.tibco.com/bw/poa/pointCutSelectionLanguage">
process ( tns = "http://example.org/*" )
</query>
</pointcut>
7.
Select all the File Write activities with name starting with "FileRead", that are part of a process whose target namespace starts with http://example.org/. Select only the processes that are part of projects whose names start with "HR".
<pointcut name = "complex">
<query queryLanguage = "http://schemas.tibco.com/bw/poa/pointCutSelectionLanguage">
activity (name = "FileRead*" &amp;&amp; type = "bw.FileReadActivity") &amp;&amp; process ( tns = "http://example.org/*" ) &amp;&amp; project ( name = "HR*" )
</query>
</pointcut>
8.
Select all the activities with name starting with "file". Do not select all "FileWrite" activities.
<pointcut name = "DoNotFileWriteActivities">
<query queryLanguage = "http://schemas.tibco.com/bw/aop/pointCutSelectionLanguage">
activity ( name = "file*" &amp;&amp; type != "bw.FileWriteActivity" )
</query>
</pointcut>

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved