Can I change node proeprty value in a AEM custom worklfow process? - workflow

I have created a new workflow for activate later. It includes a custom workflow process step written by me. The custom step changes some properties of the payload step and then Activate Page process is called to activate the page. The changed properties are reflected in the author instance but not on the publish instance. Just wanted to confirm if this is possible or the workflow creates a copy of the node and then executes on it (like passing a parameter to a function)?
Thanks in advance :D

It should work fine, however you have to commit changes using resourceResolver.commit()

Related

Azure Devops Boards - can we block task from done if there isn't any test attatched?

We are trying to implement a new method for our QA team.
I have looked around the setting but couldn't find an answer:
Is it possible to prevent them from dragging the task to 'Done' if they haven't added a test case into it?
On the same logic - can we block the 'committed' column from them if they haven't added a bug to the task?
Thank you.
There is currently no build-in feature to help you achieve this directly.
Here is a work around for your demand:
Create a new filed named "TestCaseLinked"
Every time a Test Case is linked to the task WIT, you need to manually put a value into this field. And use the WIT rule to check the value when changing the WIT status to "Done"

Set workflow model id (path)

When I create a new workflow model in AEM, it gets created under /etc/workflow/models. How do I get it to be created under a different path like /etc/workflow/models/myapp ? The only way I can think of is changing the path in CRXDE after the workflow gets created. Wanted so if there is a better way to do this.
Better way to move workflow to another place would be:
go to /miscadmin#/etc/workflow/models
use button "Move..."
Unfortunately, it seems, that there is no easy way to change place, where worflows, which are created through UI, are stored. To do this you should:
override "/libs/cq/workflow/widgets/source/widget/ModelsPanel.js" in you project, where you can find action this.newAction, where you will be able to change propery parentPath to /etc/workflow/models/myapp. But you can run into troubles after upgrading to another version of AEM.
also you can be interested in service Granite Workflow Service where you can set (through /system/console/configMgr) path to your models, which should be shown in Workflow Console /libs/cq/workflow/content/console.html. (Also it's applicable to CQ 5.6.1, for some older versions, you should configure Day CQ Workflow Service).

creating a new workflow by using the existing workflow - Modifications are not Saved

Am creating a new workflow by using the existing workflow ( i.e. By copying the existing workflow under /etc/workflow/models/).
But when I do this the newly created workflow is not saved for any future modifications. Observed that the newly created workflow is having a version as jcr:rootVersion and also the model is having the jcr:predecessors property of Type Reference[] is having a value as shown in below screenshot. Can’t we reuse the existing models in the way which I am trying ? or how to restrict the value ?
modification in jcr are not the best supported ones. If you want to create a new workflow use the workflow console, create a new workflow and add the steps you want to reuse. Also you can reuse workflow by adding them to a container step. I'm not sure which one do you want to use, if you want to expand an already existing workflow then go on and create a new one and add the pages, if you just want to call an already existing workflow than use the container step. Take care, the container step will generate a new workflow instance from the sub workflow and the main workflow won't wait for the sub-workflow to finish.

How can I get control of the generation process of config.xml file for a jenkins job?

I'm new to Jenkins and now I'm supposed to develop a jenkins plugin. In the plugin will create a new job type, and generate the configuration page of this job type. I've finish this one by extending the class "hudson.model.Project" ;
For now, when I click "save", nothing goes into the configuration file(config.xml) of the new job. I want to get control of the configuration file's generation process in order to set default builders and parameters of the certain builder for each job.
Anyone could help in explain how could I make it with Jenkings Plugin (especially by extending hudson.model.Project)? Or anyone can tell me which part of the src code or any documentation I should read in order to get some knowledge of it?
Any help will be appreciated!
Thanks!
There is already a plugin to create new jenkins jobs programatically https://wiki.jenkins-ci.org/display/JENKINS/Job+DSL+Plugin

Why does my CRM workflow steps run individually but not when two steps exist?

I have created a custom workflow activity that copies attachments from a case to an email, both supplied as Lookup parameters. I installed the workflow assembly, created a case with attachments and an email. I then used the workflow design to create a new workflow with one step that runs my custom activity. The attachments copied nicely.
The first use of the custom workflow assembly is to create the email before doing the copying the attachments. I therefore created a new workflow that created an email using details from a case. I set this up as a manual workflow as this it what the end user (CRM consultant) will be doing. I ran that workflow and an email was created as expected.
I then modified the second workflow to add a second step. The second step copies the attachments from the current case to the created email. When I ran the workflow, it failed on step 1.
I modified the workflow so that the email from step 1 was not used in step 2. Instead, I used an existing email as per my very first test. This means that the two steps when executed individually work and if they ran concurrently they should work because there is no link between them. However, when I ran the workflow, it failed on step 1.
Can anyone suggest why this may be happening?
I found the answer so thought I would post it here. I had a class in use that was not marked with the [Serializable] attribute. Once the attribute was added, the problem went away.