28 Nov 2025
09:00 AM
- last edited on
18 Dec 2025
07:25 AM
by
MaciejNeumann
28 Nov 2025 09:45 AM
Hi @MarwanC
Maybe I do not understand your request well.
In case on Davis Problem trigger there are two options active and active or closed:
In case of Davis event trigger you can use this DQL:
fetch events
| filter matchesValue(event.status, "CLOSED")
I hope it helps.
Best regards,
János
17 Dec 2025 12:28 PM
Thanks indeed. In order to summarise this to other as well, there different places where you can focus the type of the trigger event when it comes to your workflow
1) In the trigger box, there is a pulldown menu which you choose, active or active or closed, this will give you the otion, it will be nice to have a feature to have the closed aswell.
2) You can also implement a gate box to allow what you need ACTIVE or CLOSE like this:
import { execution } from '@dynatrace-sdk/automation-utils';
import { settingsObjectsClient } from '@dynatrace-sdk/client-classic-environment-v2';
import { result } from '@dynatrace-sdk/automation-utils';
export default async function ({ execution_id }) {
const exe = await execution(execution_id);
const eventContext = exe.event(); // Access the event payload
const problemId = eventContext['event.id']; // Extract the problem ID
const displayId = eventContext['display_id']; // Extract the problem Display ID
const eventStatus = eventContext['event.status'];
console.log('Problem ID (Used in the API):', problemId);
console.log('Problem Display ID (Used in the Problems APP):', displayId);
console.log('Problem Event Status:', eventStatus);
console.log('Payload:', eventContext);
// ✅ Check if eventStatus is not CLOSED
if (eventStatus == 'ACTIVE') {
console.log("eventStatus=", eventStatus);
return 0;
}
return {
problemId,
displayId,
eventStatus
};
}
and in the next task you stop the workflow by a matcher in the condition section of the task: {{ result("gate") != 0 }}
So overall you can control the workflow by filter at the top or using gates.
One important thing as well to mention is very important to add a wait task at the begining of the workflow as the trigger can go go out of control when problems flooding can occur.
Hope this helps you in your workflow design.
Featured Posts