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

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.

Related

An assertion on the test case file - Webdriverio

I need some help, I'm starting with this automation stuff, I like it but I'm still learning, recently I create a test case that basically is, going to a certain page and click on a button to upgrade the account on an specific sale, so I did that but when I got my PR reviewed and devops ask me if I can add an assertion.
So, this code is on the spec file not on the page objects file, so the devops mean I have to create the code on the page object file and then call it on the spec file???? any tip would be great and thanks!
You can do it either way. You can write the assertion in the spec file, or write the assertion in the page objects file and call it from the specs file. If the latter is your framework's code convention, you may want to do it that way for consistency, but either way should work.

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

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()

Opshub migration failures

I'm migrating a large amount of projects from a on premise tfs2010 to vso, nearly all of them was able to migrate without any problems, but a few are creating errors. I am using Opshub Integration Manager Framework-OVSMU-V1.2.0.000.
1.
OH-TFS-Connector-0054: Test Step Id cannot be empty and It must be a valid number. Please check the Mapping and add valid mapping for the Test Step Id.
The most common error. This error is also described in opshub-visual-studio-online-migration-utility-test-cases-failing, but has yet to receive an accepted answer. As mentioned in this post the cause if the problem might be Shared Steps, so I tried removing one from a test case, and that made it pass in the migration utility. Unfortunately I need those test cases and it is not feasible for me to just delete them.
2.
OH-TFS-Connector-0051: Operation failed getCollectionMetaData. Server Error : TF201063: Adding a Test Case link to work item 18374 would result in a circular relationship. To create this link, evaluate the existing links, and remove one of the other links in the cycle.
After inspecting the Work Items that causes the error and concluding that there is no links, and no clear circular reference, not even a Shared Step linking to work item 18374. Upon further inspection I noticed that work item 18374 doesn't even exist.
Any help would be much appreciated.
OH-TFS-Connector-0054: Test Step Id cannot be empty and It must be a valid number. Please check the Mapping and add valid mapping for the Test Step Id.
This issue is addressed in latest release of OVSMU (1.3.0.000). You can download from
https://visualstudiogallery.msdn.microsoft.com/28a90a17-d00c-4660-b7ae-42d58315ccf2
OH-TFS-Connector-0051: Operation failed getCollectionMetaData. Server Error : TF201063: Adding a Test Case link to work item 18374 would result in a circular relationship.
This issue is scheduled for next release which will be out shortly. Check Visual Studio Gallery for further updates.
Thanks.

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.

Email notification in jenkins based on a script output

I am stuck at a point where I run a perl script through jenkins and I want a conditional email notification to be sent.
For eg ..
if at the end of script the value of a certain variable is > 1 then send the email notification
else
dont send
Can anybody help me with this ? or knows a better way to do this ?
This can be solved using
Email-ext plug-in
https://wiki.jenkins.io/display/JENKINS/Email-ext+plugin
And you can use the above link to view information regarding plugin
if i'm correct you want to send mails based on your build condition result.
you can use triggers for this in Editable email notification.
you can use post build step and pre build steps to trigger emails based on your conditions
you need to write a script for your requirement and place it in post & pre build steps.
I haven't any of this, however:
There is an Any Build Step plugin. Among other things, it allows post-build actions to be executed as build steps. In theory, this should allow you to execute "Editable Email Notification" post-build step as a build step. This is the biggest wildcard in this solution. Try this first. I don't know if the email notification will work properly when done before the Jenkins' "build cycle" of a job is complete.
Next, there is Conditional Build Step plugin. It allows you to execute a build step based on various conditions.
If you were able to trigger email in the middle of the build cycle with "Any Build Step" plugin, you should be able to wrap it with the "Conditional Build Step" plugin to be executed conditionally.
Let me know if this actually works
I was having a similar condition where I need to send out an email when jenkins build log has a string. Here is how I handled in the presend script of the jenkins job.
logger.println(build.getLog(50))
if (build.getLog(50).contains("NoChangesPresent")) {
cancel = true;
}
I am trying to get the last 50 lines of build log and search through it to see if there is a string present. If it is present then I am setting cancel to true which would stop triggering the email from jenkins.
Hope this helps.
I like siri's answer. There is one think missing.
logger.println(build.getLog(50)) if
(build.getLog(50).toString().contains("NoChangesPresent")) { cancel = true; }
It doesn't appear that contains will function without converting it first to a string. Good luck!