How to Edit a Rule in an Oracle CQL Processor Using the Query Wizard

Managing Oracle CQL Rules 6-9 Figure 6–9 CQL Rules Tab

5. Select the rule you want to edit and click the Query Wizard button.

The Query Wizard opens with the selected rule on the canvas as Figure 6–10 shows. 6-10 Oracle Complex Event Processing Visualizer Users Guide Figure 6–10 Query Wizard: With Existing Rule For information on the various tools along the top of the Query Wizard canvas, see Section 6.1.11, Managing the Query Wizard Diagram .

6. To view the Oracle CQL statements associated with any operator:

■ Ensure that the Hover check box is checked. ■ Hover the mouse pointer over an operator. The Oracle CQL statement appears as Figure 6–11 shows. Figure 6–11 Hovering Over an Oracle CQL Operator 7. To modify the Oracle CQL statements associated with any operator, double click the operator. The corresponding editor dialog appears. Figure 6–12 shows the editor dialog after double clicking the Join operator. Managing Oracle CQL Rules 6-11 Figure 6–12 Editor Dialog for Oracle CQL Join Operator

8. Use the editor dialog to modify the operator.

For information on configuring all the Query Wizard editor dialogs, see Section 6.1.9, How to Configure Query Wizard Oracle CQL Constructs .

9. Click the Add Join button to apply your changes to the generated Oracle CQL

statement.

10. Click the Validate button to ensure that your changes are syntactically correct.

Correct any errors before proceeding.

11. Click Save to save your changes.

Your query is saved in memory.

12. Double click your query’s Output operator.

13. Click Replace Rule.

The Oracle CQL rule is now changed and the new version appears in the CQL Rules tab.

14. Close the Output construct.

6.1.3 How to Create a Parameterized Rule in an Oracle CQL Processor

You can create a parameterized Oracle CQL query. 6-12 Oracle Complex Event Processing Visualizer Users Guide For more information, see: ■ Section 6.1.4, How to Edit a Parameterized Query in an Oracle CQL Processor ■ Paramterized Queries in the Oracle Complex Event Processing CQL Language Reference To create a parameterized rule in an Oracle CQL processor: 1. In the left pane, navigate to and expand the Applications node of the Oracle CEP instance to which the application is deployed.

2. Select appname, where appname is the name of the application you want to use.

3. Select the Oracle CQL processor you wish to use: a. To use the EPN diagram: – Click the Event Processing Network tab. – Double-click the Oracle CQL processor you wish to use. b. To use the domain tree: – Expand the appname Stages node, where appname is the name of the application you want to use. – Click the Oracle CQL processor you wish to use. – In the right pane, click the General tab The Processor panel is displayed as Figure 6–1 shows. Figure 6–13 Oracle CQL Processor Panel Note: You cannot delete a parameterized query and you cannot edit the Oracle CQL query using the Query Wizard. Managing Oracle CQL Rules 6-13

4. Click the CQL Rules tab.

The CQL Rules tab appears as Figure 6–32 shows. Figure 6–14 CQL Rules Tab

5. Click the Query radio button.

6. Click Add Query.

7. Enter a query name in the Query Id field.

8. Enter the Oracle CQL query in the Query field.

Use placeholder characters :n to specify parameterized values.

9. Configure the Enable option:

a. To enable the query as soon as it is saved, click true.

b. To keep the query disabled after it is saved, click false.

10. Click Save.

A confirmation dialog appears as Figure 6–15 shows. Figure 6–15 Query Save Dialog

11. Click OK.