Workflow question
-
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'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.
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.
-
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.
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.
-
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.
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.
-
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.
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.
-
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.
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.