when cancel sharepoint workflow by web browser or programatically by code
SPWorkflowManager.CancelWorkflow()
All task in my workflow task list was deleted, where i can turn off this, i need this task to reporting.
This is the way SharePoint works, canceling a workflow deletes all related tasks, but the workflow history is kept. Do not rely on tasks as a proof that something did or did not happen.
Related
I have a simple Task Schedule job that runs a program 6 times, sending to it a different Argument each time.
This has been working well for some years, but on 2016 Server it only runs the first action and then it stops.
Any ideas of a fix? I have looked on google for all fixes etc, but they haven't worked and seem to be for 2017 and back
Based on my past experience, this behavior could caused by one of the following:
If your task targets a batch file of an executable file, try to check Windows Task Manager for that file running under "Processes" tab. Select each of your target batch/exe then End Process button. This may have caused by a seemed-to-stuck process but still on "Running" status.
On Task Scheduler, check for your task's "Last Run Result". This could be having code other than 0x0 (which is the successful run). If so, check for details under "History" tab below this pane.
I have shared a Task List with another user in my business but I can't see how they can view these task through the 'To-Do Bar' in the main email page(the taskbar on the right-hand side).
They can see their own tasks fine, just not the ones I have shared with them and made them 'Owner'.
Anyone any idea if this is actually possible? We are using Outlook 2016.
Thanks in advance
No, this is not possible. You can only view someone else's tasks from the main tasks window
I'm developing workflows on SharePoint 2010 using Visual Studio.
I need to catch event, when user cancel running workflow from UI.
User clicks on "Terminate this workflow now" link and I should add some logs to history of current workflow instance.
I added cancellationHandlerActivity for my SequentialWorkflowActivity, but cancellationHandlerActivity is not executed.
In MSDN I find explanation for cancellationHandlerActivity (http://msdn.microsoft.com/en-us/library/aa349442(v=vs.85).aspx) - The CancellationHandlerActivity activity contains cleanup logic for a composite activity that is canceled before all the composite activity's child activities are finished executing.
So I thought, that cancellationHandlerActivity is what I need, but on practice - I'm wrong :(
Please, give me some advice, how i can solve my problem!
I tried to find solution on the Internet, but couldn't :(
I found solution!
You can create your custom WrkStatPage and add your custom action on cancel event.
(More information about this way)
Also in Element.xml for your workflow add property
StatusUrl="_layouts/MyCustomWrkStat.aspx"
In my app I am creating both a PeriodicTask and a ResourceIntensiveTask, both of which have different descriptions.
Under settings, applications, background tasks I only see the description of the PeriodicTask. Is this normal, or does it mean I've messed something up?
Thanks,
Damian
Each app can only have one background task, but you can check which type of task would like to be run by the system by checking the ScheduleTask object from the OnInvoke method. See http://msdn.microsoft.com/en-us/library/hh202941(v=VS.92).aspx.
Edit: The description is only mandatory for the periodic task which get's show as the agent description. For the resource intensive task you'll need to provide a description.
ResourceIntensiveTask will not show up in the settings only PeriodicTask. Under advanced will your app listed. This is my experience.
I made a build in TeamCity which deploys code to live server. As a precaution I want to disable that button "run" can be clicked by mistake.So I want to have an additional level of checking "whether I'm sure" I want to click "run" button. Is it possible to accomplish?
Thanks in advance!
I don't think there is a way to disable the run button.
An approach I've used is to have a Property which gets passed to the build script which needs to be true for the script to run, it's false or not set then the build script throws an error. Then in the build configuration on the Properties & Environment Variables page I set the property to false. Now whenever I need to run the script I have to use the "Run custom build" button (the "| ..." bit beside the run button), then I set the value to true before hitting the build button.
Another, easier option, is to add a agent requirement to your build such that only the production server's agent can meet it (e.g. env.COMPUTERNAME equals MyProductionServer01), and then disable the agent with a note about "locking" the production build. This will prevent the build from actually running if you accidentally click the Run button.
You cannot disable the run button but you can set permissions so that people are still able to view the project without the ability to run it (specifically the Run Build role).
As far as the confirmation goes there is nothing built into TeamCity to accomplish this but I do believe it would be possible to write a small plugin to gain this type of functionality.
Plugin Information:
http://confluence.jetbrains.net/display/TCD6/Developing+TeamCity+Plugins
Indeed, there is no ability to hide Run button unless the build configuration is placed in a different project, which user has no permission to run builds in.
There is a related feature request in TeamCity issue tracker.
As to requesting confirmation, there is still no direct support, but since TeamCity 7.0 one may add a parameter with mode "prompt" and this will result in the run custom build dialog popping out on Run button click.
We have solved this by providing double log-ins for our users. The normal user is not having permisson to run dangerous projects, but if the log in as elevated.user they have access to the run button for these projects as well.
So in normal situations there is no risk of running by accident.
I don't think there is disable button for run. You can pause the build and run it when you want to deploy to live sever.
Not that I'm aware of. If you have enterprise you could set it up so that there is a special account which has permissions to execute that build. Another workaround would be to make the build look at a specific branch in your SCM repo with restricted permissions, etc. Typically merging to a branch requires a bit of effort so its not as easy as hitting run by accident. Also ensures that someone hitting run won't necessarily grab the latest unstable copy from the trunk or somesuch.
You can now remove the Run button by adding teamcity.ui.runButton.caption parameter with an empty value.
See this comment on YouTrack.