Alarm Trigger Workspace Node Example

Create a folder

1 In Statistica , select the Enterprise tab.  
2 In the Enterprise group, click the Enterprise Manager icon .   StatisticaEnterprise Manager opens.
3 In the left hand tree view pane, expand the System View folder.  
4 Right-click the Statistica Enterprise folder and select New Folder. if SDMS is turned on, the Enter a reason for this change dialog box will display.  
5 If the Enter a reason for this change dialog box displays, enter a reason in the text box. A form displays in the right pane of Enterprise Manger
6 Enter a name (Alarm Trigger Test) in the Folder name text box , and commit the changes (click Commit on the Enterprise Manger Home tab in the Changes group).  
7 Close Enterprise Manager.  

Add data source to Enterprise Manager

1 In Statistica , select the Home tab.  
2 Click the Open arrow. A drop-down menu displays.
3 Select Open Examples. The Open a Statistica Data File dialog box displays.
4 Double-click the Datasets folder. The contents of the folder display.
5 Browse to and select Cyclone-2.sta  
6 Click the Open button. The Cyclone 2 spreadsheet displays.
7 Click the Cyclone-2 spreadsheet window. Ensure it is the active window.
8 On the Enterprise tab, in the Enterprise group, click Add to Enterprise.

The Choose Save Type dialog box displays.

9 Ensure that the Create New Object option button (selected by default) is selected.
10 Click OK. The Select a folder dialog box displays
11 Select the Alarm Trigger Test folder.  
12 Click OK. The Enter a name dialog box displays.
13 Leave the proposed name - Cyclone-2.  
14 Click OK. You will see a brief Logging on message.

If SDMS is  turned on, an Enter SDMS document information and reason dialog box displays. Enter your reason for change and any other relevant data and click OK.

The Access Permissions dialog box displays.

15 Add read permissions for everyone:
  • Select Everyone in the left pane  (Listed as a user in alphabetical order in the user list).
  • Click the right arrow button.
A message displays, informing you that the document was successfully added to Enterprise.
16 Click OK. The message, "The document was successfully added to Enterprise" displays.
  Click Commit on the Enterprise Manager ribbon.  
  Click the Next Step button in the upper right corner of the right hand pane. A prompt displays: Object definition is complete. Save changes?
17 Close the Cyclone-2 data file in Statistica .  
18 If a Save the changes? prompt  displays, click No.  

Create a database connection

  Select the Enterprise Tab and click the Enterprise Manager icon. Statistica Enterprise Manager displays.
1 On the Enterprise Manager ribbon, close the Statistica Enterprise folder, then click on the Database Connections icon in the left pane to select and expand it .
  In the Action group, click on the New Database Connection icon. The Data Link Properties dialog box displays.
3 On the Provider tab, select StatSoft OLE DB Provider for Statistica Spreadsheets.
4 Click the Next button. The Connection tab will open.
5 In the Select Data Source(s) field on the Connection tab, enter the path to the newly added Cyclone-2 file, (enterprise://Alarm Trigger Test/Cyclone-2 4.sta).

Note: Copying and pasting may not work.

6 Click the Test Connection button to ensure that the specified path is correct. A prompt displays telling you that the connection succeeded
7 Click OK. The prompt goes away.
  Back in the Data Link Properties dialog box, click OK. If SDMS is activated, you will be prompted to enter a reason for the change.

The New Database Connection form displays in the right window.

8 In the Name textbox, replace the default name for the connection with Alarm Test Cyclone-2
9 Click Commit in the Changes group on the Statistica Enterprise Manager ribbon. The Statistica Success dialog box displays the message, "Connection succeeded."
10 In the prompt about permissions, click Yes.  
11 Add read access permissions for Everyone.  
12 Click Commit again.  

Create a data configuration

1 In Enterprise Manager, browse to the Alarm Trigger Test folder, right-click it, and select New Data Configuration.  
2 From the Connection drop-down list, select the newly created database connection to the Cyclone-2 data source.  
3 Enter a name for the data configuration: AT Cyclone-2.  
4 In the Queries section, click the New button.  
5 In the New Query 1 properties page, click the SQL Wizard button.  
6 In the New Query 1 - Statistica Query dialog box, select the Cyclone-2 item in the tree view pane, right-click it, and select Add. The file is appended to the panel on the right.
7 Click inside the field with variable names, right-click, and select Select All Fields.
8 Click the green arrow icon on the toolbar.  
9 In Enterprise Manager, enter a name for the query: Cyclone-2 Query.  
10 Click Commit.  
11 Add read access permissions for Everyone.  
12 Click Commit again.  

Create an Enterprise Data Configuration node in a workspace

1 In Statistica , select the Data Mining tab.  
2 In the Tools group, select Workspaces > All Validated Procedures.  
3 In the Select Data Source dialog box, click Cancel  
4 Select the Data tab.  
5 In the Import/Export group, select Enterprise > Enterprise Data Configuration An Enterprise Data Configuration node is added to the workspace
6 Double-click the node. The Enterprise Data Configuration dialog box displays.
7 Click the Browse button next to the Data Configuration field.  
8 In the Select Data Configuration dialog box, browse to the Alarm Trigger Test folder, select the AT Cyclone-2 data configuration, and click OK.  
9 In the Enterprise Data Configuration dialog box, select the Requery on run check box.
10 Click OK.  
11 Right-click the node, select Rename, and rename the node Cyclone-2.  
12 Click OK.

Create a Rules node in the workspace

1 In Statistica , select the Data tab, and ensure that the Cyclone-2 node is selected.  
2 In the Transformations group, click Rules Builder. The Rules node is inserted into the workspace, and is connected to the Cyclone-2 node.
3 Double-click the Rules node. The Rules dialog box displays.
4 Click the Input Variables to Copy button, select all variables, and click OK.  
5 Click the Edit button. In the Rules Builder dialog box.  
6 Click [New node...], and select If() from the menu.
7 In the Edit If Condition dialog box, type F.
8 Select Flame temperature (°F) from the intellisense drop-down menu. "Flame temperature (°F)" (with quotes) is displayed in the dialog box.
9 Type in <=2100 after it.
10 Click OK in the Edit If Condition dialog box.
11 Double-click the child node below the If("Flame temperature (°F)"<=2100) condition, and select Variable=Formula from the list.
12 In the Edit Formula dialog box, in the Variable field, type "Alarm ID" (with quotes).
13 In the = Formula field, type "Too cold, increase temperature" (with quotes).  
14 Click OK.
15 Double-click the [New node...] item under the If("Flame temperature (°F)"<=2100) condition.
16 Select ElseIf() from the menu.  
17 In the Edit If Condition dialog box, type "Flame temperature (°F)">2864 and click OK.  
18 Double-click the child node below ElseIf("Flame temperature (°F)">2864) and select Variable=Formula from the list.  
19 In the Edit Formula dialog box, in the Variable field, type "Alarm ID" (with quotes).  
20  In the = Formula field, type "Too hot, reduce temperature" (with quotes), and click OK.
21 Double-click the [New node...] item below the ElseIf("Flame temperature (°F)" > 2864) condition and select Else from the menu.
22 Double-click the child [New node...] item below Else, and select Variable=Formula from the list.  
23 In the Edit Formula dialog box, in the Variable field, type "Alarm ID" (with quotes).  
24 In the = Formula field, type 5, and click OK. An example value 5 that will later be used as the normal value for cases considered normal (not causing alarms) is assigned.
25 Double-click the [New node...] item below the Else condition, and select Variable= Formula from the list.
26 In the Edit Formula dialog box, in the Variable field, type "Dynamic Timestamp" (with quotes).  
27 In the = Formula field, type DTNow, and click OK. This step creates a new variable - Dynamic Timestamp - that will be populated with the current system time (by the means of the DTNow function) every time the Rules node is run. This will keep generated alarms fresh if this variable is used for alarm generation [if a variable with a constant value is used, and generated alarms are acknowledged] on the corresponding dashboard in Enterprise Manager), the next run would not produce alarms, because they have been acknowledged before].
28 Click OK in the Rules Builder dialog box.  
29 In the Rules dialog box, clear the Output Error variable check box.
30 Click OK.  

Deploy the workspace to Enterprise

1 In Statistica , select the Enterprise tab  
2 In the Enterprise group, select Deploy to Enterprise > Workspace.  
3 In the Choose Deployment Type dialog box, ensure that the Deploy New Object option button is selected, and click OK.  
4 In the Select a Data Configuration/DE Setup/SVB Data Configuration dialog box, ensure that the None check box is selected, and click OK.  
5 Enter the name Cyclones for the workspace.  
6 In the Select a folder dialog box, select the Alarm Trigger Test folder, and click OK.
7 Add read permissions for Everyone. The Cyclones workspace is displayed in Enterprise Manager in the Alarm Trigger Test folder.
8 In Statistica , with the Cyclones workspace open, select the Publish tab.  
9 Click Alarm Trigger to add an Alarm Trigger node to the workspace.  
10 Connect the Rules node to the Alarm Trigger node: click the yellow diamond icon on the Rules node and drag to the Alarm Trigger node.
11 Double-click the Alarm Trigger node to display the Edit Parameters dialog box.
12 Select a variable for the Timestamp / Sample ID field. Only one variable can be selected.  
13 Click the green arrow icon next to the Timestamp / Sample ID field. Since the Rules node and Cyclones-2 node connected to the Alarm Trigger node have not been executed (they are highlighted in yellow), a dialog box is displayed proposing to execute the parent node(s).
14  Click Yes. After execution of the parent nodes (they are now highlighted in gray and downstream documents have been produced, indicated by the scroll icon on the lower-right corner of the nodes), the Select Variables dialog box is displayed.
15 Select variable 15 - Dynamic Timestamp, and click OK.  
16 In the same manner, select v13 - Flame temperature (°F) into the Reference Value field, and v14 - Alarm ID as the Case Status Variable Name.  
17 Separate the default value AlarmID =  in the Alarm Code Prefix field with a space: Alarm ID =
Note: you can change the default name in this field. The name entered here will be the common prefix for the alarm codes in the Reporting Documents.
18 Set the Normal Status Value to 5.  
19 Use Additional Info / Additional Info Variable Name

For this example, leave the default False option button selected.

When the True option button is selected, a variable must be added in the Additional Info Variable Name field, and information from this variable is concatenated with the reference value and reported in the Alarm Auxiliary Data column of the Alarm dialog box after running a taskset.
20 Use Action Plans

For this example, leave the False option button selected.

When the True option button is selected, the Action Plan Repository Path field uses the default \STATISTICA Enterprise\. You can create reports containing instructions to be followed in the case of an alarm, and store the reports in Enterprise Manager. Modify the Action Plan Repository Path field to contain the actual path to the location of the reports in Enterprise Manager. The report name for a particular alarm must match the name (or value) of the corresponding alarm. In this example, the report for alarms corresponding to flame temperatures below 2100 F would be named Too cold, reduce temperature.str. When the Alarm Trigger workspace node is run, the Alarm report will contain the action plans for the respective alarms. Currently, images and formatting contained in the report will not follow through to the action plan appended into the report from the Alarm Trigger node, so include only textual instructions into an action plan report.
21 Click OK in the Edit Parameters dialog box.  
22 Save the workspace via the Save button on the Home tab (click Yes in the dialog box proposing to save back to Enterprise). A dialog box is displayed informing that this action was successful.
23 Click OK.  
24 Run the Alarm Trigger node by clicking the green arrow icon on the lower-left corner. The Reporting Documents node is produced.
25 Save the workspace to Enterprise Manager.  
26 In the Statistica workspace, double-click the Reporting Documents node and examine its contents. A Rules report is present in the Alarm Trigger folder.  
  • The report contains three alarms (each beginning with Alarm ID =).
  • The second line for each alarm begins with TimeStamp/SampleID = and contains the date and time corresponding to each alarm (matching the system time at the moment of the Rules node execution)
  • The row number is added in the third line of each alarm. It pertains to the case number of cases corresponding to each alarm in the input data source (in this example, output from the Rules node).
  • The fourth line of each alarm contains the reference value (an optional field, providing reference information - in this case flame temperatures corresponding to particular alarms).
27 Close the Reporting Documents workbook  

.  

Configure a taskset

1 In Enterprise Manager, browse to the Alarm Trigger Test folder, right-click it, and select New Taskset from the menu.  
2 Click the Add Task button next to the Tasks field.  
3 In the Select Analysis Configurations dialog box, browse to the Alarm Trigger Test folder, select the Cyclones workspace, and click OK.  
4 In the next dialog box, leave the Use same permissions as the Task check box selected, and click OK. The new Cyclones analysis node (latest version) is added to the taskset.
5 In the properties page, click the Add button located under the Return codes from SVB analysis to be considered Alarm Events field.  
6 In the Add SVB Return Code dialog box, type Alarm ID = Too cold, increase temperature (no quotes), and click OK.
7 Add another code: Alarm ID = Too hot, reduce temperature. Note that, for the correct alarm generation, codes provided in this field must match the alarms text exactly, i.e., additional spaces, characters appended at the end (for example, if code had been copied from some location), or misprints might prevent some alarms from being recognized when an analysis runs via the dashboard.
8 Select the New Taskset node. In the Alarm Rules section, click the Add Rule button. The New Rule 1 node is added to the taskset.
9 In the Conditions group box, from the Execute Action if drop-down list, select Any conditions are met  
10 In the same group box, click the Add button. In the Condition dialog box, click OK. Any task causes alarm(s) is displayed in the Conditions field.
11 In the Actions group box, click the Add button  
12 In the Choose an action dialog box, ensure that the Send an email option button is selected, and click OK.  
13 In the Send Email dialog box, enter your email address, and click OK. Send email to [email address] is displayed in the Actions field.
14 Select the New Taskset node, rename the taskset to Cyclones Taskset, and Commit the changes.  

Configure mail notification

1 In the Enterprise Manager tree view, browse to the System Options node, expand it, and select Mail Notification
Note: your Enterprise account [accessible in the Enterprise Manager tree view under the User Administration node for users with User Admin (ADM) permissions] must have the System Admin (SADM) permission to access this node.
2 In the SMTP host field, type the name of your SMTP mail server.  
3 In the Default sender group box, select the Use explicit email address option button, and type your email address in the field below it.  
4 Commit the changes.  

Configure a dashboard

  Select the Alarm Trigger Test folder, right-click it, and select New Dashboard from the menu  
  Enter a name: Alarm Trigger Test.  
  Click the Add Row button next to the Rows field.  
  In the New Row 1 properties page, click the Add Task button next to the Tasks field.  
  Browse to the newly created Cyclones Taskset in the Alarm Trigger Test folder, expand the node, select the Cyclones (latest) item, and click OK.  Commit the changes.  
  When prompted for permissions, add read permissions for Everyone, and Commit the changes.  
  In the Enterprise Manager tree view, expand the Monitor and Alerting Server node (located at the end of the list), expand Dashboards, and select the newly created Alarm Trigger Test dashboard
Note: in order to use the Monitor and Alerting Server option, you must have an Enterprise license that includes MAS, and your Enterprise account must have corresponding Dashboard User permissions).
  In the right pane, click the gear icon in the lower-right corner of the dashboard The TaskSet successfully scheduled for execution message is displayed.
   Click OK. Several seconds later, the gear icon changes to a running man icon, indicating that the taskset is running. When running is complete, the dashboard changes from green to red and a STOP sign icon is displayed on the dashboard. You will receive an email with notification when alarms are generated.
  Click the STOP sign icon on the dashboard. The Alarms dialog box displays. It contains a list of the detected alarms and the corresponding alarm details described in the columns:
  • Alarm Code
  • Alarm Details
  •  Auxiliary Data
  • Characteristic
  • Sample ID: Contains the date and time information pertaining to generated alarms.
  • Alarm Creation Time
  Click the Acknowledge All and Close button.
Note: your Enterprise account must have Alarm Admin (ALRMADM) permission to perform this action