Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Managed Control process reports are not shown with ACS version 6.6.2 #3499

Open
3 tasks
sdusanecogz opened this issue Jan 1, 2025 · 2 comments
Open
3 tasks
Assignees
Labels

Comments

@sdusanecogz
Copy link

sdusanecogz commented Jan 1, 2025

Required Information

  • AEM Version, including Service Packs, Cumulative Fix Packs, etc: Adobe as a Cloud Service Latest Version
  • ACS AEM Commons Version: 6.6.2
  • Reproducible on Latest? yes

Expected Behavior

I upgraded ACS version to 6.6.2 but I don't see any reports in Tools > ACS Commons > Managed Control Processes.
Could you please check and let me know what can be the solution for this.

Actual Behavior

When I go to Managed control Process, I have list of reports there, I should see that as well as I should be able to create new report.

Links

/apps/acs-commons/content/manage-controlled-processes.html

@YegorKozlov YegorKozlov self-assigned this Jan 3, 2025
@YegorKozlov YegorKozlov added the bug label Jan 3, 2025
@YegorKozlov
Copy link
Contributor

I confirmed the issue. The code fails to adapt the resource representing a completed task to to ArchivedProcessInstance

Caused by: java.lang.NullPointerException: null
	at com.adobe.acs.commons.mcp.model.impl.ArchivedProcessInstance.getInfo(ArchivedProcessInstance.java:74) [com.adobe.acs.acs-aem-commons-bundle:6.11.0.SNAPSHOT]
	at com.adobe.acs.commons.mcp.model.impl.ArchivedProcessInstance.markNotRunning(ArchivedProcessInstance.java:105) [com.adobe.acs.acs-aem-commons-bundle:6.11.0.SNAPSHOT]
	at jdk.internal.reflect.GeneratedMethodAccessor605.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.apache.sling.models.impl.ModelAdapterFactory.invokePostConstruct(ModelAdapterFactory.java:903) [org.apache.sling.models.impl:1.6.5.B0001]
	at org.apache.sling.models.impl.ModelAdapterFactory.createObject(ModelAdapterFactory.java:703) [org.apache.sling.models.impl:1.6.5.B0001]
	... 193 common frames omitted

which is coming from the null infoBean:

@Inject
@Named("jcr:content")
public ManagedProcess infoBean;

@YegorKozlov
Copy link
Contributor

I think we've always had this issue. When the initial MCP job fails, it generates an invalid node structure under /var/acs-commons/mcp which results in no reports being shown in the system.

expected node structure

/var/acs-commons/mcp
  + instances (sling:Folder)
    + reportId (cq:Page)
      + jcr:content (cq:PageContent) 
        ....  

invalid node structure generated when the 1st MCP job failed

/var/acs-commons/mcp
  + instances (nt:unstructured)
    + reportId (nt:unstructured)
      + jcr:content (nt:unstructured) 
        ....  

To reproduce the issue delete /var/acs-commons/mcp/instances and then run the Workflow Remover job with no parameters, i.e. just select the job and submit.

The issues roots to the way ControlledProcessManagerImpl traverses the nodes using TreeFilteringResourceVisitor. It only drills down into folders and skips nt:unstructured.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants