stopping sharepoint workflow programmatically - sharepoint

well the thing is i am having a scheduled script that checks some changes in a different database (Oracle), if the change happens
I need to cancel /kill/ stop a workflow if it is in progress on a specific item of my list
How to do that?

I did not try, but the SPWorkflowManager.CancelWorkflow Method should do what you want to do: "Cancels the specified workflow instance."
I hope it works and solves your problem.

Related

Trigger Power Automate flow from SharePoint list item

I am trying to trigger at Power Automate flow, from at Modern SharePoint list element.
By default this is pretty straight forward, as these two links also show.
https://www.youtube.com/watch?v=2Hp9CTd8zQU
https://michalguzowski.pl/how-to-trigger-microsoft-flow-in-sharepoint-list/
However, when I try the name of the flow simply does not show up anywhere in SharePoint. As such:
My flow (my first trigger is "For a selected element"). Also the flow was created through Sharepoint using the PowerAutomate option.
Where in SharePoint I would expect an option called "TestTrigger4" to show up (excuse the strange language)
enter image description here
Clear the browser cache, wait for minutes, then re-open the list to compare the result.
I found the solution.
The answer is that only Power Automate flows from the default solution can be run like this through SharePoint.

Blue Prism: Object not found when ran using Control Center, but runs without issue through Process Studio

During my process there is a drop-down html element that I have spied and set correctly. I run through the Object and Process studio without any issues. Once the same process is ran through the Control Room the element throws and error that it cannot be found.
I have tried multiple different configurations without any luck and the element is still found without issue when ran manually. I even checked by signing into the VM having it error and on the second retry had the VM up; at this stage the element was found without issue. It seems to only be when the bot is running and the screen is not up. No other elements give this issue and the next step is the same dropdown, but for a stop time not start.
Any help would be appreciated!
I have added pics of the STARTSPIED - START and ENDSPIED - END spied configs,the Navigation Stage, and the process correctly running in the Object Studio OB Studio correct.
Thank you!
For the person who down-voted this item...Configs here are my two days of config changes and research that I tried on my own before asking for help. This is my 5th automation that I have put into deployment without help, so thank you for down-voting someone trying to get help where they are stuck.
Your problem is most likely connected with the fact that processes run in the control room are executed much faster than in studio and your webpage might not be loaded on time (that would explain why it works after retry).
Best practice approach would be to add a dynamic wait stage after attach and use “Parent Document Loaded” option on the element you want to interact with. It will wait for the page to be loaded and then check exist for the element. I would also suggest splitting your action into two, first to set start date and second for end date.

Event workflow in SharePoint

Clearly I need to edit my question.
If I'd like to create a process, a process for registering and handlig some kind of event inside an organisation, where you first register this event, by giving it a title, and some other properties (date, description etc), then this event should be handled in some ways, this will be done in several steps in order to resolve this event. What would be the best way to do this? I'm not looking for an answer in code, just a keyword for what this could be called, or a guide/tutorial, or a link to something similar.
All help is appriciated, if u don't understand my question please tell me, and I will try to elaborate.
Since you tagged this SharePoint, I assume you have a SharePoint site set up already. On that site, you want to create a list (either a calendar list or a custom list; try both and see which option has more columns you'll use, then add/remove columns until you're capturing all the data you need). Then you want to create a workflow (or workflows) that run on items created in that list. Workflows created in SharePoint Designer can do everything you're asking, from sending automatic emails to changing fields in your items. Googling "SharePoint workflows" will start you down the road to developing your solution.

Saving to multiple lists from 1 sharepoint 2007 list form

I have a request form I'm working on, wherein different departemnts need to be able to update it. To minimize overlap and lost changes I'd like to be able to submit data from the new form to different lists, but I cannot find a way to do this.
Does anyone have any experience trying to do anything similar?
If you're familiar with JQuery andSPServices I could envisage a way to do this.
In the EditForm.aspx, add the JQuery and SPServices libraries. using the $.(document).Ready function, I'd do a quick item update with the SPServices and just copy a column with the same data, so in effect no change looks to have taken place. I'd add in the edit comments something like "Pseduo checkout to [name], [date_time]".
Then allow the user to edit the form as normal but in the code you've added, you trap the PreSave Action and check that the person trying to do the save is the same as the last modified - if it is, save as normal, otherwise, return false on the PreSave and it will be denied. When you actually allow the save, set the edit comments to something sensible.
To complete this, check before doing the pseudo checkout, that the last comments don't contain the psuedo checkout phrase so that you can prevent anyone opening/editing the form whilst somebody else is in the middle of an edit.
This gives a cheap and relatievly easy to implement Check-In/Check-Out for a list. Not perfect of course but should work well in most scenarios (not in datasheet though, so you might need to prevent that type of edit).
If you have two lists would you not then have the problem of potentially two requests for the same thing?
Does none of the version control options for the list solve the problem of potentially multiple concurrent editors?
While SPService is certainly a solution, but you will have to build a UI of ur own.
Try writing a event receiver, which can copy over item to another list as soon as it is created.
It will be nice if you can tell why you really want to have a copy of item in another list
i.e. Auditing purpose etc. , you can get a perfect solution for this in Forum

InvokeWorkflowActivity doesn't call workflow

I'm trying to get one workflow to call another one. I tried using the invokeWorkflowActivity, I set the TargetWorkflow to the workflow that I want to get called. It's in another project so I added the project as a reference.
What else do I have to set up in order for this to work properly. I get no errors, the first workflow starts and then completes as expected because the call to start the workflow is asyncronous. The problem is that my second workflow doesn't seem like it's getting called.
Thanks.
try this sample..
http://blogs.msdn.com/sdanie/archive/2006/06/23/644366.aspx
this may help you

Resources