Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. SharePoint
  4. Workflow question

Workflow question

Scheduled Pinned Locked Moved SharePoint
csharpsharepointvisual-studiotutorialquestion
6 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Aptiva Dave
    wrote on last edited by
    #1

    I'm looking to create a workflow in sharepoint 2010 using Visual Studio. What I want this workflow to do is run automatically at 7am every monday morning and email out the weekly lunch menu for our cafeteria. I already have a list that holds the menus, so I am wanting the workflow to pick up all of the menus within the week and put them into an email. Every tutorial I see is for creating a workflow that starts when something is created or changed, but that isn't what I want. If anyone could point me to a tutorial, that would be great, because I don't see anything online so far.

    I 1 Reply Last reply
    0
    • A Aptiva Dave

      I'm looking to create a workflow in sharepoint 2010 using Visual Studio. What I want this workflow to do is run automatically at 7am every monday morning and email out the weekly lunch menu for our cafeteria. I already have a list that holds the menus, so I am wanting the workflow to pick up all of the menus within the week and put them into an email. Every tutorial I see is for creating a workflow that starts when something is created or changed, but that isn't what I want. If anyone could point me to a tutorial, that would be great, because I don't see anything online so far.

      I Offline
      I Offline
      Ingo
      wrote on last edited by
      #2

      That's because Workflows starts on events like changes or creation. You have to execute it from outside. Therefore you need a calling routine. In SharePoint it's a Custom Timer Job. Create a class that derives from SPJobDefinition. Override the public Execute-Method and call your workflow there. Yet, I didn't call a workflow from a Custom Timer Job myself. So you have to try how to do this, but that's the way howto I think.

      ------------------------------ Author of Primary ROleplaying SysTem How do I take my coffee? Black as midnight on a moonless night. War doesn't determine who's right. War determines who's left.

      A 1 Reply Last reply
      0
      • I Ingo

        That's because Workflows starts on events like changes or creation. You have to execute it from outside. Therefore you need a calling routine. In SharePoint it's a Custom Timer Job. Create a class that derives from SPJobDefinition. Override the public Execute-Method and call your workflow there. Yet, I didn't call a workflow from a Custom Timer Job myself. So you have to try how to do this, but that's the way howto I think.

        ------------------------------ Author of Primary ROleplaying SysTem How do I take my coffee? Black as midnight on a moonless night. War doesn't determine who's right. War determines who's left.

        A Offline
        A Offline
        Aptiva Dave
        wrote on last edited by
        #3

        So, could I just have all my functionality in the custom timer job instead of a workflow? I don't think that this issue I'm working on would need an actual workflow, so I would assume that I can access my list objects from there.

        I 1 Reply Last reply
        0
        • A Aptiva Dave

          So, could I just have all my functionality in the custom timer job instead of a workflow? I don't think that this issue I'm working on would need an actual workflow, so I would assume that I can access my list objects from there.

          I Offline
          I Offline
          Ingo
          wrote on last edited by
          #4

          Aptiva Dave wrote:

          So, could I just have all my functionality in the custom timer job instead of a workflow?

          Well, you could do that, I think. There is nothing coming in my head that won't work from a timer job (on the other hand I just started with SharePoint and I don't know everything). Building a workflow is easier to build and of cause you can set it up for multiple WSCs. I would create the Workflow and start it with the Timer Job but that's only my opinion.

          ------------------------------ Author of Primary ROleplaying SysTem How do I take my coffee? Black as midnight on a moonless night. War doesn't determine who's right. War determines who's left.

          A 1 Reply Last reply
          0
          • I Ingo

            Aptiva Dave wrote:

            So, could I just have all my functionality in the custom timer job instead of a workflow?

            Well, you could do that, I think. There is nothing coming in my head that won't work from a timer job (on the other hand I just started with SharePoint and I don't know everything). Building a workflow is easier to build and of cause you can set it up for multiple WSCs. I would create the Workflow and start it with the Timer Job but that's only my opinion.

            ------------------------------ Author of Primary ROleplaying SysTem How do I take my coffee? Black as midnight on a moonless night. War doesn't determine who's right. War determines who's left.

            A Offline
            A Offline
            Aptiva Dave
            wrote on last edited by
            #5

            So, I was able to do everything I wanted within the custom timer, which has opened up a whole bunch of other functionality that I can put into my site. I'll leave the workflows to the business processes.

            I 1 Reply Last reply
            0
            • A Aptiva Dave

              So, I was able to do everything I wanted within the custom timer, which has opened up a whole bunch of other functionality that I can put into my site. I'll leave the workflows to the business processes.

              I Offline
              I Offline
              Ingo
              wrote on last edited by
              #6

              Good, glad that I was able to help. :)

              ------------------------------ Author of Primary ROleplaying SysTem How do I take my coffee? Black as midnight on a moonless night. War doesn't determine who's right. War determines who's left.

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups