Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Separate logger configuraiton for workflows

Avatar

Level 9

Hi All,

I have custom workflow and we are seeing issues while it's running but we are not getting any relevant information in error.log.

I heard to configure a separate log for workflows we need to include out of the box workflow packages.

If anyone knows please give me the those out of box packages and i will configure a log.

Thanks,

Kishore

1 Accepted Solution

Avatar

Correct answer by
Level 9

Finally ,

I have solved this issue by following below steps.

And observed my instances folder is created with incorrect sling:resourceType not sure why it's creating like that.

http://aemtips.blogspot.in/2013_05_01_archive.html

Issue while initiating workflow

 

 

Problem: I've deleted 'instances' folder inside /etc/workflow/ directory.  When I initiate the workflow, the folder 'instances' is automatically created under /etc/workflow/ but the workflow is not triggered on the payload.

Solution:

  • Make sure to delete the instances folder.
  • Save the changes
  • Create a instances node of type sling:folder
  • To the instances node add a property sling:resourceType with value equal to ‘cq/workflow/components/instances’

        Also add property jcr:title Instances

  • Restart the workflow bundle from felix console or restart the instance    

View solution in original post

16 Replies

Avatar

Level 10

If you are writing custom java classes that work with your workflow, the you can create separate logger.

URL: http://localhost:4502/system/console/configMgr ( Refer Attached Image )

Please go through AEM Logging Documentation

[img]AEM Logging.png[/img]

Avatar

Employee

Hi,

"we are seeing issues while it's running" What issues are you seeing? 

Create a new logger for "com.adobe.granite.workflow" and set the login level to trace

Regards,

Opkar

Avatar

Level 9

Opkar Gill wrote...

Hi,

"we are seeing issues while it's running" What issues are you seeing? 

Create a new logger for "com.adobe.granite.workflow" and set the login level to trace

Regards,

Opkar

 

I making changes to my workflow and changes are not saving.Save button on workflow model GUI is always enabled.

seeing below exception

01.08.2015 10:31:22.569 *TRACE* [155.64.223.66 [1438446682530] GET /libs/cq/workflow/content/console/workflows.json HTTP/1.1] com.adobe.granite.workflow.core.WorkflowSessionImpl getModels called from:
java.lang.Exception: null
    at com.adobe.granite.workflow.core.WorkflowSessionImpl.getModels(WorkflowSessionImpl.java:329)
    at com.adobe.granite.workflow.core.WorkflowSessionImpl.getModels(WorkflowSessionImpl.java:260)
    at com.adobe.granite.workflow.core.WorkflowSessionImpl.getModels(WorkflowSessionImpl.java:246)
    at com.adobe.granite.workflow.console.servlet.WorkflowListServlet.doGet(WorkflowListServlet.java:90)
    at org.apache.sling.api.servlets.SlingSafeMethodsServlet.mayService(SlingSafeMethodsServlet.java:268)
    at org.apache.sling.api.servlets.SlingAllMethodsServlet.mayService(SlingAllMethodsServlet.java:139)
    at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:344)
    at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:375)
    at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:533)

Avatar

Employee

Hi,

when you go to "http://localhost:4502/crx/de/index.jsp#/etc/workflow/models/dam/dam_download_asset" open the "Access Control" tab and you will see which groups have permissions to edit the workflow.

Open your workflow and see what permissions your user has, I take it you are not logging in as an admin user?

Regards,

Opkar

Avatar

Level 9

Opkar Gill wrote...

Hi,

when you go to "http://localhost:4502/crx/de/index.jsp#/etc/workflow/models/dam/dam_download_asset" open the "Access Control" tab and you will see which groups have permissions to edit the workflow.

Open your workflow and see what permissions your user has, I take it you are not logging in as an admin user?

Regards,

Opkar

 

The user with whom  i am trying to start the workflow is part of "administrators" group.

Do I need any more extra permission to start workflow?

Avatar

Employee

Hi Kishore,

did you look at the permissions in CRXDE for the workflow you are trying to edit?

By default there are two groups: workflow-users, workflow-editors. Like I said, check the permissions.

Regards,

Opkar

Avatar

Level 9

Thanks Opkar,i have followed the instructions sent by you and i see workflow-editors has permissions on /etc/workflow/models and it's same as /etc/workflow/models/dam/dam_download_asset  

workflow.

Now i have added user to workflow-editors group and tried to start the workflow but no luck.

Once Again Thank You.

Avatar

Employee

How are you attempting to start the workflow?

Did you add a payload to it before starting it?

https://docs.adobe.com/docs/en/aem/6-0/administer/operations/workflows/wf-start.html

Avatar

Level 9

Selecting page in site admin and then right click on it selecting workflow option from context menu,select workflow name.

I have followed the same steps mentioned and added payload but workflow is not starting.

Thanks,

Kishore

Avatar

Level 9
I got below response when hitting http://<hostname>:<port>/libs/cq/workflow/content/console/workflows.json {"workflows":[{"wid":"/etc/workflow/models/eLibrary-Approval-Workflow/jcr:content/model","label_xss":"eLibrary Approval Workflow","label":"eLibrary Approval Workflow","description_xss":"No Description","description":"No Description","isCqPage":true}],"results":1}

Still seeing same exception.

Avatar

Employee

You only have a single workflow in your system?

When you go to the launcher tab, is your workflow definitely enabled? /libs/cq/workflow/content/console.html

Is the runmode the right one for the instance you are testing this? (You are on the author instance, right?)

Regards,

Opkar

Avatar

Employee

Are you stills seeing the same error you posted previously?

What happens when you hit the url: http://localhost:4502/libs/cq/workflow/content/console/workflows.json

Regards,

Opkar

Avatar

Correct answer by
Level 9

Finally ,

I have solved this issue by following below steps.

And observed my instances folder is created with incorrect sling:resourceType not sure why it's creating like that.

http://aemtips.blogspot.in/2013_05_01_archive.html

Issue while initiating workflow

 

 

Problem: I've deleted 'instances' folder inside /etc/workflow/ directory.  When I initiate the workflow, the folder 'instances' is automatically created under /etc/workflow/ but the workflow is not triggered on the payload.

Solution:

  • Make sure to delete the instances folder.
  • Save the changes
  • Create a instances node of type sling:folder
  • To the instances node add a property sling:resourceType with value equal to ‘cq/workflow/components/instances’

        Also add property jcr:title Instances

  • Restart the workflow bundle from felix console or restart the instance    

Avatar

Level 9

yes ,i have only single workflow in my AEM instance.

Actually my workflow need not be triggered on any repository based events ,user will select the page in siteadmin and trigger workflow on it.

Once again thanks for sparing time on this issue.