بایگانی ماهانه: ماه مارس 2008

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 به آسانی تا جایی که می‌توانیم برای گردش‌های کاری استودیو تصویری داریم و ما واقعاً با گاز آشپزی می‌کنیم. چند موفقیت خوب با آن به زودی.

</پایان>

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

سریع و ساده: تهیه وب سایت با استفاده از مدل شیء شیرپوینت در C #

I tried searching for a little snippet code that would show how I can create a new SPWeb in a site collection. I didn’t find it as quickly or easily as I expected so I thought I’d slap together a little entry on the subject.

این کد را ایجاد ویکی جدید سایت:

 SPSite siteCollection;

    siteCollection = جدید SPSite("http://conchang o9l8qi");

    SPWeb W = siteCollection.OpenWeb();

    w.Webs.Add("xyzzy", "xyzzy Title",
        "xyzzy description", 1033, SPWebTemplate.WebTemplateWIKI, غلط, غلط);

My initial searches failed because I was looking for phrases like "provision a web site using sharepoint object model" and the like.

اگر شما جستجو for "Webs.Add()", شما یک تعداد نوشته های بلاگ بسیار مفید پیدا کنید, MSDN articles and SDK documentation that go into depth on this subject. I definitely recommend این سایت.

</پایان>

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

برچسب ها:

یکپارچه سازی گردش شیرپوینت طراح با خدمات وب سایت

من بازی در اطراف با اقدامات سفارشی برای طراح شیرپوینت برای برخی از زمان (اینجا را ببینید برای برخی از مسائل مفصل, در صورتی که منافع شما).

در پروژه کنونی من, we need to do some fairly heavy lifting and we want to use declarative SPD workflow to manage the associated business process.

داستان کوتاه مدت, this is entirely possible. I extended my Codeplex project to invoke a "helper service" and now we can invoke a web service directly from an SPD workflow.

در اینجا امضا:

 عمومی رشته اعزام کننده(
        GUID WebID, // محیط زمان اجرا به تصویب رسید
        GUID SiteID, // محیط زمان اجرا به تصویب رسید
        رشته ListID, // RTE به تصویب رسید (نمی دانم چرا این رشته است, نه یک GUID)
        اعضای هیات ListItemID, // RTE به تصویب رسید.
        رشته XmlMessage) // توسط کاربر به عنوان در SPD اعلام شده به تصویب رسید.

این اهرم این واقعیت است که ما می توانیم در اطلاعات گردش کار مهم, مثل سایت, لیست ID, غیره. This is well documented in several places for those of you interested in creating your own custom actions. The idea is to extract the XML string as provided by the user to dispatch an appropriate procedure. Fun stuff!

متاسفانه, این واضح است که یک بلیط یک طرفه به پایین "Loosey Goosey" ضد الگوی زمین, but it’s better than hitting a brick wall 🙂

آیا یک الگوی ضد اگر شما آن را انجام دهد حتی اگر شما می دانید آن را یک الگوی ضد?

I hope to wrap this inside Codeplex in the near future. If you’re interested in me doing so, چیزای من بهم زدن (پست الکترونیک یا ترک یک دیدگاه) and I’ll be that more enthusiastic about doing it 🙂

</پایان>

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

برچسب ها: ,

یکشنبه های خنده دار: “من تعجب می کنم اگر رمز عبور خود را …”

من به تازگی ناهار برای برادر من خریداری (به طور معمول) and we ended up talking about funny things that we did at our respective colleges. At my alma mater, لافایت کالج, the academic support IT department had a very inclusive way about it. We were given a LOT of rope and I took advantage of that at times.

دو خاطره مورد علاقه من مربوط به دوست خوب من, Gabe. He had made the terrible mistake of telling people his freshman year that "I’m a freshman, اما من ایستاده دانشجوی سال دوم" با توجه به طبقات مختلف قرار دادن پیشرفته او گرفته بود, غیره. Many of us were similarly situated but we didn’t talk about it so much. His senior year, هنگامی که ما او را به مردم معرفی, we’d say "This is Gabe. He’s a Senior, but he has Sophomore standing".

The college had some Sun workstation/servers running X-Window. They had gigantic monitors and the engineers used them for CAD and other boring engineer stuff. We CS people used them to learn programming and, البته, برای استفاده از بازیهای.

ما مانند مهندسان کامپیوتر درمانده به آنجا یکی از چیزهای مورد علاقه خود را به انجام به شبکه راه دور به جعبه می شوند که در آنها بودند و اجرا X-چشم on them. This would pop up a pair of eyes that followed the mouse around on the screen. You could pop up even more and have literally a dozen or more of the X-eye applications running. سعی کنید وقتی یک مهندس بدبخت سعی می کند ایکس ایکس را بعد از چشم ایکس ببندد و زیر لب درباره آن غرغر می کند بلند نخندید 🙂

We also played X-trek on those boxes. برای انجام این کار, شما تا به حال برای دانلود منبع, get various dependencies wherever you could find them and build it. I wasn’t a sophisticated C programmer, but I could read header files. I was looking through these and found directives like "#DEFINE MAX_TORPEDO_DISTANCE 10". I played around with that increase range and power for phases and torpedoes, دوباره ساخته شده است و سپس به نابود گیب دفعه بعد ما بازی.

گیب همچنین از طرفداران بزرگ از یک برنامه تلویزیونی به نام بود بلیک 7. I had never seen it, اما که من از اصرار دارد که دکتر جلوگیری نمی کند. Who is the superior show. بحث ها گاهی داغ می شد 🙂

یک روز, it occurred to me that I could probably guess his UNIX password. I sat down next to him one day and announced in a loud tone, "I’m going to guess your password right now, Gabe." "Yeah, راست" was his answer. I then logged in, شناسه کاربری خود را وارد شدند, تبدیل به چهره او, تایپ شده و با صدای بلند گفت:, "I wonder if it’s B-L-A-K-E-7" ? Touch typing has never paid off as handsomely as it did that day.

هفته بعد (و یا به زودی): More computer room antics from college.

آیا شما هر گونه برای به اشتراک گذاشتن? Leave a comment or email me and I’ll publish them here.

</پایان>

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

برچسب ها: