Execute triggers conditionally
MetricBase triggers execute based on a single metric. Condition Scripts impose additional requirements that determine whether a trigger kicks off a flow.
시작하기 전에
이 태스크 정보
Condition Scripts execute when conditions for a trigger are met but before the trigger executes a Workflow Studio flow. In that way, Condition Scripts can prevent triggers from executing flows even when trigger conditions are met. For example, data often fluctuates over time. Small fluctuations can cause unwanted, duplicate triggering events. A Condition Script can prevent that erroneous duplication.
Condition scripts are sometimes also referred to as moderator scripts.
Condition Scripts always return true (trigger) or false (do not trigger). To learn how to write these scripts, see Scripting in ServiceNow Fundamentals. To experiment with scripts, see Get familiar with MetricBase APIs.
프로시저
다음에 수행할 작업
You can also associate a condition script with a trigger flow in the MetricBase Trigger Flows [sys_flow_metric_trigger] table. If you associate a condition script with a trigger flow here, it won’t appear in Workflow Studio, but it will still execute with the trigger.