So I have a workflow model, which is used in one scenario. I have several environments. On the fresh environment my workflow model works as expected.
On existing environments it seems that it uses old version of the workflow. I would like to ask if workflow model are cached somewhere ? If yes, how can I purge the cache ?
If workflow models are not cached, what can be cause of such issue? In logs I get information that "No route found to continue from step node5". I'm sure that workflow model is correctly configured, because it works on new environment, so that's definietely something on AEM side. I can see in CRX that workflow is installed, I tried to save it again in the workflow model editor, but that didn't help. It fails on my second or split, It reaches or split and then it says that it cannot proceed to next step. Do you have any idea what can be wrong ?
I have tried to remove all instances of running and completed workflow model thorugh maintanance task, then I have removed workflow completely. I have reinstalled it through package but still I had the same issue. Of course restart of AEM instance also doesn't work.
I'm using AEM 6.3 SP1 (author)
Ok one more time,
Workflow is installed through package in crx package manager, exactly the same package is installed on 3 environments, one is fresh and two other are existing instances (author). On fresh it works, on existing it fails.
It is default AEM workflow, which is changed (it's a request for deletion workflow, and AEM doesn't offer anything which would allow to run custom workflow when delete action is triggered by authors, that's why we must override default workflow).
I saw similar situation several times when I was developing custom workflows.
I understand that it should work the same - it's logical for me also, but it's not happening. Like I said, I cannot post model here, however it can be easly reproduced:
1. Edit Request for deletion step
2. Add or split with different conditions (2 branches)
3. Select 1 default branch
4. Add another split step with different conditions in one of the branches (2 branches)
5. Add items to those branches
6. Use this model on several environments
I saw in logs, that conditions are valid, proper values are set on properties, it seems that the flow is broken itself. My workflow after checking condition in one of the branches throws error that it cannot find next node. In crx node is present.
Additionally, I have attached image with structure of the model (as you can see, node7 has next step defined and it exists in the node structure).
I have solved this.
It super weird, but I have no time for debugging it right now.
So thing which fixed problem for me:
In Or Split I was using script file. In each branch.
I have removed path to the script and I made copy-paste of the script content into the text area of each script.
Because of some freaking reason, it has fixed the problem.
I have other custom workflow (the one with which I had problems was default delete workflow) which were using script files, and they seem to work properly, even though they are configured to use script from the file.
I have not change even a line of the script, and that is something which surprises me very much. It fixes the problem on all environments where it was designed.
Additionally, I noticed that I didn't have CFP2 installed locally on fresh environment, after installing it, workflow stopped working, and I had to apply fix which I described above. Maybe CFP2 introduced a new bug.