Highlighted

Workflow model is not refreshed. Old version is used

Avatar

Avatar

Marek_Krokosins

Avatar

Marek_Krokosins

Marek_Krokosins

31-03-2018

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)

Replies

Highlighted

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K
smacdonald2008

31-03-2018

This sounds strange - if you have the exact workflow as you have on your fresh environment - you should be getting the same results. So the community better understands - can you please post a screenshot of your model.

Highlighted

Avatar

Avatar

Marek_Krokosins

Avatar

Marek_Krokosins

Marek_Krokosins

31-03-2018

that is not possible. Simple or split with default steps and two branches.

What I can add, is that I'm editing default Request for Deletion workflow.

Highlighted

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K
smacdonald2008

01-04-2018

I have asked the AEM workflow Eng team to look here. If the workflow works on 1 instance and if you setup the same workflow and all the dependencies properly - it should behave the same way.

Highlighted

Avatar

Avatar

Marek_Krokosins

Avatar

Marek_Krokosins

Marek_Krokosins

01-04-2018

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.

Stack trace:

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).2018-04-02_01h20_29.png

Highlighted

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K
smacdonald2008

01-04-2018

This could also be a bug in the existing server not present in the fresh install - I asked our support team to look here.

Highlighted

Avatar

Avatar

kautuk_sahni

Community Manager

Total Posts

5.6K

Likes

961

Correct Answer

1.1K

Avatar

kautuk_sahni

Community Manager

Total Posts

5.6K

Likes

961

Correct Answer

1.1K
kautuk_sahni
Community Manager

02-04-2018

Which version are you on?

Nothing that we can find out with latest AEM version.

Request you to create a Support ticket for this.

-Kautuk

Highlighted

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K
smacdonald2008

02-04-2018

Support stated:

It could be two reasons.

  1. Force class re-compile
  2. Run offline compaction.

If those above does not work, have them to log the case.

Highlighted

Avatar

Avatar

Marek_Krokosins

Avatar

Marek_Krokosins

Marek_Krokosins

02-04-2018

It's AEM 6.3 SP1 with CFP 2,

I will try to do both things smacdonald2008, however that would be a big coincidence if offline compaction would work on both environments.

Highlighted

Avatar

Avatar

Marek_Krokosins

Avatar

Marek_Krokosins

Marek_Krokosins

02-04-2018

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.