Sharepoint Designer — Custom գործունեություն իրականացնել օգտվողի սահմանված գործառույթները, C #

ԹԱՐՄԱՑՆԵԼ: Սա արդեն ազատ է արձակվել CodePlex այստեղ: http://www.codeplex.com/spdwfextensions

ԹԱՐՄԱՑՆԵԼ: Տես այստեղ վերջին բացթողնման գրառումների: http://paulgalvin.spaces.live.com/blog/cns!1CC1EDB3DAA9B8AA!381.entry

ԹԱՐՄԱՑՆԵԼ: Տես այստեղ իմ մտքերի վրա առեւտրայնացումը այս նախագիծը: http://paulgalvin.spaces.live.com/blog/cns!1CC1EDB3DAA9B8AA!569.entry

This project provides a custom activity in SharePoint Designer. Use this custom activity to invoke (ուղարկել) any C# function that you incorporated into the linked assembly.

Ինչ վերաբերում է հոկտեմբերի վերջին, 2007, this is just an initial version of the project. I plan to expand it with a number of additional functions, այդ թվում ենթատող, ինդեքս, փոխարինել, invoking web services and anything that seems useful or interesting. I also plan to post this to codeplex once I have my act together on that front. This will also be deployable as a solution at some point.

Եթե ​​ունեք մեկնաբանություններ, Առաջարկությունների կամ, խնդրում ենք թողնել նրանց մեկնաբանություններում կամ email me.

Ուրացում:

I make absolutely no claims as to the suitability of this for any purpose. Use at your own risk.

Installation քայլերը (պետք է հետեւել յուրաքանչյուր WFE է տնտեսությունում):

1. Բեռնել: ZIP եւ հանել.

2. Install the .dll into the GAC. I usually open c:\Windows ժողովը, օգտագործելով Windows Explorer եւ պատճենը, այն կա.

3. Փոփոխել web.config որպեսզի ավելացնեք ժողովին անվտանգ ստուգումների:

<System.Workflow.ComponentModel.WorkflowCompiler>
<authorizedTypes>

<authorizedType Assembly="SpdGenericInterface, Տարբերակ = 1.0.0.0, Մշակույթ = չեզոք, PublicKeyToken = abe076fd8125f3c4" Namespace="Nivlag" TypeName="*" Authorized="True" />

4. Copy "SpdGenericInterface.actions" to C:\Ծրագիր Ֆայլեր Common Files Microsoft Համատեղ վեբ սերվերի ընդարձակման 12 template 1033 փաստաթղթաշրջանառության

Նշենք, որ վերը նշված վայրը յուրահատուկ է Անգլերեն լեզվի շահագործում.

5. SharePoint Designer Close (եթե դա արդեն բացել).

6. iisreset

7. Բացիր SPD եւ ստեղծել նոր աշխատանքի.

Եթե ​​բոլոր լավ գնում, դուք պետք է պարգեւատրվել է նոր կարգի միջոցառումների:

պատկեր

Notes:

Տեսնել այստեղ (http://blogs.msdn.com/sharepointdesigner/archive/2007/03/15/adding-activities-to-spd.aspx) մի սարսափելի ամփոփ գործընթացի ստեղծման համար, տեղադրելու եւ Configuring լուծում նման.

The ... ZIP նախագծված է հանենք ուղղակիորեն Ձեզ գ:\ drive. If you do this, Դուք կարող եք բացել ծրագիրը, եւ բոլոր ճանապարհները կլինեն հետեւողական.

Օգտագործել այս է Visual Studio, you probably need to install "Extensions for Windows WF".

The initial upload contains just one "dispatcher function", "ToLower()". To add more functionality, ավելացնել այն կատարել մեթոդը, ինչպես ցույց է տրված:

 պաշտպանված ոտնատակ տալ ActivityExecutionStatus
          Կատարել(ActivityExecutionContext executionContext)
        {

            լարային functionToDispatch;
            functionToDispatch = սա.DispatchFunction.ToLower();

            անջատիչ (functionToDispatch)
            {
                գործ "tolower()":
                    {
                        սա.OutResult1 = սա.InParam1.ToLower();
                        կոտրել;
                    }

                անհոգություն:
                    {
                        սա.OutResult1 = "Unknown function: [" + սա.DispatchFunction + "].";
                        կոտրել;
                    }
            }

            վերադարձ ActivityExecutionStatus.Փակ;
        } // ActivityExecutionStatus

    }

Ապա, re-build the project and copy the assembly to the GAC. I expect an iisreset would be required.

9 thoughts on "Sharepoint Designer — Custom գործունեություն իրականացնել օգտվողի սահմանված գործառույթները, C #

  1. Gerry Whitworth
    I followed his directions and everything seemed to work until I choose the action in SP Designer. The designer did not paste the code in the workflow. I sent this guy an email and I guess he is too busy to respond.
    Ես լուծել խնդիրը ինձ.
    Past the actions from "SpdGenericInterface.actions" into the "WSS.actions" file and it everything worked. I hope this helps others.
  2. Bernard Lambeth

    I’m using this custom activity to Replace() ֆունկցիա. The farm is SharePoint 2007, with load-balanced web front-ends. I am getting intermittent failure to start errors, but the workflows usually restart in 5 – 15 min. I believe the timer jobs Workflow and Workflow Failover are restarting the workflows. I reviewed the SharePoint logs, and finally caught this error.

    RunWorkflow: Microsoft.SharePoint.SPException:
    at Microsoft.SharePoint.Workflow.SPNoCodeXomlCompiler.LoadXomlAssembly(String assmNameIn, SPWeb վեբ)
    at Microsoft.SharePoint.Workflow.SPWinOeHostServices.CreateInstance(Guid trackingId, SPWorkflow workflow)
    at Microsoft.SharePoint.Workflow.SPWinOeEngine.RunWorkflow(Guid trackingId, SPWorkflowHostService host, SPWorkflow workflow, Collection`1 events, TimeSpan timeOut)
    at Microsoft.SharePoint.Workflow.SPWorkflowManager.RunWorkflowElev(SPWorkflow originalWorkflow, SPWorkflow workflow, Collection`1 events, SPRunWorkflowOptions runOptions)

    I found a reference to this error on another blog, http://www.kentd.com/index.php/all-blog/218-nivlag-and-spdgenericinterface. The author indicated he was using the custom actitivity Replace(), ինչպես նաեւ. Have you seen this error? Do you have any suggestions on how to resolve it?

Թողնել Պատասխանել Marco mancinelli Ավելացնել կարծիք Չեղարկել պատասխանել

Ձեր էլ. Փոստի հասցեն չի հրապարակվելու. Պահանջվող դաշտերը նշված են աստղանիշով *