Route Workflow from a Pushbutton in Maximo - workflow

I am trying to have a Pushbutton in Maximo mimic the Route Workflow button from an automation script. In my case shown in the picture below, I want the Complete button to pop up the workflow and continue it. I have found things like
wfs = MXServer.getMXServer().lookup("WORKFLOW")
wfs.initiateWorkflow("WFName", mbo)
This only starts the workflow and does not do the same thing as the Route Workflow button in Maximo.

Rather than have the script initiate workflow, have an action line in the workflow that calls the script, via an Action Launch Point, and then proceeds to do what you want workflow to do. You could even then have another Action Launch Point on the same or a different script to do any follow-up processing. Then, you can hook your button to the workflow. That's basically how you're supposed to use Workflow, anyway: to choreograph your processes.

Related

ActionEvents in matlab without if statements once a condition is met

I'm creating a matlab application without a gui, and I'm pretty new to action events and callbacks. I can only find documentation regarding action events that either use the gui, or create a listener that is called upon the program hitting an if statement. I'd like to be able to use action events dynamically, and have them be called whenever a specific condition is met. Is there a way to do this?

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

SAP ABAP delete a workflow

I have a running workflow which is in an endless loop.
Now I want to delete/cancel this workflow.
In which Transaction can I do that?
go to transaction SWIA and find the workflow instance. One of the Action buttons is to cancel this workflow instance.
Update: just checked, the button is called "Manuell beenden" (I assume "Stop manually" or similar in English)
BTW, you should apply that button to the root node of the workflow instance (type WS...)
If you find your workitem in SWIA, use button "protocol" or similar, then switch to technical view, find out the workitem id of the root of the workflow instance. => use "manual stop" on that one in the main view of SWIA.

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!

Testing with dual UI's

I have a browser based test program for testing a browser based application. This means that I need to record sequences that alternately manipulate the test program and then the application to check that it reacts correctly, so that I can perform automated testing.
How should I do this with SAHI?
I cannot see a way of recording two separate URL's concurrently. I have tried combining the two UI's using frames, and iframes, but I couldn't get SAHI to record in the frame/iframe.
I could modify the test program so that I can call it from scripts called by SAHI, but that rather defeats the object of having an automation tool...
Any suggestions?
1) Record the actions on the first web page using Sahi (script1)
2) Record the actions on the second web page (script2)
3) In script1, do this
// do steps for UI 1 as recorded in script1
_call(window.open("second url", "newWindow")); // open the second window
_selectWindow("newWindow"); // target the following steps on newWindow
// copy steps from script2 here
_selectWindow(); // return to base window
// perform further base window steps
// Use _selectWindow("newWindow") and _selectWindow() to switch between windows.
Hope this helps.
Regards,