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 і скапіруйце яго туды.

3. Змяніць web.config дадаць зборку ў бяспечныя элементы кіравання:

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

<authorizedType Assembly="SpdGenericInterface, Version = 1.0.0.0, Культура = нейтральнай, PublicKeyToken = abe076fd8125f3c4" Namespace="Nivlag" TypeName="*" Authorized="True" />

4. Copy "SpdGenericInterface.actions" З:\Program Files Common Files Microsoft Shared пашырэньні вэб-сервера 12 TEMPLATE 1033 Workflow

Заўважым, што прыведзеныя размяшчэнне характэрных для ангельскай мовы установак.

5. Зачыніць SharePoint Designer, (калі ён ужо адкрыты).

6. IISReset

7. Адкрыйце SPD і стварыць новы працоўны працэс.

Калі ўсё пойдзе добра, Вы павінны быць ўзнагароджаныя з новай катэгорыяй дзеянні:

малюнак

Заўвагі:

Паглядзець тут (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
    гэта гучыць горда, але я не магу ўсталяваць пашырэнне =(
    мой дызайнер Con бачыць гэта, але калі я націскаю на яго нічога не з'яўляецца… калі ласка, дапамажыце… 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 адмяніць адказ

Ваш электронны адрас не будзе апублікаваны. Абавязковыя палі пазначаныя * *