SharePoint Deseño — Actividade personalizada para realizar definidos polo usuario C # funcións

Actualización: Este foi lanzado para CodePlex aquí: http://www.codeplex.com/spdwfextensions

Actualización: Vexa aquí as notas de lanzamento máis recentes: http://paulgalvin.spaces.live.com/blog/cns!1CC1EDB3DAA9B8AA!381.entry

Actualización: Aquí tes os meus pensamentos sobre a comercialización deste proxecto: 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 (expedición) any C# function that you incorporated into the linked assembly.

A partir de finais de outubro, 2007, this is just an initial version of the project. I plan to expand it with a number of additional functions, incluíndo substring, índice, substituír, 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.

Se tes algunha comentarios, dúbidas ou suxestións, por favor, deixe nos comentarios ou enviar correo-e me.

Renuncia:

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

Os pasos de instalación (a seguir para cada WFE na facenda):

1. Baixo o zip. E extraer.

2. Install the .dll into the GAC. I usually open c:\windows assembly usando o Windows Explorer e copia-lo alí.

3. Modificar web.config para engadir o assembly para os controis de seguridade:

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

<authorizedType Assembly="SpdGenericInterface, Version = 1.0.0.0, Culture = neutral, PublicKeyToken = abe076fd8125f3c4" Namespace="Nivlag" TypeName="*" Authorized="True" />

4. Copy "SpdGenericInterface.actions" para C:\Arquivos de programas Arquivos comúns Microsoft Shared web server extensions 12 template 1033 Fluxo de Traballo

Nótese que a situación anterior é específica para instalacións de idioma inglés.

5. SharePoint Deseño Pechar (se xa está aberto).

6. iisreset

7. Abre SPD e crear un novo fluxo de traballo.

Se todo vai ben, ten que ser recompensado cunha nova categoría de acción:

imaxe

Notas:

Ver aquí (http://blogs.msdn.com/sharepointdesigner/archive/2007/03/15/adding-activities-to-spd.aspx) para unha visión xeral óptimo do proceso para crear, instalar e configurar unha solución como esta.

O zip. Está deseñado para extraer directamente a vostede c:\ drive. If you do this, pode abrir o proxecto e os camiños serán consistentes.

Para usar isto no Visual Studio, you probably need to install "Extensions for Windows WF".

The initial upload contains just one "dispatcher function", "ToLower()". To add more functionality, engadir lo ao método de execución como se mostra:

 protexido substituír ActivityExecutionStatus
          Executar(ActivityExecutionContext executionContext)
        {

            corda functionToDispatch;
            functionToDispatch = este.DispatchFunction.ToLower();

            cambiar (functionToDispatch)
            {
                caso "tolower()":
                    {
                        este.OutResult1 = este.InParam1.ToLower();
                        romper;
                    }

                defecto:
                    {
                        este.OutResult1 = "Unknown function: [" + este.DispatchFunction + "].";
                        romper;
                    }
            }

            volver ActivityExecutionStatus.Pechado;
        } // ActivityExecutionStatus

    }

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

9 pensamentos sobre "SharePoint Deseño — Actividade personalizada para realizar definidos polo usuario C # funcións

  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.
    Eu resolvín o problema só.
    Past the actions from "SpdGenericInterface.actions" into the "WSS.actions" file and it everything worked. I hope this helps others.
    Responder
  2. Marco mancinelli
    está bo, pero eu non podo instalar a extensión =(
    meu Deseño con velo, pero cando premer sobre el nada aparecer… por favor me axude… tnx.
    Responder
  3. Bernard Lambeth

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

    Responder

Deixe unha resposta Marco mancinelli cancelar resposta

Enderezo de correo electrónico non será publicado. Os campos obrigatorios están marcados *