How do I manually start a workflow to...

I have a list with 2000+ items in it. I create a 2013 workflow in SPD that will look at an item and if it date is less than 1/1/2013 it will create a copy of the item on a list used for archiving, then delete the existing list item. 
My question is how do i manually start this workflow on the entire list (instead of selecting 1 item at a time)?
Thanks
James T.F

@Romeo
I've found to potential PowerShell scripts that could launch a list workflow from powershell, but they both throw errors for me. 
# URL of the Site
$web = Get-SPWeb -Identity "https://sharepointsrv/site1"
$manager = $web.Site.WorkFlowManager
# Name of the list
$list = $web.Lists["Shared Documents"]
# Name of the Workflow
$assoc = $list.WorkflowAssociations.GetAssociationByName("On Item Created","en-US")
$data = $assoc.AssociationData
$items = $list.Items
foreach($item in $items)
$wf = $manager.StartWorkFlow($item,$assoc,$data,$true)
$manager.Dispose()
$web.Dispose()
this gives me the following error
Exception calling "StartWorkflow" with "4" argument(s): "Value cannot be null."
At line:15 char:28
+ foreach($item in $items) { $workflow = $workFlowManager.StartWorkFlow($item,$wor ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : ArgumentNullException
The other PS Script
$sourceWebURL = '<URL>'
$sourceListName = '<List Name>'
$TargetWorkflow = '<Workflow Name>'
$spSourceWeb = Get-SPWeb $sourceWebURL
$spSourceList = $spSourceWeb.Lists[$sourceListName]
#Getting a Workflow manager object to work with.
$wfm = New-object Microsoft.SharePoint.WorkflowServices.WorkflowServicesManager($spSourceweb)
#Getting the subscriptions
$sub = $wfm.GetWorkflowSubscriptionService()
#Getting the specific workflow within the list of subscriptions on the specific list. (SP2010 associated workflows basically)
$WF = $sub.EnumerateSubscriptionsByList($spSourcelist.ID) | Where-Object {$_.Name -eq "$TargetWorkflow"}
#Getting a Workflow instance in order to perform my commands.
$wfis=$wfm.GetWorkflowInstanceService()
Foreach($item in $spSourceList){
#Creating the dictonary object I need to parse into StartWorkflow. This could be most other workflow commands.
$object = New-Object 'system.collections.generic.dictionary[string,object]'
$object.Add("WorkflowStart", "StartWorkflow");
$wfis.StartWorkflowOnListItem($WF, $item.ID, $object)}
Which then gives me this error.
Cannot convert argument "itemId", with value: "GUID", for "StartWorkflowOnListItem" to type "System.Int32": "Cannot convert the "GUID" value of type "System.Guid" to type
"System.Int32"."
At line:23 char:5
+ $wfis.StartWorkflowOnListItem($WF, $item.ID, $object)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodException
+ FullyQualifiedErrorId : MethodArgumentConversionInvalidCastArgument

Similar Messages

  • How do I manually start mDNSResponder

    Does anyone know how to start mDNSResponder without restarting the Mac?
    Summary of issue, is that one Mac (always the same one) on my network periodically fails to load mDNSResponder at start up. I know how to get it working which involves a Reboot which I'd like to avoid further. All machines use Leopard 10.5.6 connecting wirelessly to Airport Extreme.
    I have a related article which describes more detail but as it's been a complete unknown to me until now; I wished to re-ask my question in a new topic since now I have a better idea of what I want from the forum and can be more clear about it.
    Thanks, Cheers,.

    Thanks for your info. Starting to think I'm all wrong about this.
    I have no error messages telling me it's not running, just services not available. I now suspect it's it running but not correctly.
    I suspect this to be the culprit for my problem because when the issue arises the way I can fix it is to turn off the airport card and reboot, turn card back on after restart will result in the firewall asking me if I want to allow "configd" and "mDNSResponder". As soon as I allow the mDNSResponder all comes right instantly. I had one instance where it only asked for the "configd" allow and the issue remained active.
    I have noticed that when the issue is active i.e. no "shared" area in Finder sidebar or have the ability to connect to any network identities, the "configd" and "mDNSResponder" are active, quitting them and allowing them to restart doesn't change anything.
    A couple of time I will also get a message stating the local hostname is already in use and will be changed. Also our network isn't automatically selected from the list, as would normally happen. I don't know if this is related, seems like it might be.
    I'm also not sure if another major issue is related where the machine is signed up to the wrong local network IP. This has recently got a lot better after one of Apples recent updates. Still happens form time to time though and only happens with the one machine.
    I checked out the Airport Extreme settings and reset it and setup network from scratch. Same issues with same machine, never with the other machines which includes a PC and another Mac.
    Going to try something I should have tried ages ago as part of normal trouble shooting. Find out if the network settings are corrupted. Will let you know what I find.
    Maybe the easiest way to fix this will be to trash the machine and buy a new iMac.

  • How to manually start telnetd service With Solaris 8

    "ps -ef | grep telnetd", shows telnetd daemon is not running (though telnetd is listed and uncommented in /etc/inetd.conf). Checked /etc/services and /etc/hosts, but found no abnormality. How do I manually start up telentd service? Why telnetd failed to startup automatically upon system startup.

    You're kinda are walking on your own comments ...
    in.telnetd doesn't "run" at system startup. The inetd daemon controls in.telnetd and inetd is controlled by /etc/inetd.conf. Assuming in.telnetd is uncommented in /etc/inetd.conf, just run "netstat -na | grep 23" - you should see port 23 in a LISTEN state. inetd is doing the listening in this case. Once someone actually tries to connect to telnet on that server, THEN you'll see a in.telnetd process physically running on the box because inetd will fork off in.telnetd and hand the incoming telnet session to this new process.
    P.S. don't use telnet unless you have some application that physically must use telnet to do something on a box. Disable telnet completely and use SSH.

  • Workflow will not manually start - getting Server Error in '/' Application - Runtime Error

    I've tested so far in three site collections and I am not able to manually start a workflow. I am getting the below error
    Runtime Error
    Description: An application error occurred on the server. The current custom error
    settings for this application prevent the details of the application error from
    being viewed remotely (for security reasons). It could, however, be viewed by
    browsers running on the local server machine.
    Details: To enable
    the details of this specific error message to be viewable on remote machines,
    please create a <customErrors> tag within a "web.config" configuration
    file located in the root directory of the current web application. This
    <customErrors> tag should then have its "mode" attribute set to "Off".
    So, I jumped on the server and checked the logs and this is what I am getting below:
    Application error when access /_layouts/15/Workflow.aspx, Error=Method 'StartWorkflowOnListItem' in type 'Microsoft.SharePoint.WorkflowServices.FabricWorkflowInstanceProvider' from assembly 'Microsoft.SharePoint.WorkflowServices, Version=15.0.0.0, Culture=neutral,
    PublicKeyToken=71e9bce111e9429c' does not have an implementation.   at Microsoft.SharePoint.WorkflowServices.FabricSolutionProviderFactory.<.cctor>b__3(WorkflowServicesContext context)     at Microsoft.SharePoint.WorkflowServices.FabricSolutionProviderFactory.GetProvider[T](WorkflowServicesContext
    context)     at Microsoft.SharePoint.WorkflowServices.WorkflowServicesManager.GetProvider[T]()     at Microsoft.SharePoint.WorkflowServices.WorkflowServicesManager.GetWorkflowInstanceService()    
    at Microsoft.SharePoint.WorkflowService... 
    I would love some help if anybody has any suggestions.

    Hi,
    THis is a upgrade issue. Please check below
    https://social.technet.microsoft.com/Forums/windowsserver/en-US/b189e4b8-bb9e-4ade-a3d5-cd2e0f90e93f/workflow-not-working-after-installing-service-pack-1-and-patches?forum=sharepointadmin
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • Manually Start Workflows - Permissions

    I am seeing an issue where users cannot select the 'Workflow' button on an item because they do not have permission to manually start the workflow - they receive the 'This site has not been shared with you', Although they do have permission to run the workflow
    automatically.  I believe this is related to the workflow.aspx page.  If the user does not have permission to contribute to the site, they cannot manually execute a workflow on a list they have explicit contribute rights to.  Is there any farm
    wide fix for this?  I found this article:http://sharepoint.stackexchange.com/questions/115311/manually-start-sharepoint-2010-workflow-in-sharepoint-2013-farm
    But this would be a nightmare to maintain for each site.  Are there any other workarounds available?  Has there been a CU released to fix this?
    Thanks,
    Jesse
    Jesse A. Brandenburg

    Hi Jesse,
    By default, you must have the Edit Items permission to start a workflow. I understand you would like users with contribution permission be able to manually start a workflow.
    As workaround, we can use another ribbon or field to replace the OOTB button to manually start workflow. For example, you could create a checkbox (Yes/No) field in the list, and set it to be No as default. In the workflow, make it to automatically start
    when this checkbox value is Yes. Then users can manually start workflow via manually change this field's value.
    Regards,
    Rebecca Tu
    TechNet Community Support

  • How to start a Workflow with a Dynpro action button.

    Hi @ all,
    i have the problem, that i want to start a workflow with a self-made dynpro.
    The dynpro consist the following information who had to be transported in the workflow.
    Stacknr.
    User
    Date
    Time
    and a tif data file
    Somebody have an idea how it works?
    i am very new in workflow. So if you want to help me than please with a step by step guide.
    Thanks a lot.
    Regards Phil

    Hi,
    Please go through the wiki. There are plenty of instructions. Also, this is commonly discussed topic, so try to search first. The key for your problem is that there are function modules to tirgger workflows (either directly or with an event).
    Regards,
    Karri

  • How to automatically start a workflow?

    All,
    I need to start a workflow item automatically based upon a table insert. I was hoping to use a trigger, but I could do it from within the application too.
    I have a simple workflow itemtype defined in workflow builder. It has several attributes.
    I found the pl/sql procedure of LaunchProcess which does
    CreateProcess and StartProcess, so I guess I am to use this?
    How/where do I populate the attribute values?
    Thanks,
    Tim

    Hi Tim,
    You set the attribute values by using the procedures
    wf_engine.SetItemAttrText
    wf_engine.SetItemAttrNumber
    wf_engine.SetItemAttrDate
    depending on the datatype of your attribute.
    You may also wish to use the procedure
    wf_engine.SetItemOwner
    to indicate the role that owns the item you are launching.
    Thanks,
    Gavin

  • How to create new starting conditions for a workflow of shopping cart

    Hi all,
    How to create new starting conditions for a workflow of shopping cart
    SATYA

    Excecute SWB_COND
    Creating New:
    Click on Create button. If you cannot see that it could be a authorization issue
    then Business Object:  BUS2121
    Double Click the event linkage for one step workflow
    Define the expressions, Check Consistency and click on Traansfer
    Start Condition is created. If it is not Active click on the Red Button to make it Active
    Editing Already existing:
    Click on Edit Button If you cannot see that it could be a authorization issue
    then select Business Object:  BUS2121
    Click on the condition part (White area) of the start condtion needing editing
    Change the expressions, Check Consistency) and click on Traansfer.If it is not Active click on the Red Button to make it Active

  • How to avoid starting of workflow ?

    hi there,
    i have a problem:
    on BO BUS2089 (Travel) i have a event 'CREATED'
    on that event i have a workflow. everytime the event is raised the workflow starts. so far so good, BUT:
    i ONLY want to start the workflow when the travel-request is created in portal (ESS).
    But there is a direct way in backup where traveling-requests are entered by administration.
    how can i handle this to avoid starting the workflow when it is done in backend system (HR) ?
    reg, Martin

    Martin,
    You should be able to identify the program that is triggering the event. Take a look into the SY-CPROG. I am not absolutely sure, if this is the correct field, but check/compare all the fields in SY structure. There should be a difference between creating/changing the trip in ESS (with the web dynpro application) and creating/changing the trip in backend transaction.
    If you can find the difference, it should be an easy task to prepare a check function module for the CREATED event to prevent the workflow starting in the specific circumstances.
    There are probably also other alternatives, but this is something you should definately check.
    Regards,
    Karri

  • BIAPPS how can we manually set both ETL start date and end date?

    Dears experts,
    how can we manually set both ETL start date and end date while conducting incremental load IN DAC?
    Please advise me.
    thanks,
    Joe.

    You can set those dates in the DAC system parameters tab. You should see lots of $$xxxxxx parameters.
    If I may, I'd suggest you use the OBI Applications forum for questions on DAC.
    Antonio
    BExpert, Brazil

  • How to start a workflow when a value in specific column is changed?

    HI !! 
    I would like that  my workflow will run only if a value on a specific colunm will change.
    is there a way to do it without using a third colunm ?
    thank you !
    nikita.

    Hi,
    According to your post, my understanding is that you wanted to start a workflow when a value in specific column is changed.
    When you create workflow, if you check the “start the workflow automatically when an item is changed”, the workflow will be started automatically once the item is edited.
    In the other word, no matter which column we changed, the the workflow will be started automatically.
    As a workaround, we can add condition or action to make the workflow excute the next step only if the value in specific column is changed.
    There are two options to achieve it.
    Use the “Wait for Field Change in Current Item" action”. If you add the action at the first,  the workflow will excute the next step until the column is chaned to the specific value.
       2. User the “If any value equals to value” condition. If you add the condition at the first, the workflow will excute the next step if the condition is satisfied.
    Thank you for your understanding.
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • How to manually start Autoarchive?

    I have set my autoarchive as standard. run it every 14 days. and some subfolders are to be run every 7 days.
    I have problems with my folders are now full and also I have problems that my Outlook is VERY laggy when autoarchive runs.
    i wonder how i can manually trigger this autoarchive so I have more control of when it is runned.

    I Googled "outlook manually run autoarchive" and this was the first hit. Not sure why though because it doesn't tell me what I was looking for.
    If you're running Outlook 2010 like me, this is probably what you're looking for:
    "If you wish to manually run AutoArchive now, go to the File menu and select Info, click on Cleanup Tools, then Mailbox Cleanup and then click on the Auto Archive button." (I
    got it from here)

  • Complete workflow tasks before starting another workflow.

    Hello everyone
    I have a requirement in my project and i am not sure how to do that task in best possible way.
    I have a reviewer workflow where i will be creating approval tasks for 'n' number of reviewers (the reviewers we get it from initiation form).
    For example
    I have 4 reviewers and there will be 4 approval tasks (1 for each) that will be created and if I have a reply percentage (the people who reviewed
    the tasks assigned to them) set to say 50%. 
    Then if at least 2 reviewers are sending reply for the tasks assigned to them then
    we can start another workflow manually and when that new workflow is starting we should complete all the tasks that are in progress for the review workflow
    If there are only 1 reviewer or no one is sending reply then we should not allow
    the new workflow to start and if anyone try to execute the workflow manually we should say “Minimum number of reviewers had not replied to the tasks assigned to them so we cannot start the workflow now. Retry later”.
    How to achieve this requirement? I already developed the 2 workflows that I discussed here and it is working correctly. I simply need to create this dependency condition
    between the 2 workflows as I discussed here. Please suggest me the proper way for achieving my requirement.
    Thanks
    K.Anantha rengan

    Hi K, the only way I can see this working is if you make the second workflow automatic, and have it start when the number of approvals reaches a certain number. This number would have to be in another column (possibly a calculated column).
    cameron rautmann

  • InfoPath 2013 start a workflow

    In a new InfoPath 2013 form that uses a custom list, I would like to add a custom button and/or something to click on for the user to eventually 'start a workflow when item changes'.
    Right now since I am in the early phase of the process, and it would be fine to 'start the process manually' also. Basically I would like directions on what a user can click to they could start the workflow.
    I found the following link and it shows how to start a workflow from the documents library:
    https://www.youtube.com/watch?v=afttEV61kQI
    I would like to know how to have this same process occur from an InfoPath 2013 form where the user clicks my 'button/item' and does not click on the 'auto generated' save button.

    assuming that the workflow should not necessarily start ANY time ANY file changes (which is a default option, and requires no custom dev effort)... what I've seen a few times, is for the form to include a checkbox ("start workflow")... the workflow
    starts, and checks for the condition... and stops if the checkbox is not checked.
    Scott Brickey
    MCTS, MCPD, MCITP
    www.sbrickey.com
    Strategic Data Systems - for all your SharePoint needs

  • Start PO workflow after approved from first level

    Hi Guys,
    I have i typical requirement i my knowledge its not possible.
    What exactly has happened is that after upgrade BUS2012 event linkage was not active and there where no workflow got triggered for PO approval
    But the line manager have gone and approved the POu2019s from ME29N now for the next level they are asking to send the workflow as we have activated the linkage.
    Any idea how can we start the workflow from that point again.
    Atul

    Hi Atul,
    In production how many workflow's are there like this?
    Its small amount of workflow's then you can again manually trigger the workflow using SWUE[You should pass the object key as purchase order number] and Complete the first level of workflow.
    So it will be go for Second level of Approval.
    If you have large amount of workflows that are already Triggered in production, then you have to discuss with your client about the issue.
    Thanks,
    Viji.

Maybe you are looking for

  • ORA-01034 help please

    Recently recieved a copy of the developer kit for linux which included Oracle 8i enterprise. I followed the instructions found in the install guide (even printed it for reference) When the install was finished I followed the instructions in the admin

  • SDHC format issue?

    hi there~! I want to switch from memory stick cameras to SDHC camera... I read that SDHC is not backwards compatible, and that it has a different way of adressing the memory blah blah... so... since it says FAT32 formatted, my question is: "is this c

  • CS6 install on Mac OS X

    Hi there - new Mac user. Previously installed CS5.5 on PC with no problems. I get this error on install: Serial number you provided is valid, but a qualifying product could not be found on this computer. I selected the only available CS6 download fro

  • KM Access through java

    Hi Experts, I want to write a Java application, which would acess the SAP Knowledge Managemnet i want to build the functionality like Uploading/Downloading a documet into KM Creating a Folder in KM Does the KMApi will be useful in this application Pl

  • IPhone 3G in BMW X5.

    iPhone 3G in BMW X5. Up to a year ago I could see all my contacts through the screen in the car, but now I can only see them up to the letter "M". BMW say Apple will need to change the software. Has anyone else had/solved this issue? Many thanks to a