Input Nodes
About Input Nodes in Family Policies
Input nodes represent various items and values that you can use as inputs to the policy logic.
Because Input nodes provide successor nodes with values to evaluate, the first node in a policy model must be an Input node. A Query node, however, cannot be the first node in a policy model.
Input Nodes
Constant Nodes in Family Policies
A Constant node is an Input node that represents a specific value that does not change from one policy execution to another. You can use a Constant node for input values that are used in multiple places in the policy model.
The output of a Constant node is the value that you specify in the Value section of the node's Properties window.
Node Properties
The Properties window for a Constant node contains the items that are described in the following table.
Item |
Description |
Notes |
---|---|---|
Data Type list |
Specifies the type of data that the node represents. |
This property is not required, but selecting a value can help catch errors and facilitate policy execution. |
Value box |
Specifies the value that the node represents. |
If the data type for the Constant node is a Data Frame, then, on the Properties window, <DATAFRAME> appears in the Value box. You can select to access the Edit Data Frame window, in which you can view the Data Frame or configure its input values. |
Current Entity and Current Relationship Nodes in Family Policies
Current Entity and Current Relationship nodes are Input nodes that represent the APM entity or relationship family, respectively, that is associated with the family policy. You can use these nodes to access information that is stored in the record whose changes triggered the family policy.
- Any field in the record that triggered the family policy
- The following system fields in the family of the record that triggered the family policy: Entity Key, Content GUID, Entity ID, and Site Key
- The Current Entity node is available only for family policies associated with entity families and the Current Relationship node is available only for family policies associated with relationship families.
- There can be only one Current Entity or Current Relationship node in a single family policy.
Node Properties
Other than optionally specifying a name for the node, there are no properties to configure for a Current Entity or Current Relationship node.
Current Entity or Current Relationship nodes are often the starting point in policy models because they provide successor nodes with fields to evaluate. For example, consider an AfterUpdate family policy belonging to the Work History entity family. Using a Current Entity node, you could configure a policy such that, when the policy is triggered by a change in a Work History record, successor nodes evaluate whether or not the value in the Work Order Status field of the corresponding record has changed. If it has, the policy sends an email message to notify users of the change. In addition, the policy updates the related Recommendation record to reflect the new status of the work order.
Current User Nodes in Family Policies
A Current User node is an Input node that represents information associated with the currently logged in APM user (i.e., the user who makes the change that triggers the family policy).
- Any field in the Security user or Human Resource record for the logged in user.
- The following system fields in the Security User record for the logged in user: Entity Key, Content GUID, and Entity ID.
Node Properties
Other than optionally specifying a name for the node, there are no properties to configure for a Current User node.
Current User node
The following example illustrates how you can use the Current User node to access the current user's email address, which exists in the Human Resource family, and their User ID, which exists in the Security User family. Consider the following nodes and connections.
In this example, a Current User node named Engineer is connected to an Email Contact node and a Create Recommendation node.
As shown in the following image, you can use the Properties window for the Email Contact node to select the Current User node and the Email Address field in the Human Resource family.
Additionally, as shown in the following image, you can use the Properties window for the Create Recommendation node to select the Current User node and, in this case, the User ID field in a field in the Security User family.
Query Time Series Nodes
A Query Time Series node is an Input node that queries Time Series data for an asset that uses the Predix Time Series service. You can use the Query Time Series node to retrieve readings from the default Time Series data source.
The Query Time Series node, requires you to provide the Tag ID as an input to the node. For example, the Tag ID to query could be retrieved from other records in the APM database using a Query node, or, determined by the policy logic and constructed from other node outputs using a Text node.
A Query Time Series node generates the following outputs:
- Time stamp, which represents the time stamp value for the most recent reading.
- Value, which represents the most recent reading value.
- Quality, which represents the quality of the most recent reading. The quality of the reading is indicated by one of the values described in the following table.
Numeric Value Description 0 Bad Quality 1 Uncertain Quality 2 Not Applicable 3 Good Quality Note: You must use the numeric value when you configure the nodes in the policy to operate on Quality values. However, in a policy output (for example, the text output from an Email Contact node), the description will be displayed. The example in this topic shows how to use the Quality value in a Collection Filter node. - Collection, which represents all readings associated with the Time Series service within the specified time frame and maximum number of readings. Each reading in the collection includes time stamp, value, and quality details.
- Tag, which represents the ID of the Tag.
Node Properties
The Properties window for a Query Time Series node contains the items described in the following table.
Item | Description | Notes | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Time Series Tag | Specifies the ID of the Predix Time Series tag for which data will be retrieved | You can select to specify the output of a predecessor node in this section. | ||||||||||
Start Time | Specifies the beginning of the period within which the readings that you want to retrieve were recorded. | This is not a required field. However, we recommend that you specify an appropriate value in this field to retrieve the most relevant data. | ||||||||||
End Time | Specifies the end of the period within which the readings that you want to retrieve were recorded. | This is not a required field. However, we recommend that you specify an appropriate value in this field to retrieve the most relevant data. | ||||||||||
Max Readings | Specifies the maximum number of readings that you want to retrieve from the Time Series data source. | By default, 10000 readings are retrieved from the Time Series data source. However, as needed, you can specify any value up to the maximum number of points supported by the Time Series data source. Note: For best performance, we recommend that you specify the minimum number of readings required for the policy. | ||||||||||
Query Operation | Specifies the type of data you want to retrieve from the Time Series data source. | By default, raw is selected. However, as needed, you can select interpolated, average, or sum to retrieve the required data.
| ||||||||||
Interval (seconds) | Specifies the time interval in seconds. | This is required when query mode is Interpolated or Average; it is an optional field for Sum. This is the time interval in seconds that the query for interpolated or average data is based on. | ||||||||||
Interpolated Mode | Specifies the interpolation mode. | Interpolated mode field is required when query mode is Interpolated. |
Start Time | End Time | Max Readings | Result |
---|---|---|---|
Date 1 | No value | No value | Returns up to 10,000 earliest points starting on Date 1. |
Date 1 | No value | N | Returns up to N earliest points starting on Date 1. |
No value | Date 2 | No value | Returns up to 10,000 latest points ending on Date 2. |
No value | Date 2 | N | Returns up to N latest points ending on Date 2. |
Date 1 | Date 2 | N | Returns up to N points starting on Date 1 and ending on Date 2. |
No value | No value | No value | Returns up to 10,000 latest points ending on the current date. |
No value | No value | N | Returns up to N latest points ending on the current date. |
An example to help understand the use of Query Time Series node is provided in the Policy Designer documentation.
Query Nodes in Family Policies
A Query node is an Input node that represents a query that is stored in the APM Catalog. You can use a Query node to access the results of a specific query. The query will run each time the policy is executed so that the latest results are used in the policy execution. If the specified query contains prompts, you must use the node's Properties window to identify the values that should be provided to the prompts.
A Query node generates the following outputs:
- Result Set, which represents the results of the specified query. This output can be used only with successor nodes that are capable of handling collections.
- Any value in the top row of the specified query.
- A Query node cannot be the first node in a policy model.
- The Result Set is restricted to the 10000 rows of the query results.
Node Properties
The Properties window for a Query node contains the items that are described in the following table.
Item |
Description |
Notes |
---|---|---|
Query Path |
Specifies the path to the query that will run when the policy is executed. |
You can enter the path manually, or you can browse to the query by selecting . The query that you choose must have an ID and a caption. |
Query section |
Provides values to any query prompts. |
One Query section appears for each prompt in the selected query. The label that appears after Query: identifies the prompt caption. You can select to specify the output of a predecessor node in this section. |