SPD sérsniðna Workflow aðgerðir — band meðferð aukahluti

Um viku síðan, I started up a codeplex project that provides a simple and reasonably generic method for adding custom action functions to SharePoit Designer workflow. It’s described here: http://www.codeplex.com/spdwfextensions. Beyond simply providing a framework, it also aims to provide a set of useful functions that will make SPD more useful/flexible/powerful.

Here are the current planned features for version 1.0: https://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=spdwfextensions&ReleaseId=8280

If anyone has any interest in this project, please leave a comment or start/add to a discussion here: http://www.codeplex.com/spdwfextensions/Thread/List.aspx

Here are the current set of functions that have been coded (though not fully tested as of 11/08/07):

Virka Lýsing (ef ekki sama og. Hreinar virka)
NUM-færslur() Skilar fjölda "færslur" in a string as per a specified delimiter.

Til dæmis: Num-entries in a string "a,B,c" with delimiter "," = 3.

Entry() Returns the nth token in a string as per a specified delimiter.
Lengd String.Length
Skipta() String.Replace()
Inniheldur() String.Contains()
Returns the word "true" or the word "false".
Hlutstreng(byrja) String.Substring(byrja)
Hlutstreng(byrja,enda) String.Substring(byrja,enda)
ToUpper() String.ToUpper()
ToLower() String.ToLower()
StartsWith() String.StartsWith()
Returns the word "true" or the word "false".
EndsWith() String.EndsWith()
Returns the word "true" or the word "false".

Quick & auðvelt url Encoding skrifborð gagnsemi

Ég hef verið að þurfa að url-umrita sumir strengi í þessari viku og löðrungur saman aa lítið tól sem ég hélt að ég myndi setja upp á SkyDrive fyrir samfélagið.

Fáðu tvöfaldur hér: http://cid-1cc1edb3daa9b8aa.skydrive.live.com/self.aspx/SharePoint/WinUrlEncode.zip

Fáðu Visual Studio lausn hér: http://cid-1cc1edb3daa9b8aa.skydrive.live.com/self.aspx/SharePoint/WinUrlEncodeVS2005.zip

Hér er skjámynd:

mynd

Fljótur og þægilegur: Fella inn tengil inn gögn view Web Part XSLT

UPDATE (01/17/08): Þetta blogg viðræður færslu um meira tengil XSL gæsku: http://www.sharepointsecurity.com/blog/sharepoint/sharepoint-2007-development/rewriting-links-in-search-results-xslt.

Yfirlit og Markmið: I had created a simple bar chart to serve as component on a dashboard. I’ll save the details on building charts for another post, en ég vissi ekki finna það tækni (né spurningarmerki, fyrir þessi efni). It turned out there was a bug in the chart and while I fixed that, I took the opportunity to convert some labels into hyperlinks that pointed at the underlying list behind the graph. Til dæmis, there is a label with value "Hold". I wanted to turn the label into a hyperlink so that the user could click on it and drill down to the specific entries in the list whose status value is "Hold".

Steps:

  1. Nota Visual Studio fyrir SharePoint-meðvitaðir IntelliSense.
  2. Afritaðu DVWP er XSLT inn í Visual Studio (búa til auðan verkefni, bæta XSL skrá til verkefnisins).
  3. Afrita á tengilinn sem þú vilt nota í klemmuspjald.
  4. Límdu hana í réttum stað í XSL.
  5. Convert URL argument separators on the query string from "&" to "&magnara;"
  6. Url-umrita einstakar röksemdir.
  7. Vefja sem inni <a href…> </a>

Dæmi:

Ég er með vefslóð:

HTTP://[miðlara]/[síða]/Listar / Open% 20Positions/AllItems.aspx?Skoða ={84EEA2F5-121B-40B7-946F-0FA704A1DAA1}&FilterField1 = Recruiter&FilterValue1 = Hold

Ég umbreyta það inn:

     <a href="Listar / Open% 20Positions/AllItems.aspx?Skoða =% 7b84EEA2F5-121B-40B7-946F-
0FA704A1DAA1}&magnara;FilterField1 = Recruiter&magnara;FilterValue1 = Hold"> Halda: </a>

Ég hef höndunum umbreytt fyrsta rifrildi frá:

{84EEA2F5-121B-40B7-946F-0FA704A1DAA1}

að:

%7b84EEA2F5-121B-40B7-946F-0FA704A1DAA1}

(Í þetta, opinn Brace umbreytir í% 7b og lokun borsveif umbreytir í% 7D)

Annað og þriðja rök’ breytur ("FilterField1=Recruiter" and "FilterValue1=Halda" sig) þarft ekki að vera url-kóðuð vegna þess að þeir innihaldi ekki nein hættuleg stafi.

Skýringar:

Þessi tækni ætti almennt að vinna hvar sem þú vilt að embed tengil í XSLT þar tengil inniheldur breytur á slóðinni svo sem:

HTTP://[miðlara]/[síða]/Listar / Open% 20Positions/AllItems.aspx?Skoða ={84EEA2F5-121B-40B7-946F-0FA704A1DAA1}&FilterField1 = Recruiter&FilterValue1 = Hold

Ég fékk slóðina sig með aðgang að sérsniðnum lista og höndunum sía á stöðudálknum (labeled "Recruiter" ofan).

Fljótleg og einföld: Virkja SharePoint Designer workflow að uppfæra InfoPath form

Atburðarás: I have an InfoPath form that front-ends a workflow process implemented using SharePoint Designer. At one point, a manager must approve the form. Since I cannot count on workflow history to meet my auditing requirements, Ég ákveð að geyma eigin endurskoðun skilaboð minn beint á formi sjálft.

Yfirlit:

Design the form and publish it as a efnisgerð and the form itself to a document library. Mark desired form fields as being updateable from MOSS. The form is tied to the content type and the content type is "attached" to a forms library (or many, if you want). Write a workflow that updates the field.

Specific Steps:

  1. Create a document library. This will hold your InfoPath template.
  2. Create a forms library.
  3. Create the InfoPath form. Include a text field, "Audit Message".
  4. Publish the form as a content type (NOT a document).
  5. While filling out the publishing dialogs:
    a) Save the .xsn file to the document library (stíga #1).
    B) Publish the "Audit Message" field and mark true: "Allow users to edit data in this field by using a datasheet or properties page".
    c) Create a new content type and give it an appropriate name.
  6. Access the forms library.
    a) Go to its advanced settings and enable the forms library to manage content types.
    B) Select the newly created content type (5c above). It will be grouped under "Microsoft InfoPath" (or similar).
    c) Remove the default "Form" content type from the library.
    d) Mark the library to "show as web page" so that the form will launch from SharePoint and not the InfoPath workstation client.
  7. Go back to the forms library proper and click "New" to simply verify that the form is posted correctly and acting as you want.
  8. Fire up SharePoint Designer and navigate to the site that hosts your form library (from step 2).
  9. Create a new workflow attached to the forms library.
  10. Add a single action "Set Field in Current Item". You should expect SharePoint Designer to list your your field, "Audit Message". Assign it a value.
  11. Click Finish and go back to the form library.
  12. Create a new form and put some test value into the "Audit Message" sviði.
  13. Save it and go back to the form library.
  14. Right-click, select "Workflow" and start up your workflow.
  15. It should run almost immediately. Pull up the form (from step 12) and if all has gone to plan, "Audit Message" has been assigned whatever value you provided in step 10.

Skýringar:

Not all controls may configured for this bi-directional communication. Til dæmis, it does not seem to implement an SPD workflow that modifies text fields wrapped inside repeating sections.

One of the key take-away’s here is that we’ve really created a content type with an associated template. This also enables us to store multiple InfoPath form templates in the same form library.

This requires forms server. It’s most certainly not going to work in a WSS 3.0 environment and probably even requires an Enterprise SharePoint environment.

The Beagle lentur (Október 2007 tölublað)

(Þetta er reyndar svolítið gamall fréttir, en eins og uppáhalds eldur stöð einkunnarorð mín kunngerir, "Better late than never").

Stöðva það út hér: http://www.sharepointbeagle.com/

Ef þú hefur ekki nú þegar, be sure to sign up.

Auðvitað, be sure to read minn hlutur about a real-world SharePoint project (þ.mt kröfur skilgreiningu, Er KPI, efnisgerðir, dashboards and more) as well as my colleague’s article about the content query web part.

There’s lot of other good stuff too.

Hvernig á að fjarlægja “Skoða allt innihald vefsvæðis” hlekkur

Ég spurði þessa spurningu næstum í hverri viku, venjulega í tengslum við öryggi umræðu. An administrator/site creator has provisioned a site, stilla öryggi, arranged web parts and customized the quick launch to provide that oh-so-perfect set of options to the end user. En, út af the kassi, you can’t remove the "view all site content" hlekkur.

Mark Wagner veitir svarið hér (http://www.crsw.com/mark/Lists/Posts/Post.aspx?ID=36). Hans skrifa-upp er frábær á tveimur stigum. Það veitir svar við spurningunni, "How do I remove the View All Site Content" hlekkur? Þá, það svarar strax eftirfylgni á spurningu: Hvernig get ég gera auðveldlega skoða öll efni á síðuna tengil á síðuna-við-síða grundvelli?

Sem bónus: Nálgun hans vinnur fyrir WSS, ekki bara MOSS.

</enda>

Gerast áskrifandi að bloggið mitt!

Mjög eiga Codeplex verkefni mitt: Workflow eftirnafn fyrir SharePoint Designer

UPDATE: Sjá hér (http://paulgalvin.spaces.live.com/blog/cns!1CC1EDB3DAA9B8AA!310.entry) fyrir nýjustu á þessu verkefni.

I created a CodePlex project today to house the Generic SPD interface code that I blogged about hér (http://paulgalvin.spaces.live.com/blog/cns!1CC1EDB3DAA9B8AA!275.entry).

Have a look at hér (http://www.codeplex.com/spdwfextensions) að sjá Codeplex verkefnið og sparka í dekk.

Ef þú ert áhuga á að vinna á þessu með mér, fire off an email at mailto:galvin.paul@gmail.com

SharePoint Designer — Custom virkni til að framkvæma notandi-útskýra C # virka

UPDATE: Þetta hefur verið gefið út til Codeplex hér: http://www.codeplex.com/spdwfextensions

UPDATE: Sjá hér fyrir nýjustu útgáfuna: http://paulgalvin.spaces.live.com/blog/cns!1CC1EDB3DAA9B8AA!381.entry

UPDATE: Sjá hér fyrir hugsunum mínum á commercializing þetta verkefni: 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 (senda) any C# function that you incorporated into the linked assembly.

Eins lok október, 2007, this is just an initial version of the project. I plan to expand it with a number of additional functions, including substring, Vísitala, replace, 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.

If you have any comments, spurningar eða ábendingar, vinsamlegast láta þá í athugasemdir eða sendu mér tölvupóst.

Fyrirvari:

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

Uppsetningu skref (að fylgja fyrir hvern WFE í bænum):

1. Sæktu. Zip og þykkni.

2. Install the .dll into the GAC. I usually open c:\Windows samkoma að nota Windows Explorer og afrita það þar.

3. Breyta web.config að bæta samkoma á örugga eftirlit:

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

<authorizedType Assembly="SpdGenericInterface, Útgáfa = 1.0.0.0, Menning = hlutlaus, PublicKeyToken = abe076fd8125f3c4" Namespace="Nivlag" TypeName="*" Authorized="True" />

4. Copy "SpdGenericInterface.actions" til C:\Program Files Common Files Microsoft Shared vefur framreiðslumaður eftirnafn 12 SNIÐMÁT 1033 Workflow

Athugaðu að ofan staðsetning er sérstaklega ensku innsetningar tungumál.

5. Close SharePoint Designer (if it’s already open).

6. iisreset

7. Open SPD and create a new workflow.

If all goes well, you should be rewarded with a new category of action:

mynd

Skýringar:

Sjá hér (http://blogs.msdn.com/sharepointdesigner/archive/2007/03/15/adding-activities-to-spd.aspx) for a terrific overview of the process for creating, installing and configuring a solution like this.

The .zip is designed to extract directly to you c:\ drive. If you do this, you can open the project and all the paths will be consistent.

To use this in visual studio, you probably need to install "Extensions for Windows WF".

The initial upload contains just one "dispatcher function", "ToLower()". To add more functionality, add it to the Execute method as shown:

 vernda forgang ActivityExecutionStatus
          Execute(ActivityExecutionContext executionContext)
        {

            band functionToDispatch;
            functionToDispatch = þetta.DispatchFunction.ToLower();

            switch (functionToDispatch)
            {
                case "tolower()":
                    {
                        þetta.OutResult1 = þetta.InParam1.ToLower();
                        break;
                    }

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

            aftur ActivityExecutionStatus.Closed;
        } // ActivityExecutionStatus

    }

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

SPD Workflow sérsniðin aðgerð – fá <WorkflowInfo> tag rétt til að forðast hindrun

Part of the process for creating a custom action for SharePoint Designer involves create a ".actions" skrá.

Ég hef fundið og reynt að nota sýnishorn sniðmát sem byrjar sem:

<?XML útgáfa="1.0" Kóðun="UTF-8" ?>
<
WorkflowInfo xmlns="HTTP://schemas.microsoft.com / SharePoint /">
<
Actions Sequential="þá" Parallel="og">

Hins, that xmlns attribute prevents my environment from working. My actions don’t show up in SPD.

The solution is to strip out the xmlns attribute, do an iisreset and close/re-open SPD.

Fljótleg og einföld: Stilla mosa til að leita að tilteknum skjal bókasafn

See UPDATE (Ég) below (11/24/07) á Hvernig á að stilla Microsoft Office SharePoint Server 2007 til Netmöppur vísitölu og skríða fyrir Leita

Markmið: I want to execute a search restricted to a specific document library. Í þessu tilviki, skjalið bókasafn inniheldur þjálfun skjöl.

Steps:

1. Upptaka inn vefslóð skjal bókasafn.

2. Búa til umfang:

Fara á stjórnsýslu.

Aðgangur að SSP.

Go to "Search Settings".

Scroll down to the scope section and select "View Scopes".

Create a new scope. Give it a name and useful description.

3. Skilgreina umfang skríða reglur:

Bæta við reglu sem skilgreinir skjal bókasafn fyrir þetta svigrúm.

Select "web address" for "Scope Rule Type".

Sláðu inn heiti möppu (sjá #1 ofan).

Accept the default value of "Include".

Bíddu eftir að svigrúm til að uppfæra (eða hefja það handvirkt).

4. Virkjar umfang í staður safn.

Fara á síðuna safn þar sem þú vilt nota þessa umfang.

Bæta við nýjum svigrúm til viðeigandi sýna hóps eða hópa.

5. Leita!

Á þessum tímapunkti, you’re done. Assuming the scope is properly defined, það verður hægt að nálgast í mælar falla hæðir til einfaldra og ítarlegri leit og þegar þú leitar að nota þessi umfang, þú munt bara fá niðurstöður sem þú átt von.

Skýringar:

Ég skrifaði þessa bloggfærslu vegna leitum mínum fyrir einföld umfang skipulag snúið upp þurr með setningar eins:

  • stilla mælar í mosa
  • stilla leita umfang mosa
  • mælar í SharePoint 2007
  • mælar í SharePoint
  • leita skjal bókasafn mosa
  • Mælar fyrst mosi

Þú getur búið til a leita svigrúm á möppu, not just the entire document library.

A umfang má hluti á mörgum söfnum síðuna (þess vegna, a "shared service").

You can create the scope at the site collection level itself. Hins, I prefer to go to central admin because I can start the crawl from there. You cannot start the crawl from the site collection.

UPDATE (Ég) og með 11/24/07:

Kai Shang put together a great post entitled Hvernig á að stilla Microsoft Office SharePoint Server 2007 til Netmöppur vísitölu og skríða fyrir Leita @ http://kaishenghoo.spaces.live.com/blog/cns!8A7458DB12CA5AC9!206.entry

Technorati Tags: , ,