SharePoint Designer — Прилагодено активност да се изврши кориснички дефинирани 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.

Ако имате било какви коментари, прашања или сугестии, Ве молиме оставете ги во коментари или е-мејл мене.

Општи услови:

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

Инсталација чекори (треба да се следи за секој 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" на C:\Program Files Common Files Мајкрософт Муабет веб сервер екстензии 12 ОБРАЗЕЦ 1033 Работното

Забележете дека погоре локација е специфична за англиски јазик инсталации.

5. Затвори SharePoint Designer (ако тоа е веќе отворен).

6. iisreset

7. Отвори СПД и да се создаде нов работното.

Ако се оди добро, треба да биде награден со нова категорија на акција:

сликата

Белешки:

Види тука (http://blogs.msdn.com/sharepointdesigner/archive/2007/03/15/adding-activities-to-spd.aspx) за страшно преглед на процесот за создавање, инсталирање и конфигурирање на решение како ова.

На. 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 размислувања за "SharePoint Designer — Прилагодено активност да се изврши кориснички дефинирани C # функции

  1. Гери Витворт
    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. Marco mancinelli
    Здраво на сите,
    секој може да се објасни што web.config датотека морам да ја менувате? Ве молиме одговорете наскоро.
  3. Marco mancinelli
    тоа звучи добро, но не можам да го инсталирате додатокот =(
    мојата дизајнер един го видиме, но кога ќе кликнете на неа ништо не се појави… Ве молиме помогнете… tnx.
  4. 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 Откажи одговор

Вашата е-маил адреса нема да бидат објавени. Задолжителни полиња се означени *