How to activate a particular node through java code / workflow in Day CQ - aem

I want to activate only the modified node in my Day CQ project.
Node structure is:
Parent Node
Child Node 1
Child Node 2
Child Node 3
Requirement is:
If I am creating any node under parent node workflow should run.
Workflow should activate only newly created child node and parent node and not all child nodes.
Is it possible ??? Please give solution also in comment......

This can be easily relaised in using the workflow console.
Open the workflow console create a workflow model using in the models tab.
Then open the model and add the "Activate Page/Asset Step [com.day.cq.wcm.workflow.process.ActivatePageProcess]" to the model.
Save the model and switch to the launcher tab.
Create a new launcher for the path of the your parent node and select event type "Created".

Related

ECS Task definition App Mesh Virtual node name does not get set through console

I am creating a task definition that uses App Mesh. I am trying to set the Virtual name using the console.
The UI clearly shows that I can select the virtual node name.
However, after I create the new revision, if I create a revision off of that, I see that the virtual node name has blanked out.
This is problematic as my container does not pass ELB health checks since the sidecar isn’t behaving properly.
As it turns out, for some reason hitting Create does not apply the virtual node name change.
Once you manually hit apply, the problem goes away.

Multiple Helm chart and parent chart need to be executed first and complete when all sub charts are completed

I have a situation where I have one parent chart called parent and 2 sub child charts called child1 and child2 (child sub charts uses different docker image from the parent chart.). I want parent chart to be executed first as it copies script from container to NFS volume and other charts i.e. child1 and child2 consume the script i.e. execute the scripts and create a status on shared NFS volume among all the pods.
Parent chart or POD keep an eye on status file and once all the status files created , it proceed further and perform some validations and execute rest of the setup steps.
Is there a way to resolve this situation?

One or more placement constraints on the service are undefined on all nodes that are currently up

trying to setup that specific services get deploy to specific node types I am getting this error using Visual Studio publish dialog (that breaks calling new-servicefabricapplication PS command)
I am using the service manifest to define the placementConstraints like this:
<StatelessServiceType ServiceTypeName="VisualObjects2.WebServiceType" >
<PlacementConstraints>(nodeType==node2)</PlacementConstraints>
</StatelessServiceType>
How can i define this placement constraints on the nodes?
In the Azure portal, go to your SF Cluster, select node types and for each one you can add a key-value list of placement constraints. There I put the key-value: nodetype = node2. After this, the deployment was done only in the nodes with this attribute

Switch job on online Node jenkins

I have jenkins and job in jenkins with selection "Node" (Server) by users and "Label Expression" (ex. server1||server2). But, if my server1 is gone to offline, I want to start my job on server2 automatically. Can anyone help me?
Thanks.
Jenkins' node labels are supposed to be used the other way round. See Manage Jenkins → Manage Nodes → select a node → Configure → Click
to the right of the Labels field:
Labels (AKA tags) are used for grouping multiple slaves into one logical group.
So each of your servers (Server1, Server2) should have the same label assigned to it. Let's say build. Define this in Label Expression in your project.
Select Ignore offline nodes under This build is parameterized → Node → Node eligibility.
Such, if a user selects an offline node the other one of the group should be taken (if this one is online).

javax.jcr.ItemNotFoundException: node /content/my/live/copy has no child node with name someNode

I created a live copy in Adobe CQ. It all works fine, but suddenly I get an error when I try to do a rollout of a page that has an node representing a page property. The error is the following:
ItemNotFoundException: node /content/my/live/copy has no child node with name someNode
at org.apache.jackrabbit.core.NodeImpl.orderBefore(NodeImpl.java:1459)
at org.apache.jackrabbit.core.NodeImpl.orderBefore(NodeImpl.java:1857)
at com.day.cq.wcm.msm.impl.actions.ContentCopyActionFactory$ContentCopyAction.createCopy(ContentCopyActionFactory.java:180)
at com.day.cq.wcm.msm.impl.actions.ContentCopyActionFactory$ContentCopyAction.doExecute(ContentCopyActionFactory.java:136)
at com.day.cq.wcm.msm.impl.actions.BaseAction.execute(BaseAction.java:53)
... 110 more
"someNode" does not exist in the live copy, as the error says...but rollout fails in the contentCopy phase, so I don't understand why the node is not just simply created. It's not a problem with the indexes as I had rebuilt the index already and I get the same result.
I am using Adobe CQ version 5.6.1.
Some indication on how to debug this would also be helpful.