یکپارچهسازی با شیرپوینت FAST: کد نمونه برای نشان دادن تمام FAST بازدیدهای موجود

Here is some code that shows all available views from a FAST server based on the named QRServer (the server process with which we communicate). I offer this up to give you all a taste of what it’s like to use the provided FAST API.

با استفاده از سیستم;
با استفاده از System.Collections.Generic;
با استفاده از System.Linq;
با استفاده از System.Text;
با استفاده از Com.FastSearch.Esp.Search;
با استفاده از Com.FastSearch.Esp.Search.Http;
با استفاده از Com.FastSearch.Esp.Search.Navigation;
با استفاده از Com.FastSearch.Esp.Search.Query;
با استفاده از Com.FastSearch.Esp.Search.Result;
با استفاده از Com.FastSearch.Esp.Search.View;
با استفاده از System.Collections.Specialized;
با استفاده از System.Collections;


فضای نام Conchango
{
    کلاس EnumerateFASTViews
    {
        ایستا از درجه اعتبار ساقط اصلی(رشته[] استدلال)
        {

            ISearchFactory searchFactory;

            NameValueCollection nameValueCollection = جدید NameValueCollection();

            nameValueCollection.Add("fastsearchengine", "Com.FastSearch.Esp.Search.Http.HttpSearchFactory");
            nameValueCollection.Add("Com.FastSearch.Esp.Search.Http.QRServers", "fastdemoback:15100");
            nameValueCollection.Add("Com.FastSearch.Esp.Search.Http.RequestMethod", "GET");

            searchFactory = SearchFactory.NewInstance(nameValueCollection);

            کنسول.WriteLine("Total Views: [" + searchFactory.GetSearchViewList().شمار + "].");

            اعضای هیات i = 0;

            حلقه foreach (هدف درجه به searchFactory.GetSearchViewList())
            {
                کنسول.WriteLine("View [" + i   + "]: [" + o.ToString() + "].");

            }

            کنسول.ReadLine();

        }
    }
}

Note that I consider myself a barely competent C# programmer and I have thin skin, so don’t send any raspberries my way, especially re: the "foreach (object o in …)" construct 🙂

</پایان>

برچسب ها: ,

مشترک شدن در وبلاگ من.

FAST and SharePoint Integration First Look

I’ve been lucky to have an opportunity to work on a FAST <–> SharePoint integration project and thought I’d continue to share my limited experience with the community.

Microsoft is in the process of purchasing FAST. I don’t know anything about the schedule except that it should be finished in the "2nd quarter" which I assume means by 06/30/08.

My project’s design, at a very high level, calls for creating a few web parts that have roughly the same look, feel and functionality as the standard MOSS search box and core results web part, but pulling from FAST. I’ve made some baby steps in that direction.

FAST is a dedicated search engine. It’s not based on Microsoft technology, though it’s obvious to me that some of the FAST engineers clearly understand MS tech (or they’ve made use of contractors).

FAST:

FAST is a big monster server product (and I don’t mean that in a bad sense; MOSS is a big monster product to me as well). It appears to be based on Java and I noticed some apache stuff and maybe some PHP. I wouldn’t be surprised if there were other bits of tech mixed in here and there. It definitely runs on windows server and is working fine in the virtual environment which I’ve been using.

It makes use of a facade web service that crawls SharePoint content for indexing in its special FAST way.

A SharePoint end user would be pretty much at home with FAST’s user interface. It has simple/advance search, shows results, is big on relevancy (though I don’t see how it handles social relevancy). اما, it does go further. Its stemming seems better. I really can’t articulate it well but I’ll just say "it’s better." You can take my word for it, or not 🙂 I may elaborate on this point in the future, as I learn more.

خزه:

FAST provides a .NET-friendly DLL that provides an interface to the FAST engine. This makes it possible for us to create web parts or application pages or whatever we want to query FAST and present the results.

There seems to be a web service interface as well.

I also have access to a FAST-provided web part that does integrate MOSS and FAST. I don’t know if this is a POC, something that was whipped up as a demo or what. It’s definitely a good learning tool, not so sure if it’s production-ready.

That’s it for now. As I progress through the project, I’ll post more.

</پایان>

برچسب ها: , ,

مشترک شدن در وبلاگ من.

Determine FAST QRServer Port

In order to communicate with FAST Search via its API, we need to know the port on which the QRServer is running.

I followed these steps to locate it:

  1. Log into the FAST admin site (http://server:port/admin).
  2. Navigate to System Overview.
  3. Locate "Search Dispatcher" and click the spyglass icon:

    تصویر

  4. I successfully used the value, 15100 for "Info Name" = "http":

    تصویر

یادداشت ها:

1. Port 15100 appears to be the default out-of-the-box port number for the QRServer.

2. Use this code similar to the following to instantiate a connection to FAST:

     ISearchFactory searchFactory;
    
        NameValueCollection nameValueCollection = جدید NameValueCollection();
    
        nameValueCollection.Add("fastsearchengine", "Com.FastSearch.Esp.Search.Http.HttpSearchFactory");
        nameValueCollection.Add("Com.FastSearch.Esp.Search.Http.QRServers", "fastdemoback:15102");
        nameValueCollection.Add("Com.FastSearch.Esp.Search.Http.RequestMethod", "GET");
    
        searchFactory = SearchFactory.NewInstance(nameValueCollection);

3. If you pick a wildly incorrect port, you get a helpful error message:

تصویر

4. اما, if you pick the port number listed on the overview (15102) you don’t get that helpful error message. در عوض, later when you try to access any data via a search or reference a FAST view, you get an error. Debugging shows that the searchFactory’s view count is zero. You’ll be given the message "Failed to fetch Search View List".

</پایان>

برچسب ها:

مشترک شدن در وبلاگ من.

Towards SharePoint Technical Design Patterns: شیرپوینت طراح گردش + Event Receiver = High Potency Cocktail

One of the emerging patterns I find in crafting SharePoint solutions leverages SharePoint Designer workflow and an event receiver.

Here is a business scenario to put it in context:

  • I upload a document to a doc lib.
  • I kick off multi-step workflow created using SharePoint Designer.
  • At some point during that process, workflow assigns a task to someone (via collect data from user or assign a task).
  • We want to use a KPI to track how long that task is awaiting completion. The KPI shows green for tasks that are completed or due more than 3 days from now. It shows yellow if the task is due tomorrow or today. It shows red if the task is past due.
  • Here’s the kicker: I want the date that drives that KPI to be holiday-aware.

I can’t calculate a holiday-aware due date in SharePoint Designer workflow very easily. I would have to create a custom action or use a 3rd party tool. اما, it’s easy enough to calculate such a date in an event receiver. Merge those two together and we get a pattern like this:

  • Define a hidden yes/no site column on the document library labeled "DoCalcualteDueDate".
  • Initialize it to false.
  • At the appropriate time in the workflow (e.g. just before the "collect data" اقدام), assign that value to True.
  • An ItemUpdate() event receiver looks to see if "DoCalculateDueDate" is true. Since the event receiver runs on every update, "DoCalculateDueDate" is normally false.
  • When workflow assigns DoCalculateDueDate to true, the event receiver calculates the holiday-aware due date.
  • When the event receiver does this calculation, it sets the DoCalculateDueDate flag to false.

در پایان, SPD workflow is communicated with an event receiver via the DoCalculateDueDate semaphore and we have holiday-aware due dates that are assigned at the exactly correct moment in the workflow’s life. SharePoint Designer controls when the due date is assigned but the event receiver performs the actual calculation and assignment.

</پایان>

مشترک شدن در وبلاگ من.

رفتار مشاهده شده: حرکت SPD گردش در داخل مجموعه سایت

تکمیلی: I’ve been researching how to embed a SPD workflow into a site definition. This MSDN forum chain has some interesting information. It’s not conclusive, but points to path through the jungle.

I’m giving this post a slightly oddball "Observed Behavior" lead since I’m a little leery of drawing conclusions from it. SPD workflows are … temperamental.

People are often asking / wondering / fretting over moving SPD workflows from one place to another. امروز, I followed these steps and made these observations:

  • I created a workflow using SharePoint Designer in a site attached to a document library.
  • The associated document library already housed several documents.
  • I saved the site as a template.
  • When I saved the site as a template, I saved the content as well.
  • I created a new site in the same site collection using that template.

در این مرحله, I tried to run the workflow. It promptly terminated itself with the log message, "Failed on start".

I expected this. I have low expectations when it comes to moving SPD workflows around.

I continued:

  • Opened the site in SharePoint Designer.
  • Had a peek at the workflow. It seemed fine.
  • I clicked "Finish".
  • I ran the workflow.

این بار, مشغول به کار خوب.

I’ll add that this workflow used the "collect data from user" action which is a relatively complex action under the hood.

I tentatively conclude that the process of "finishing" the workflow caused SPD to properly associate the SPD workflow with the new document library. I also conclude the XOML and other XML artifacts are reasonably "loose". They are not super tightly coupled to the document library.

What does this mean? Assuming it’s a reliable and reproducible process, there’s at least one rough method we can use to move them around. I don’t know if this would work if we crossed site collection boundaries or even more drastically, entire new farms (e.g. dev to stage to prod).

If you’re reading this and inclined, please post a comment or ایمیل من your SharePoint Designer migration story. I’ll gladly update this posting with any insights thus offered.

</پایان>

مشترک شدن در وبلاگ من.

سریع و ساده: گردش کار فقط فیلد به روز رسانی

It’s often useful to store status information in a custom list such as an approval code which should never be directly manipulated by end users. This is a common business scenario. I have been working on a project this year that generates various status and reminder dates via SharePoint Designer workflows that then drive KPIs and generally support time-critical business processes.

استفاده از یک نوع محتوای سایت / ستون برای رسیدن به این اثر.

ایجاد یک سایت نوع محتوا با ستون وضعیت، به عنوان نشان داده شده است:

تصویر

Note the "Status (برای دیدن نمایش (Demo))" رشته در پایین.

بعد, click on the column name to access the column’s properties. Select "Hidden (نمی خواهد در فرم ظاهر می شود)" در ستون بخش تنظیمات به عنوان نشان داده شده است:

تصویر

This removes the field from the standard edit/update forms. اما, آن است که هنوز هم در دسترس نمایش ها, KPI ها, مدل شی و هر جای دیگری که می خواهید از آن استفاده کنید, including SPD workflow.

</پایان>

مشترک شدن در وبلاگ من.

یکشنبه های خنده دار: “من فکر کردم به این می شود یک شهر ثروتمند قرار بود”

کمی بیش از سه سال پیش, من و همسرم امضا پسرم برای فعالیت های تابستانی, The Midland Park Players. This is a drama group that spends about three or four weeks preparing for a play and then showing it to the parents, friends and relatives. It’s always been done very well.

I don’t know if everyone’s child is like this, but my son is extremely reluctant to try new things. Knowing this, we signed him up for the program. We’ve found that it’s best to alert him to these kinds of things early and often. پس, in order to overcome his natural reluctance, we told him early and did our best to make it sound like fun, غیره. Even with a multi-month advertising campaign, he still wasn’t convinced. We forced him to do, اگر چه, and as is often the case, he had a great time.

By the time the second year rolled around, he had once again convinced himself that he didn’t want to participate. اما, we had signed him up and on zero-day, I dropped him off one morning at the high school where they practice. When I went to pick him up after lunch, he was very excited, all smiles and announced, "The play is the Velveteen Rabbit and I want to be the Rabbit". He had spent literally months carrying on (sometimes hysterically) about how he didn’t want to have anything to do with Park Players and after the first day, he wants to be the lead role in the play. We’ve seen this pattern before.

(Much to our surprise, he did get the Rabbit role and he was amazing.)

Fast forward a few years. He’s been in Park Players three times now, so he’s something of a veteran. This summer (2008), Players starts up again. در این زمان, he’s finally convinced us he واقعا doesn’t want to play soccer and he never liked basketball. That left him with no extra-curricular activities for late Winter / early Spring. A client with whom I was working mentioned that his daughter was in a program called Stage Right. Stage right is a slightly more expensive version of Park Players and it’s not in my town, but adjacent to it. Perfect.

The thing to know about that town is that it’s practically another country in terms of wealth. It has a high-frequency train right to Wall Street and NYC in general. It’s just a wealthy place. One of the on-going family discussion themes is whether we should have moved to that town instead of where we live now. It’s a bigger town, its schools offer more programs for the kids, غیره. My wife grew up in that town and her parents live there, so we are "hooked in" despite not living there. I personally grew up in different circumstances in Massachusetts, so I don’t have a lot to say about this during family dinner conversation. This isn’t to say that we aren’t very happy where we live. We just know that that town is a level above our town economically.

Stage Right’s next program started too soon for us to launch our normal advertising campaign to overcome my son’s reluctance. This is when he came up with one my personal favorite arguments against doing something: "Friday nights are prime nights for sleep overs!" Stage Right was going to interfere with his weekend socials.

The day comes, we bring him there and drop him off and as with everything else, his natural love of just being alive took over and he’s been having a good time with it.

This past weekend my wife was talking to him and for the first time, I think he’s tailoring his discussions very precisely for his audience. She had asked him how Stage Right compares to Midland Park Players. He tells her that "In Park Players, we have teenagers that help us out. There aren’t any in in Stage Right. In Park Players, teenagers make all props. In Stage Right, we have to bring our own props. We have to do everything. And then he twists the knife: "I thought this was supposed to be a rich town."

All these years, I never really thought that he was hearing or understanding anything as it related to the "rich town". اما, it turns out he was.

</پایان>

مشترک شدن در وبلاگ من.

برچسب ها:

SharePoint Does Not Provide Calendar Roll-ups; Potential Solutions

تکمیلی: An anonymous person in the comments posts this link: http://www.atidan.com/atidan-collaboration-kit.php

Forum users often ask a question like this:

"I would like to have a calendar at the site level that is populated by events from subsite calendars. Ideally, users in subsites will create calendar events, and will have the option of marking them as ‘public.’ Events marked as public will dynamically appear in the shared site calendar. Thus the shared site calendar is a roll-up of all public events from all subsite calendars."

Is WSS 3.0 یا MOSS 2007, it is not possible to directly configure a "roll-up" calendar. Calendars exist on their own, independent of any other calendar.

To create a roll-up calendar, follow one of these paths:

  1. Use a Content Query Web Part. This is the easiest solution for MOSS users (WSS does not provide CQWP). CQWP, متاسفانه, does not provide a calendar view of data out of the box. It does provide enormous rendering flexibility (see here for one example) but by default, shows its results in simple list format. In many cases, CQWP probably a good choice.
  2. A more programming-oriented solution would be to use event receivers. Implement event receivers on the subsite calendars that keep their public events in sync with the master calendar. As a given subsite calendar is modified, reach out to the master calendar and update it as needed. This option is available in both WSS 3.0 و MOSS.

There are probably other clever solutions to this problem. If you have one or know of one, please leave a comment or ایمیل من and I will update this post.

</پایان>

مشترک شدن در وبلاگ من.

ایجاد سایت های (SPWeb) از طریق طراح شیرپوینت گردش کار

This blog entry is more of an "in the realm of the possible" entry vs. concrete info.

We have a technical design that calls for us to create a site in a site collection via a manually launched workflow process. بطور اساسی, users enter data into a "new customer" custom list and then when they have finished and validated the data entry process, we need to create a site for that customer.

I’m both a big fan of declarative workflow as well as a weak visual studio workflow programmer, so I wanted to meet the requirement using SharePoint Designer.

I plan to write about this in greater detail (and hopefully present to a user group or two in the coming year), but here’s the overall solution:

  • Create a custom action that integrates with SPD.
  • The custom action allows SPD to invoke a web service and pass it a string of XML.
  • Web service locates the row in the custom list and creates a new site as per the data for that new client using a custom site definition.
  • Web service then updates the custom list with some information such as a link to the new site.

We considered other approaches, such as event handlers and visual studio based workflow. The SPD approach gives our end users a little more control over the process. Granted, there’s a lot of C# code in this solution, but it’s wrapped inside a declarative workflow, so we get some of the benefits of declarative workflow while hooking into the site-creation service.

تنها چیزی که اکنون به آن نیاز داریم یک ابزار آسان برای انتقال خودکار گردش‌های کاری SPD به آسانی تا جایی که می‌توانیم برای گردش‌های کاری استودیو تصویری داریم و ما واقعاً با گاز آشپزی می‌کنیم. چند موفقیت خوب با آن به زودی.

</پایان>

مشترک شدن در وبلاگ من.