I've got an interesting one this morning. I have a workflow for which all starting rules/schedules are disabled. This was done on 7/21/17. I came into the office this morning to see that this workflow had run on it's old daily schedule over the weekend. Additionally, it was running an old version of the workflow (version 78 as opposed to the current version 109). Is there a way to forcibly re-sync rules/schedules for this sort of thing?
Question
Question
Workflow with disabled rule still running
Answer
The rules are not versioned. However, since you mentioned schedules, you might want to check Windows Tasks Scheduler. You'll need to turn on "show hidden tasks" and look for the schedules that start with "WF8". They should match the active/inactive status you set in Workflow. Depending on the OS version, there's a chance the Workflow server's service user might not have rights to properly disable the schedule.
Replies
Are these workflows long running jobs or did they start since the changes took place? What is the "start time" on the running workflows?
New workflow instances always start on the latest version of definition. Any chance the SQL database was reverted to an older version?
Yes, they should always run the latest version. Which is why I'm thinking that maybe an old copy was saved somewhere and it's looking in the wrong location. I've verified the network path of the saved file though and tried republishing multiple times. The version number is updating to 79, 80, etc, rather than increasing from the version 109 shown in the workflow's actual properties in the canvas.
The Workflow Server only looks in one place for the Workflow definition, the SQL database. Locally saved copies are not used for starting workflows.
The version shown on the canvas is the file version, not the published version. If you make edits and save it locally without publishing, the file version can drift from the published version significantly. The published version only get increased when a workflow is successfully published.
Okay, well it's not that I'm overly concerned about the version number itself, I can live with those not matching. But I always republish when I save a new version. So I guess I'm not understanding why the starting rules aren't being enforced/updated properly. If I had a workflow disabled, how was it running at all?
The rules are not versioned. However, since you mentioned schedules, you might want to check Windows Tasks Scheduler. You'll need to turn on "show hidden tasks" and look for the schedules that start with "WF8". They should match the active/inactive status you set in Workflow. Depending on the OS version, there's a chance the Workflow server's service user might not have rights to properly disable the schedule.
I think this is the issue! The Windows Task Scheduler shows these as "Ready" whereas the Workflow Designer shows "Disabled". Will look into the account permissions. Thank you!!!
Hi All,
Circling back to this, I've discovered what I think is a bug. In the rule manager tab. If you right click and disable the starting rule like this:-
The rule isn't actually disabled even though it shows a red x.
If you double click the red x and green tick to toggle the rule on and off this does work. There seems to be a bug whereby if you use the right click method, it doesn't disable the rule, and it still fires.
Happy to raise this as a support case if it's easier.
Cheers!
Chris Douglas
Could you check if the underlying Windows scheduled task gets enabled/disabled too when you flip the status on a scheduled workflow?
The task will be named something like WF8_<server_Name>_WF<id>_R<id> which you can get from the Schedules node in the Workflow Admin Console.
Hey Miruna,
This wasn't a scheduled starting rule, it was a conditional rule, and it did show as disabled in the WF admin console too, but was still firing!
Cheers!