flow not triggering.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2023 10:49 PM
I have created a flow with "Scheduled trigger" and an custom action to execute when flow is triggerd.
Trigger
Action
Run fix Script is a custom scripted action
1) I have not created any input or output variable. I have only added the script in the steps section.
the script is
(function execute(inputs, outputs) {
// ... code ...
var orcat = new GlideRecord("cmdb_ci_db_mssql_database");
//orcat.addEncodedQuery("install_status=1^last_discovered<javascript:gs.beginningOfLast7Days()^support_group=10a31fbfdb056a002cfef7adae961991");
orcat.addEncodedQuery("name=1C8RIB_Crimea");
orcat.query();
gs.log("flow designer one total: " + orcat.getRowCount());
while (orcat.next()) {
gs.log("flow designer one status of "+ orcat.name + " is: "+ orcat.install_status);
orcat.setValue('install_status', '2');
orcat.update();
gs.log("flow designer one working fine");
}
})(inputs, outputs);
But the Flow is not getting triggered?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2023 12:50 AM
@Hrishabh Kumar Did you test the flow using the test button available on the flow, does it print the logs during the test run? Also, do you have this flow in Global scope or a scoped application? If this is part of Scoped application then gs.log will not work there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2023 02:41 AM
It is working when I manually test the flow, but it does not trigger automatically.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2023 07:43 AM
Try changing the trigger condition to run it every minute save the changes and activate it. Ideally the flow should run every minute if it does restore the trigger condition back to your previous settings if it doesn't then convert your flow to a subflow and trigger it using a scheduled job which runs daily at your specified time.