SharePoint Designer — N Custom aktiwiteit gebruiker-gedefinieerde C # funksies uit te voer

UPDATE: Dit is vrygestel na CodePlex hier: http://www.codeplex.com/spdwfextensions

UPDATE: Kyk hier vir die jongste vrystellingsaantekeninge: http://paulgalvin.spaces.live.com/blog/cns!1CC1EDB3DAA9B8AA!381.entry

UPDATE: Kyk hier my gedagtes oor die kommersialisering van hierdie projek: 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 (stuur) any C# function that you incorporated into the linked assembly.

Vanaf die einde van Oktober, 2007, this is just an initial version of the project. I plan to expand it with a number of additional functions, insluitend substring, indeks, vervang, 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.

As jy enige kommentaar het, vrae of voorstelle, laat hulle asseblief in die kommentaar of epos my.

Vrywaring:

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

Installasie stappe (gevolg moet word vir elke WFE die plaas):

1. Aflaai die zip en onttrek.

2. Install the .dll into the GAC. I usually open c:\windows vergadering deur gebruik te maak van Windows Explorer en kopieer dit daar.

3. Verander Web.config om die vergadering by te voeg tot die veilige beheer:

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

<authorizedType Vergadering = "SpdGenericInterface, Weergawe = 1.0.0.0, Culture = neutral, PublicKeyToken = abe076fd8125f3c4" Naamruimte = "Nivlag-" Type Name = "*" Gemagtigde = "Ware" />

4. Copy "SpdGenericInterface.actions" tot C:\Program Files Common Files Microsoft Shared Web Server Extensions 12 TEMPLATE 1033 Workflow

Let daarop dat die plek is wat spesifiek is aan die Engelse taal installasies.

5. Sluit SharePoint Designer (as dit is reeds oop).

6. iisreset

7. Open Internet DOCUP en die skep van 'n nuwe workflow.

As alles goed gaan, jy moet beloon word met 'n nuwe kategorie van aksie:

beeld

Notas:

Sien hier (http://blogs.msdn.com/sharepointdesigner/archive/2007/03/15/adding-activities-to-spd.aspx) vir 'n geweldige oorsig van die proses vir die skep van, installering en instel van 'n oplossing soos hierdie.

. Zip is ontwerp om direk te onttrek aan jou c:\ drive. If you do this, jy die projek kan oopmaak en al die paaie sal in ooreenstemming wees.

Om dit te gebruik in die Visual Studio, jy waarskynlik nie nodig om te installeer "Uitbreidings vir Windows WF".

Die aanvanklike oplaai bevat net een "planner funksie", "ToLower()". To add more functionality, voeg dit by die uitvoer metode soos getoon:

 beskerm oorheers ActivityExecutionStatus
          Voer(ActivityExecutionContext executionContext)
        {

            string functionToDispatch;
            functionToDispatch = hierdie.DispatchFunction.ToLower();

            skakel (functionToDispatch)
            {
                geval "Tolower()":
                    {
                        hierdie.OutResult1 = hierdie.InParam1.ToLower();
                        breek;
                    }

                default:
                    {
                        hierdie.OutResult1 = "Onbekende funksie: [" + hierdie.DispatchFunction + "].";
                        breek;
                    }
            }

            terugkeer ActivityExecutionStatus.Gesluit;
        } // ActivityExecutionStatus

    }

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

9 gedagtes oor "SharePoint Designer — N Custom aktiwiteit gebruiker-gedefinieerde C # funksies uit te voer

  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.
    Ek opgelos self die probleem.
    Past the actions from "SpdGenericInterface.actions" into the "WSS.actions" file and it everything worked. I hope this helps others.
    Antwoord
  2. Marco Mancinelli
    Dit klink goed, maar ek kan nie die installering van die uitbreiding =(
    my Designer con sien nie, maar wanneer ek op niks verskyn… help asseblief… tnx.
    Antwoord
  3. Bernard Lambeth

    I’m using this custom activity to Replace() funksie. 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 web)
    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(), sowel. Have you seen this error? Do you have any suggestions on how to resolve it?

    Antwoord

Laat 'n antwoord te Marco Mancinelli Kanseleer antwoord

Jou e-posadres sal nie gepubliseer word nie. Verpligte velde gemerk *