Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

AEM 6.4 Workflow models location

Avatar

Avatar
Validate 1
Level 2
dzmitryk7401781
Level 2

Likes

4 likes

Total Posts

8 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 3
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
dzmitryk7401781
Level 2

Likes

4 likes

Total Posts

8 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 3
Boost 1
Affirm 1
View profile
dzmitryk7401781
Level 2

17-04-2018

Hi,

I am trying to programmatically start workflow instance based on a particular model.

Here is a sample code which would work in AEM 6.2:

WorkflowModel wfModel = wfSession.getModel("/etc/workflow/models/dam/update_asset/jcr:content/model")

//...

wfSession.startWorkflow(wfModel, wfData)

Now, it seems like workflows were refactored in 6.4, and according to Workflow Best Practices I should find workflow models at /libs/settings/workflow/models/

Under this path there is indeed something that looks like model definition (although named 'flow'), but it's not exactly what getModel method accepts as a valid model path.

So the question is simple: what path I should supply in order to instantiate WF model?

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,356 likes

Total Posts

3,227 posts

Correct Reply

917 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,356 likes

Total Posts

3,227 posts

Correct Reply

917 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

08-05-2018

Hi,

To start workflow, you need to get model from var folder i.e.

WorkflowModel wfModel = wfSession.getModel("/var/workflow/models/request_for_activation");

Answers (8)

Answers (8)

Avatar

Avatar
Validate 1
Level 1
marvinf30118885
Level 1

Likes

2 likes

Total Posts

3 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
marvinf30118885
Level 1

Likes

2 likes

Total Posts

3 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
marvinf30118885
Level 1

08-05-2018

Did you try using

Also found here:

Workflow Best Practices

Avatar

Avatar
Validate 10
Level 4
sreenu539
Level 4

Likes

7 likes

Total Posts

158 posts

Correct Reply

1 solution
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 20
View profile

Avatar
Validate 10
Level 4
sreenu539
Level 4

Likes

7 likes

Total Posts

158 posts

Correct Reply

1 solution
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 20
View profile
sreenu539
Level 4

31-10-2018

yes admin/admin. I have even disabled all custom launcher configs that didn't help. took out all the custom workflows models from conf/global, var/workflow that either didn't help.

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,356 likes

Total Posts

3,227 posts

Correct Reply

917 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,356 likes

Total Posts

3,227 posts

Correct Reply

917 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

31-10-2018

Are you running this as admin? If yes then there could be issue with upgrade.

Avatar

Avatar
Validate 10
Level 4
sreenu539
Level 4

Likes

7 likes

Total Posts

158 posts

Correct Reply

1 solution
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 20
View profile

Avatar
Validate 10
Level 4
sreenu539
Level 4

Likes

7 likes

Total Posts

158 posts

Correct Reply

1 solution
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 20
View profile
sreenu539
Level 4

30-10-2018

Upgrading to AEM 6.4.2

I saw javax.jcr.AccessDeniedException: OakAccess0000: Access denied once I deploy client application code on 6.4.2

then I tried following but didn't help much.

Fresh aem 6.4.2

localhost:4502/aem/start -> assets -> files -> file upload  ---- worked

install client application code (worked in 6.2 aem) - deployed on aem 6.4.2

file upload --- not working. - image is blank.

What I did : edit and sync workflows -> generated client application custom workflows  in new folder structure /conf/global, var/workflow

made code restructuring of etc/workflows into /conf/global, var/workflow

changed references in client application custom workflow from /etc/workflow -> libs/settings/workflows, libs/workflow/scripts/, conf/global, var/workflow ../request_for_activation

I do see instances of upload_asset running in localhost:4502/workflow, I do not see errors ( access denied errors) in error.log file.

I do not see image uploaded though. it is blank. - Any ideas??

Avatar

Avatar
Validate 10
Level 4
sreenu539
Level 4

Likes

7 likes

Total Posts

158 posts

Correct Reply

1 solution
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 20
View profile

Avatar
Validate 10
Level 4
sreenu539
Level 4

Likes

7 likes

Total Posts

158 posts

Correct Reply

1 solution
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 20
View profile
sreenu539
Level 4

30-10-2018

AEM 6.4.2

I do not see my application custom workflows at http://localhost:4502/libs/cq/workflow/content/console.html  why ?

I have custom workflows code below - /conf/global/settings/workflow/dam/my-dam/ ....

I have changed code references in content.xml files of workflows

FROM  workflow="/etc/workflow/models/dam/my-dam/dam-assets-custom-writeback/jcr:content/model"/ >

TO   workflow="/conf/global/settings/workflow/models/dam/my-dam/dam-assets-custom-writeback/jc r:content/model"/>

I do not see any node called "model" below "/conf/global/settings/workflow/models/dam/my-dam/dam-assets-custom-writeback/jcr:content "

please help me.

Avatar

Avatar
Validate 1
Level 2
dzmitryk7401781
Level 2

Likes

4 likes

Total Posts

8 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 3
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
dzmitryk7401781
Level 2

Likes

4 likes

Total Posts

8 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 3
Boost 1
Affirm 1
View profile
dzmitryk7401781
Level 2

08-05-2018

Thanks, this is it.

I wonder what is the reason to put models there, never would be looking for it under var.

Avatar

Avatar
Validate 1
Level 2
dzmitryk7401781
Level 2

Likes

4 likes

Total Posts

8 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 3
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
dzmitryk7401781
Level 2

Likes

4 likes

Total Posts

8 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 3
Boost 1
Affirm 1
View profile
dzmitryk7401781
Level 2

08-05-2018

Hi,

Neither of those locations acceptable for wfSession.getModel method. So it does not solve problem, even though documentation states those are locations for the models.

Avatar

Avatar
Give Back 50
Employee
Kunwar
Employee

Likes

65 likes

Total Posts

253 posts

Correct Reply

72 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile

Avatar
Give Back 50
Employee
Kunwar
Employee

Likes

65 likes

Total Posts

253 posts

Correct Reply

72 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile
Kunwar
Employee

08-05-2018

Starting 6.4, all OOTB workflows would be under /etc/workflow/models but any change you do in these OOTB models, would create an overlaid models under /conf folder

This would be helpful down the line once you upgrade to newer version of AEM and there won't be any dependency on adjusting/repackaging your workflow as apart of pre-upgrade process. Custom workflows would be migrated from /conf with ease.