SharePoint Designer — Attività Custom biex tesegwixxi l-utent definiti C # funzjonijiet

UPDATE: Dan ġie rilaxxata għall CodePlex hawn: http://www.codeplex.com/spdwfextensions

UPDATE: Ara hawn għal noti rilaxx aħħar: http://paulgalvin.spaces.live.com/blog/cns!1CC1EDB3DAA9B8AA!381.entry

UPDATE: Ara hawn għal ħsibijiet tiegħi fuq il-kummerċjalizzazzjoni dan il-proġett: 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 (dispaċċ) any C# function that you incorporated into the linked assembly.

Bħala ta 'Ottubru tard, 2007, this is just an initial version of the project. I plan to expand it with a number of additional functions, inklużi substring, indiċi, jissostitwixxu, 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.

Jekk għandek xi kummenti, mistoqsijiet jew suġġerimenti, jekk jogħġbok jħallu lilhom fil-kummenti jew email me.

Ċaħda ta 'responsabbiltà:

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

Passi installazzjoni (li għandhom jiġu segwiti għal kull WFE fil-farm):

1. Niżżel il-. Zip u estratt.

2. Install the .dll into the GAC. I usually open c:\użu twieqi assemblaġġ twieqi Explorer u kopja hemm.

3. Timmodifika web.config li żżid l-assemblea għall-kontrolli sikuri:

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

<authorizedType Assembly="SpdGenericInterface, Verżjoni = 1.0.0.0, Kultura = newtrali, PublicKeyToken = abe076fd8125f3c4" Namespace="Nivlag" TypeName="*" Authorized="True" />

4. Copy "SpdGenericInterface.actions" sa C:\Program Files Files Komuni Microsoft maqsuma estensjonijiet web server 12 TEMPLATE 1033 Workflow

Innota li l-post ta 'hawn fuq huwa speċifiku għall-installazzjonijiet tal-lingwa Ingliż.

5. Designer SharePoint Agħlaq (jekk huwa diġà miftuħa).

6. iisreset

7. Iftaħ SPD u toħloq workflow ġdida.

Jekk kollox imur sew, inti għandek tkun ippremjata bi kategorija ġdida ta 'azzjoni:

immaġni

Noti:

Ara hawn (http://blogs.msdn.com/sharepointdesigner/archive/2007/03/15/adding-activities-to-spd.aspx) għal ħarsa terrific tal-proċess għall-ħolqien, installazzjoni u l-konfigurazzjoni ta 'soluzzjoni bħal din.

Il. Zip hija mfassla biex estratt direttament lilek c:\ drive. If you do this, inti tista 'tiftaħ il-proġett u l-mogħdijiet kollha ser ikunu konsistenti.

Biex tuża dan studio viżwali, you probably need to install "Extensions for Windows WF".

The initial upload contains just one "dispatcher function", "ToLower()". To add more functionality, iżżidhiex mal-metodu Teżegwixxi kif muri:

 protetti override ActivityExecutionStatus
          Teżegwixxi(ActivityExecutionContext executionContext)
        {

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

            jaqilbu (functionToDispatch)
            {
                każ "tolower()":
                    {
                        dan.OutResult1 = dan.InParam1.ToLower();
                        break;
                    }

                default:
                    {
                        dan.OutResult1 = "Unknown function: [" + dan.DispatchFunction + "].";
                        break;
                    }
            }

            ritorn ActivityExecutionStatus.Magħluq;
        } // ActivityExecutionStatus

    }

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

9 ħsibijiet dwar "SharePoint Designer — Attività Custom biex tesegwixxi l-utent definiti C # funzjonijiet

  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.
    I solved the problem myself.
    Past the actions from "SpdGenericInterface.actions" into the "WSS.actions" file and it everything worked. I hope this helps others.
  2. Marco mancinelli
    it sounds good, but I can’t install the extension =(
    my Designer con see it but when i click on it nothing appear… please help… tnx.
  3. Bernard Lambeth

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

    1. Paul Galvin awtur Post

      Sorry I never responded. At thi’s point, it’s probably moot. Nispera li inti kienu kapaċi biex issolvihom.

Ħalli Irrispondi

Your email address mhux se jkun ippubblikat. Meħtieġa oqsma huma mmarkati *