locked
Custom WF or SPD WF ? RRS feed

  • Question

  • Want to create an Approval WF (and it must be sent as a WSP Package) for a SP2010 site.

     Dont know where / how to start.

    METHOD01  -> C# method that i need to use/call.

    1. When an Item in the custom List is created - some condition needs to be checked, if the status is false, i need to the workflow to start or if its true -  METHOD01 has to start (no WF in that case)

    2.  If the WF starts - it has to send email to a person(those details will be in the new list item's column.

    3. If the person didnt approve/reject within 3 or 4 days, an email has to goto someone else to approve this.

    if the outcome is approved -> i want a code(METHOD01 ) to run.

    Im relatively much new to WF - but hv worked in .net/sharepoint for sometime

    So dont know whether i hv to go ahead and use Custom WF or create a WF in designer and export it to VS 2010  

    Also, if any1 cud help me with some steps to start, it will be great. I checked couple of Approval WFs video - but im not much comfortable to proceed.

    thanks :)

    Tuesday, March 1, 2011 6:57 PM

Answers

  • Based on your requirement, there are two specific functionalities : 1. Trigger an Event Receiver for a custom list and 2. Start a workflow based on a field.

    Though, as suggested by others, there are many ways to achieve this, I suggest that you take the VS 2010 Workflow[check this] route and achieve expected results much more quickly[one solution for the trigger and workflow], instead of experimenting different options.

    Though you can start some part of the reusable workflow in SPD and import into VS 2010 [http://msdn.microsoft.com/en-us/library/ee231580(VS.100).aspx]

    • Marked as answer by JohnnyDash Wednesday, March 2, 2011 9:08 PM
    Tuesday, March 1, 2011 9:16 PM

All replies

  • Greetings,

    The first parts are easy.  Item 3 is posibly tricky.  If the idea of an escalation is a bit harder to do in a SharePoint Designer type environment.  As is the calling of code. However you can create some custom activities that can be published to SPD that can really accomplish this creatively.  Have a look at the following

    http://msdn.microsoft.com/en-us/library/ms564355.aspx

    http://www.microsoft.com/downloads/en/details.aspx?FamilyID=8c619bef-008b-4af2-9687-8a05848fea97

    Also

    http://msdn.microsoft.com/en-us/library/bb629922.aspx

    Tuesday, March 1, 2011 7:04 PM
  • As chris said, the first three parts are easy to do using SPD, but what method do you have to do? maybe you can also achieve something with SPD workflows and make your whole solution using the same technique.
    Mohamed Derhalli ||| SharePoint Specialist ||| http://Path2SharePoint.com
    Tuesday, March 1, 2011 7:18 PM
  • Based on your requirement, there are two specific functionalities : 1. Trigger an Event Receiver for a custom list and 2. Start a workflow based on a field.

    Though, as suggested by others, there are many ways to achieve this, I suggest that you take the VS 2010 Workflow[check this] route and achieve expected results much more quickly[one solution for the trigger and workflow], instead of experimenting different options.

    Though you can start some part of the reusable workflow in SPD and import into VS 2010 [http://msdn.microsoft.com/en-us/library/ee231580(VS.100).aspx]

    • Marked as answer by JohnnyDash Wednesday, March 2, 2011 9:08 PM
    Tuesday, March 1, 2011 9:16 PM
  • Friends,

    Thanks for the links :)

    I have started - with creating Custom WF which is relatively easy for me to understand the basic things.

     

    When I create a TASK for the approval - it has other default options like : InProgress, Completed, Deferred etc..  But I want the Approver to see only Approve/Reject.

     

    Wednesday, March 2, 2011 9:10 PM