Rock U - Workflows - Workflow Performance Tips

Transcribed Video Content

So let's look at some workflow performance tips. The first tip is knowing that the act of persisting a workflow is very expensive especially the first time you persist it. So remember persisting is kind of saving the workflow. So it's the save button. So as an example, picture you open up Word, you type in a document and you hit save that first time. That first time you hit save in a workflow takes a lot of time. So only persist workflows if you really need to. Now, there are a lot of cases where you actually really don't need to persist a workflow. If you're doing some entity triggers, those don't need to be persisted. It's only needs to be persisted if you wanna see the results of it over time or see the results of it at a certain time. So it might be that with a lot of these workflows, you persist it when you start but you end up, not really not really keeping it around. So you might, again, as you're starting to create it, you'll persist it and then later once it's working fine, just remove the persistence. If you don't persist your workflow, if you don't need to persist your workflow, it can be a lot faster. Also, just look at the processing intervals. In the processing interval is how often is the workflow engine gonna kick up and and run every one of your active workflows. In a lot of cases, workflows don't even need to be processed in this way because they're always being pushed forward by user entry and those get fired off into emails and people come back and keep pushing it forward. So look at your workflow, try to understand, , how often does the system actually need to wake up your workflow to check to see if it needs to be if any action needs to take place. Again, you'd maybe you do need to do this a little bit but just make sure you put the right interval in there. Is it hourly? Is it every ten minutes? Is it daily? Or even less than that. Also make sure you complete activities and workflows as soon as possible. So as soon as that the state is is in a place where you can stop the workflow or stop even an activity within the workflow, go ahead and do that. That just brings down the overhead on the workflow engine. And when you start to have hundreds or even thousands of these workflows that are active at any given time, it can drastically, reduce the load on your system. Another thing to be considerate of is when you start having filters in your actions, just know that those filters that sometimes can keep your workflows from completing or keep even your activities from completing. So just make sure that you review the logic of those and the impact it's gonna have on the completion of your activities and your workflows. And the last tip too is to look at logging. So logging is very key when you're creating your workflow because you want to know what's going on and you might use logging to kind of track that. You can even write into a log in certain places to see what the state of certain attributes are. But when you're all done, when the workflow is working well, consider turning down your logging level to nothing or to something that's not as, robust as as logging everything, until you need to actually turn it back on to check for an issue. Keeping logging at a high rate can add a lot of load to your system. So these are some of the tips that we, think that you should know about to keep your workflows running quick and have minimal impact on your system.