Community
Timer trigged flows overrides the statuskey "stop" with "completed"
I make a flow like like this:
![](https://files.readme.io/20dd1ad44c8bd369bc92aa5911d5e2417fab964d300906bb8ed4b179e2711bbd-image.png)
![](https://files.readme.io/07dec11a687d65c5eb5fa36aaad7418cba7b8db5ffe2e537c8ab8c07f963ded7-image.png)
It works as intended and the result in /admin/processes is:
```
"status": {
"statuscode": 999,
"data": {
"dummy": "dummy"
},
"statuskey": "stop",
"statusmessage": "string",
"name": "Stopped",
"error": true
},
```
Now I add a timer to the flow.
The result will now be:
```
"status": {
"statuscode": 999,
"data": {
"dummy": "dummy"
},
"statuskey": "complete",
"statusmessage": "string",
"name": "Completed",
"error": true
},
```
All parameters are the same as I sent in status, except statuskey that does not accept "stop" and will show "complete" and the name "Completed".
Here is how it looks in the list:
![](https://files.readme.io/b430252e871c6ec08e06522ba83eaa700d68ccfcebd6626cc4a12a78b2dbd82b-image.png)
I was under the impression that "Stopped" could and should be used for when an error occurs like this:
![](https://files.readme.io/bae3756df716528d86c7411b9148416bdb504244001c1e1c013b7ebd2b0b8a61-image.png)
It also makes it easy to search for stopped/failed processes in /admin/processes (visually, as this field is a visible field). (I of course understand that to get the real errors you could search for status.error:true.)
Can a timer triggered flow never get the status "Stopped"?
Is it by design or a bug?
If it is not a bug you might wanna add something about this to the documentation, for example after this section
<https://support.onify.co/docs/workflows-2#process-status>
```
Process status
The status is something that is set for the entire process, not for a specific state.
Here are the different statuses that can be set:
continue - To continue the process
complete - The process should be considered completed with success
pause - The processes should be considered to be paused
stop - The processes should be considered to be stopped
To mark something to be wrong, set error to true.
You can update process status via flow or via API.
```
If could say "Note: Timer triggered flows will always be considered completed after running, so there is no need to try and stop them".
In <https://support.onify.co/changelog/onify-hub-api-2110-released> it says
"improve: support for nonpersistent processes (and workflows)
Process flow will run to end without possibility to be resumed or return any output
Process state and status is still possible to update and retrieve
**If the flow stalls for some reason, e.g. by a long running timer or waiting for user input, the process will be stopped**"
You might wanna add there too that is not the case for timer triggered flows, if it is by design.
PS. I hope its a bug that can be corrected, because to me it is strange that a flow that was interrupted by an error and not "completed" should have the status "completed". I'll send the bpmn-files if you need them.
Posted by Dennis about 15 hours ago
How can Onify agent access a process?
I try to launch agent script from a workflow. When I use onifyApiRequest in async mode, the agent seem not be able to signal to the process when the script is completed. The agent script get executed, but the flow gets stuck waiting response of agent task. I get this error to Onify app log:
`DEBUG client (403): Agent user agent do not have permission to access process (06bdead772f34b23913e79f5ccaa7b7e)`
How can I give priviledges to agent for accessing the process data and letting it to signal the process when agent task is completed?
Posted by Vesa Jolkkonen 7 days ago
How long ahead are timer triggered flows and their resources put in queue?
I have a flow that runs every 10 minutes.
At 15:07 I uploaded a new resource (js-files) and synced it.
In /admin/processes I can see that:
At Startdate 15:09 the old resource was still used (it has a different amount of states than the new one so very easy to see the difference just by looking in that column). I was told that the worker runs in 90 seconds cycles so this seems fine.
At Startdate 15:11 I triggered the flow manually and I can see that the new resource was used.
At Startdate 15:18 still the old resource was used by the timer triggered flow.
At Startdate 15:28 still the old resrouce was used by the timer triggered flow.
At Startdate 15:38 the new resource which I uploaded at 15:07 was finally used in the timer triggered flow.
<br />
How long ahead are timer triggered flows and their available resources put in queue? More than half an hour seems like a stretch.
I'm searching support.onify.co for "timer" and "worker" but can't find much information about how this works and what to expect. Maybe I'm using the wrong search phrase?
Posted by Dennis 8 days ago
Feature request: Use a generic or assignable username for flows triggered by timer
In /admin/processes the column "User" shows
1. For manual triggered flows - the name of the user who triggered it
2. For timer triggered flows - the name of the user who last published the flow
Point 2 will make it hard to distinguish if a flow was triggered manually or by timer.
Also if you just want to filter on processes triggered by user xxx you will get a lot of false positives.
Finally - if you remove this user, maybe the person started at another company, the flow will not be triggered at all until you republish it with an existing user!!!
It wood be good if all flows triggered by timer had a generic username like "Timer" to distinguish them.
Or it could be definable in a setting like /admin/settings/user_name_to_trigger_timerbased_flows
Posted by Dennis 8 days ago
Only the first 10 items in /admin/processes has the checkbox in the field "Flow" checked
![](https://files.readme.io/516678694a7cf44c507948b63ce7c5cffbc61d515dc83fb90468cd663a8a61e8-image.png)
<br />
If I go to /admin/processes?term=workflow:<any-flow> it seems only the first 10 items in the list in the field "Flow" will have the checkbox checked.
This seems similar to the fix in 2.12.3:
fix: schedule and nextRunAt fields in admin interface when listing workflows
Maybe that fixes this field too (I did not install it yet, so I don't know) but as the fix mentions two specific fields in another view, it might not. Just so you can check it.
Posted by Dennis 8 days ago
How do I add a shortcut for a specific customer?
We need to create a shortcut for a specific customers, e g with the role: company-customer-xxx.
I am testing it by modifying an existing shortcut and on top of the roles ["Admin", "User-RW"] add the role "Customer: XXX".
However, this does not work - the button is still visible to everybody with User-RW too, as the roles use OR.
I realize adding an extra role to the users, like ShowButtonX, and then adding that role to the users and the button probably solves this.
But the users roles are probably overwritten each time they are indexed/updated and whatβs more - this role needs to be added for all new users in that company as well. So that method means changing a lot of the logic in a other places and flows.
It would be so great and simple if we just could add a button and tell that users with the role Admin OR (User-RW AND company-customer-xxx) should see it.
Is there some better way to accomplish this? :)
Posted by Dennis 9 days ago
Direct links to processes, for example /admin/processes/<processid>/view does not seem to work
It's great that you can grab the direct url to almost anything within Onify and bookmark it or save it for future reference. However there is one direct link that doesn't work as the other.
If I copy something like /admin/processes/<processid>/view from the address bar and paste it in a new tab it will just go to /admin/processes. I have to extract the processid from the url and paste it in the search field and then open it again. Not a biggie, but it would be great if the direct links worked everywhere. :)
Posted by Dennis 22 days ago
Updating items through the endpoint /admin/bulk/items changes the created date
Making changes to an item directly at /admin/items with the "edit" pencil icon leaves the "Createddate" untouched and updates the "Modifieddate" correctly.
However, updating existing items with the endpoint /admin/bulk/items gives a result like:
{ignored: 0, took: 8, created: 0, deleted: 0, updated: 35}
and sets both the "Createddate" and "Modifieddate" of the updated items to the actual date, making it a bit misleading and somewhat unusable.
Is there some way to get an update to leave the "Createddate" alone for already existing items? π
Posted by Dennis 23 days ago
Search works differently with mailadresses in /search and /admin/items - is there a setting where we can change this?
These work the same:
/search?term="[[email protected]](mailto:[email protected])" -> 1 result
/admin/items?term="[[email protected]](mailto:[email protected])" -> 1 result
These work differently:
/search?term=[[email protected]](mailto:[email protected]) -> 1 result
/admin/items?term=[[email protected]](mailto:[email protected]) -> 999 results (shows everybody in the company with "domain.com" anywhere within the item)
It seems /admin/item does not consider [[email protected]](mailto:[email protected]) to be one (1) string but many strings, divided by the @ sign.
Is there a setting we (or you) can adjust so they work the same?
ChatGPT suggests
> To handle email addresses as single terms, you can configure a custom analyzer in your Elasticsearch index settings. This custom analyzer can use the keyword tokenizer, which treats the entire string as a single token. Here's how you can define and use a custom analyzer in your Elasticsearch index:
```json JSON
{
"settings": {
"analysis": {
"analyzer": {
"email_analyzer": {
"type": "custom",
"tokenizer": "keyword",
"filter": ["lowercase"]
}
}
}
},
"mappings": {
"properties": {
"email": {
"type": "text",
"analyzer": "email_analyzer"
}
}
}
}
```
Posted by Dennis 3 months ago
Is it possible to use the same time zone in data and result tables?
Dates are stored in ISO:
![](https://files.readme.io/2dd6d7b-image.png)
and the search query in Onify admin uses this when searching.
However the result table which shows the results seem to show them in my local time (+2 hours) which can make strange results when searching with dates. π
![](https://files.readme.io/0ab6b68-image.png)
Is there a way to get them to use the same time zone? If not, consider this a feature request to use one consistent way. Or even better - a toggle/setting which let me decide which format to use everywhere. π
Posted by Dennis 3 months ago