Hi all,
I have a scheduled workflow and sometimes it doesnt give the proper results like I feel it gets stuck with the previous results. For example my workflow has an intersection activity and the intersaction is very simple using email as a key to find the entries and it returns 0 when the 2 inputs are having the same email, or some other times I have a fork which doesnt send the proper results to the 2 outputs so If I stop the workflow and I run it manually it works perfectly fine. At this point I feel like I have to clean the memory after the workflow is completed when it is scheduled so that the next will have empty memory and it will not throw any bad results. Any sugestions to this issue?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi Abraham,
You can write a JS to purge the workflow logs using the workflow id and then start it.
Follow the below sequence :
There are predefined js functions to do all the above 3 activities in just one code and you can automate this so it does not require manual effort for clearing the logs.
Frequency you can set once per fortnightly/monthly.
Multiple recurring workflows on the platform often makes the workflow in a deadlock state with loads of logs.
Hope this solution helps.
Regards,
Anita
Hi,
Workflow does not store anything once it has finished execution.
It could be possible, your workflow has not finished it's execution before next execution.
Do you have a test activity to check workflow status before proceeding to execution of workflow.
If not, you can follow below steps to avoid workflow running if earlier run has not finished.
1) Define an option - 'isWorkflowRunning'.
2) In workflow, first check value of this option. If it's zero then proceed to execution of workflow activities. If not, then end your execution.
3) After test activity, have a JS, where you will set the value of this option variable as '1', indicating workflow is running.
4) At end of workflow execution, in your end activity, reset option variable value to '0'.
Thanks.
Views
Replies
Total Likes
Hi, Do I have to check if the workflow gets completed even if it is always on "started" mode? , because my workflow is scheduled and it runs every hour, so everytime I am monitoring it the status is "started"
Views
Replies
Total Likes
Views
Replies
Total Likes
Hi Abraham,
You can write a JS to purge the workflow logs using the workflow id and then start it.
Follow the below sequence :
There are predefined js functions to do all the above 3 activities in just one code and you can automate this so it does not require manual effort for clearing the logs.
Frequency you can set once per fortnightly/monthly.
Multiple recurring workflows on the platform often makes the workflow in a deadlock state with loads of logs.
Hope this solution helps.
Regards,
Anita
Views
Replies
Total Likes
Views
Replies
Total Likes
Hi Abraham,
How frequent your automated wf runs and also if it involves multiple activities try stopping->purging->start after every run so that it does not end up in a deadlock state or you can start over creating a copy of this workflow.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies