Thanks Nicolas. Unfortunately, I am still confused on this the below translates 
to a node structure for my pipe. [0] is what I have right now.


  *   findNodes pipe finds all nodes of cq:Page nodes that have 
jcr:content/cq:cloudserviceconfigs property set
  *   pageContentNode pipe gets the “jcr:content” node for the cq:Page
  *   cloudServiceConfig pipe is looking for the cq:cloudserviceconfigs property
  *   writeTempProperty pipe will then write all the values returned by 
cloudServiceConfig to a temp property named “tmp”

Running this pipe doesn’t actually write the tmp property on my jcr:content 
node. Also, I am not sure what the move pipe config should be after the 
writeTempProperty pipe to move “tmp” to “cq:cloudserviceconfigs” property.

Thanks in advance.


[0]

cloudServiceConfigsUpdatePipe:
{

  *
jcr:primaryType: "sling:Folder",
  *
jcr:createdBy: "admin",
  *
status: "finished",
  *
jcr:created: "Tue Jul 07 2020 14:35:00 GMT-0700",
  *
statusModified: "Wed Jul 08 2020 15:02:02 GMT-0700",
  *
sling:resourceType: "slingPipes/container",
  *
conf:
{
     *
jcr:primaryType: "sling:OrderedFolder",
     *
jcr:createdBy: "admin",
     *
jcr:created: "Tue Jul 07 2020 14:35:00 GMT-0700",
     *
findNodes:
{
        *
jcr:primaryType: "sling:Folder",
        *
jcr:createdBy: "admin",
        *
jcr:created: "Tue Jul 07 2020 14:35:00 GMT-0700",
        *
expr: "/jcr:root/content/ni/master/home/validation//element(*, 
cq:Page)[(jcr:content/@cq:cloudserviceconfigs)]",
        *
sling:resourceType: "slingPipes/xpath"
},
     *
pageContentNode:
{
        *
jcr:primaryType: "nt:unstructured",
        *
expr: "#'jcr:content'",
        *
sling:resourceType: "slingPipes/children"
},
     *
cloudServiceConfig:
{
        *
jcr:primaryType: "nt:unstructured",
        *
path: "cq:cloudserviceconfigs",
        *
sling:resourceType: "slingPipes/multiProperty"
},
     *
writeTempProperty:
{
        *
jcr:primaryType: "nt:unstructured",
        *
sling:resourceType: "slingPipes/write",
        *
conf:
{
           *
jcr:primaryType: "nt:unstructured",
           *
tmp: "+[${cloudServiceConfig}]"
}
}
}

}

Kaushal Mall | Sr. Principal Consultant | 480-512-2260
Have you been impressed by an AEM Consulting resource?  Please take a minute to 
let us know!
Our new AEM 
Appreciate<https://forms.office.com/Pages/ResponsePage.aspx?id=Wht7-jR7h0OUrtLBeN7O4Wt4SlUkSKNJhPA9dqz9FkBUQVZNNDJONzhHTFREMTExQktPUFAwNDVFVC4u>
 program makes it quick and easy to provide your feedback and help us to 
recognize our top performers.

On Jul 8, 2020, at 1:45 AM, Nicolas Peltier 
<[email protected]<mailto:[email protected]>> wrote:

Hi Kaushall,

Multivalue pipe only role is to fork the flow for each value of the MV 
property, adding the value in the bindings.
I think you should write to a temp property before moving it back
So something like plumber.newPipe(resourceResolver)
.echo("/etc/your/configuration/mvProperty")
.mp().name("mvProp")
.write("temp", "+[${mvProp}]")
.run()

And then
.echo("/etc/your/configuration/temp").mv("/etc/your/configuration/mvProperty").with("overwriteTarget",
 true).run()

Hope this helps,
Nicolas
On 07/07/2020 21:19, "Kaushal Mall" 
<[email protected]<mailto:[email protected]>> wrote:

   Hi All,

   I have a use case described below to update a particular multi value 
property and hoping someone can help me with the appropriate Sling Pipe 
configuration.

   There are certain nodes of type cq:PageContent with a property 
cq:cloudservices (string[]) where the value can be similar to 
/etc/cloudservices/mycloudconfig1/cloudconfig, 
/etc/cloudservices/mycloudconfig2/cloudconfig

   The pipe needs to find the nodes where this property is set and change the 
value and replace “/etc/cloudservices” part of the path with 
“/conf/global/settings”

   I am unsure how to write a multi value property using a pipe. I can get the 
appropriate nodes by using the xpath pipe and read the values using a multi 
value pipe (I think), but, not sure how to do string manipulation and write the 
values back.

   Does anyone know how to read and write the values for this use case?

   Thanks in advance.

   Kaushal Mall | Technical Architect | 480-512-2260 | 
https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fblogs.adobe.com%2Fcontentmanagement&amp;data=02%7C01%7Ckmall%40adobe.com%7C3f3106c03fcc4333c46008d8231b4f3f%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637297947493713214&amp;sdata=9h0%2B1pdexOO8ergs5od3e5gjMDlS%2B5Gyf%2FmwZwbYQMQ%3D&amp;reserved=0
   Have you been impressed by an AEM Consulting resource?  Please take a minute 
to let us know!
   Our new AEM 
Appreciate<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fforms.office.com%2FPages%2FResponsePage.aspx%3Fid%3DWht7-jR7h0OUrtLBeN7O4Wt4SlUkSKNJhPA9dqz9FkBUQVZNNDJONzhHTFREMTExQktPUFAwNDVFVC4u&amp;data=02%7C01%7Ckmall%40adobe.com%7C3f3106c03fcc4333c46008d8231b4f3f%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637297947493713214&amp;sdata=78TeG6L8D%2BfFYJ5%2BBoWL8KKcDM8lIRzwk0uksdH1pZg%3D&amp;reserved=0>
 program makes it quick and easy to provide your feedback and help us to 
recognize our top performers.

Reply via email to