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

Content fragment OOB Property

Avatar

Adobe Champion

Hi,

 

We have a custom solution to create individual QR Codes. The solution is designed in such a way to create Content fragments to enter all details and a listener is listening for a property 'lastFragmentSave' along with couple of others and then calling a service class which contains all logic to create QR Codes.

 

Now there is a requirement to create bulk QR codes, so planning to leverage ACS Commons Content fragment import process for this - https://adobe-consulting-services.github.io/acs-aem-commons/features/mcp-tools/cf-importer/index.htm...

 

I tried to use the sample sheet and model in this link above. It creates CF's, but i cannot see 'lastFragmentSave' in these bulk CF's created. Does anyone know why is it so?

I tried editing the CF created and clicked save and close, but still this property is not coming.

P_V_Nair_0-1692631963381.png

 

 

This is the property I am looking forward

P_V_Nair_1-1692632203345.png

 

Why does it create this OOB property when we manually create, but not while using bulk ACS Commons feature?

Is there anyway we can manipulate this in the same excel?

 

Have added the model zip and sample template as well here for reference.

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@P_V_Nair  Yes, once the CFs are created via the CF importer , may be apply a post processing workflow that performs the edit operation and everything else from there on can follow.

 

View solution in original post

6 Replies

Avatar

Community Advisor

@P_V_Nair , What is the ACS commons version that you are using?

Can you try this with the latest ACS commons library version. I think there was a fix for date type fields in one of the latest versions. 

More info on this : https://github.com/Adobe-Consulting-Services/acs-aem-commons/issues/2712

 

 

 

 

Avatar

Adobe Champion

@Harwinder-singh  I am using 5.3.4 which is latest than the post you shared. The issue is lot with any of the data types, the question is regarding how can i add the last fragment OOB property for content fragments as I have a event listener to triggers some service layers based on that property.

Avatar

Community Advisor

@P_V_Nair , The reason for that is the 'lastFragmentSave' property is set on the CF only when it is edited.

when you are creating the CFs via the CF importer, you are just creating them afresh. you may have to invoke additional edit operation to enable the properties like 'lastFragmentSave' , 'jcr:versionHistory', 'jcr:predecessers' etc to be set on the CF nodes.

Hope this helps.

Avatar

Adobe Champion

@Harwinder-singh  That makes sense. So, first time if we do the content fragment importer, can we use the same to edit it by running the same the second time with a change? I actually tested it, but it was treated as new again. I am interested only in the lastFragmentSave, so on this case should that be programmatically be updated to the node to invoke my listener?

Avatar

Correct answer by
Community Advisor

@P_V_Nair  Yes, once the CFs are created via the CF importer , may be apply a post processing workflow that performs the edit operation and everything else from there on can follow.