Buwanang Archive: Marso 2008

Tukuyin 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:

    imahen

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

    imahen

Mga Tala:

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

2. Gamitin ang code na kamukha ng mga sumusunod upang magbigay ng halimbawa ng koneksyon sa FAST:

     ISearchFactory searchFactory;
    
        NameValueCollection nameValueCollection = bago 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. Kung pumili ka ng isang wildly maling port, kumuha ka ng isang kapaki-pakinabang na mensahe ng error:

imahen

4. Gayunman, kung piliin mo ang port number na nakalista sa pangkalahatang-ideya (15102) you don’t get that helpful error message. Sa halip, mamaya kapag sinusubukan mong i-access ang anumang data sa pamamagitan ng isang paghahanap o banggitin ang isang view ng FAST, 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".

</dulo>

Technorati Tags:

Mag-subscribe sa aking blog.

Patungo sa SharePoint Technical Pattern Disenyo: SharePoint Designer workflow + Tatanggap ng Kaganapan = bagsik Cocktail

Ang isa sa mga umuusbong na mga pattern mahanap ako sa crafting solusyon sa SharePoint Pinakikinabangan SharePoint Designer workflow at isang kaganapan receiver.

Narito ang isang negosyo sitwasyon upang ilagay ito sa konteksto:

  • Ako mag-upload ng isang dokumento sa isang doc Lib.
  • Sipain ko off ang multi-hakbang na daloy ng trabaho na nilikha gamit ang SharePoint Designer.
  • Sa ilang mga punto sa panahon ng prosesong iyon, daloy ng trabaho ay nagtatalaga ng isang gawain sa isang tao (sa pamamagitan ng mangolekta ng data mula sa gumagamit o magtalaga ng isang gawain).
  • 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.
  • Narito ang kabayong naninipa: Gusto ko ang mga petsa na nag-mamaneho na KPI na maging 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. Gayunman, 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 ito upang hindi totoo.
  • Sa naaangkop na oras sa daloy ng trabaho (e.g. just before the "collect data" aksyon), magtalaga ng halagang iyon sa True.
  • Isang ItemUpdate() event receiver looks to see if "DoCalculateDueDate" is true. Since the event receiver runs on every update, "DoCalculateDueDate" ay karaniwang hindi totoo.
  • Kapag workflow nagtatalaga DoCalculateDueDate sa true, mga kaganapan receiver kinakalkula ang holiday-aware takdang petsa.
  • Kapag ang kaganapan receiver Ginagawa ito pagkalkula, Nagtatakda ito ang DoCalculateDueDate flag upang hindi totoo.

Sa katapusan, 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.

</dulo>

Mag-subscribe sa aking blog.

Napagmasdang Pag-uugali: Naglilipat ng daloy ng trabaho SPD Sa loob ng isang Collection Site

I-UPDATE: I’ve been researching how to embed a SPD workflow into a site definition. Ito chain MSDN forum ay may ilang mga kagiliw-giliw na impormasyon. It’s not conclusive, ngunit ang mga punto upang path sa loob ng gubat.

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 … maramdamin.

Ang mga tao ay madalas na nagtatanong / nagtataka / fretting over moving SPD workflows from one place to another. Ngayon, Sinundan ko ang mga hakbang na ito at ginawa ang mga obserbasyon:

  • Nilikha ko ang isang daloy ng trabaho gamit ang SharePoint Designer sa isang site na naka-attach sa isang library dokumento.
  • Ang mga kaugnay na library dokumento na matatagpuan ilang mga dokumento.
  • I-save ang site bilang isang template.
  • Kapag ako naka-save na mga site bilang isang template, I-save ang nilalaman pati na rin.
  • Lumikha ako ng bagong site sa parehong koleksyon site gamit ang na template.

Sa puntong ito, 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.

Nagpatuloy ako:

  • Binuksan ang site sa SharePoint Designer.
  • Had a peek at the workflow. It seemed fine.
  • I clicked "Finish".
  • Nagpatakbo ako ng workflow.

Oras na ito, ito ay nagtrabaho fine.

I’ll add that this workflow used the "collect data from user" pagkilos na kung saan ay isang medyo kumplikado pagkilos sa ilalim ng 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.

Ano ang ibig sabihin nito? 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, buong bagong mga sakahan (e.g. dev sa entablado upang mag-udyok).

Kung binabasa mo ito at may hilig, paki-post ng komento o email sa akin your SharePoint Designer migration story. I’ll gladly update this posting with any insights thus offered.

</dulo>

Mag-subscribe sa aking blog.

Technorati Tags:

Mabilis at simpleng: Workflow-lamang Update Field

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.

Use a site content type / column to achieve this effect.

Create a site content type with the status column as shown:

imahen

Note the "Status (for Demo)" field at the bottom.

Susunod, click on the column name to access the column’s properties. Select "Hidden (Will not appear in forms)" in the Column Settings section as shown:

imahen

This removes the field from the standard edit/update forms. Gayunman, ito ay magagamit pa rin sa mga pagtingin, KPI, ang bagay na modelo at kahit saan pa na gusto mong gamitin ito, including SPD workflow.

</dulo>

Mag-subscribe sa aking blog.

Linggo ng nakakatawang: “Naisip ko na ito ay dapat na Maging Rich Town”

Ang isang maliit na higit sa tatlong taon na ang nakalipas, aking asawa at ako naka-sign ang aking anak na lalaki up para sa isang aktibidad ng tag-init, 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.

Hindi ko alam kung ang bata sa lahat ng tao ay ganito, 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. Kaya, upang mapaglabanan ang kanyang natural na pag-aatubili, namin sinabi sa kanya ng maaga at ginawa ang aming pinakamahusay na upang gawin itong tunog tulad ng masaya, at iba pa. Even with a multi-month advertising campaign, he still wasn’t convinced. We forced him to do, kahit na, at bilang ay madalas na ang kaso, he had a great time.

Sa pamamagitan ng mga oras ng ikalawang taon na pinagsama sa paligid, he had once again convinced himself that he didn’t want to participate. Pero, kami ay naka-sign up sa kanya at sa zero-araw, I dropped him off one morning at the high school where they practice. When I went to pick him up after lunch, siya ay napaka nasasabik, lahat ng mga smiles at inihayag, "The play is the Velveteen Kuneho and I want to be the Rabbit". He had spent literally months carrying on (minsan hysterically) tungkol sa kung paano hindi niya nais na magkaroon ng kahit ano ang gagawin sa Player Park at pagkatapos ng unang araw, he wants to be the lead role in the play. We’ve seen this pattern before.

(Karamihan sa aming mga sorpresa, ginawa niya makuha ang Kuneho papel at siya ay kagulat-gulat.)

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. Sa Pansamantala, sa wakas siya ay naniwala sa amin siya talaga 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, nitong mga paaralan nag-aalok ng higit pang mga programa para sa mga bata, at iba pa. 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 magbigay-alam gabi para sa pagtulog overs!" Stage Right was going to interfere with his weekend socials.

Ang araw ay, dalhin namin siya doon at i-drop off sa kanya at katulad ng lahat ng iba pa, kanyang natural na pag-ibig ng pagiging lamang buhay kinuha sa ibabaw at siya ay pagkakaroon ng isang magandang panahon na may ito.

Ito nakaraang weekend ang aking asawa ay pakikipag-usap sa kanya at para sa unang pagkakataon, 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."

Lahat ng mga taon, I never really thought that he was hearing or understanding anything as it related to the "rich town". Gayunman, ito lumiliko out siya ay.

</dulo>

Mag-subscribe sa aking blog.

Technorati Tags:

SharePoint ba Hindi Magbigay ng Calendar Roll-ups; Potensyal Solutions

I-UPDATE: An anonymous person in the comments posts this link: http://www.atidan.com/atidan-collaboration-kit.php

Forum mga gumagamit ay madalas na tinatanong ng tanong na tulad nito:

"I would like to have a calendar at the site level that is populated by events from subsite calendars. Ideally, mga gumagamit sa subsite ay gumawa ng mga kaganapan sa kalendaryo, 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."

Ay WSS 3.0 o Moss 2007, it is not possible to directly configure a "roll-up" calendar. Calendars exist on their own, independiyenteng ng anumang iba pang mga kalendaryo.

Upang lumikha ng isang roll-up ng kalendaryo, sundin ang isa sa mga path:

  1. Use a Content Query Web Part. This is the easiest solution for MOSS users (WSS ay hindi nagbibigay ng CQWP). CQWP, sa kasamaang-palad, does not provide a calendar view of data out of the box. It does provide enormous rendering flexibility (tingnan ang dito para sa isang halimbawa) ngunit sa pamamagitan ng default, shows its results in simple list format. In many cases, CQWP marahil isang magandang pagpipilian.
  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 at Moss.

There are probably other clever solutions to this problem. If you have one or know of one, mangyaring mag-iwan ng komento o email sa akin at ako ay i-update ang post na ito.

</dulo>

Technorati Tags: ,

Mag-subscribe sa aking blog.

Lumikha ng Site (SPWeb) sa pamamagitan ng SharePoint Designer workflow

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

We have a technical design that calls for us to create a site in a site collection via a manually launched workflow process. Talaga, users enter data into a "new customer" custom na listahan at pagkatapos ay kapag sila ay tapos na at napatunayan ang proseso ng data entry, kailangan naming gumawa ng isang site na para sa customer.

Ako ay kapwa isang malaking fan ng paturol daloy ng trabaho pati na rin ang isang mahinang visual studio workflow programmer, kaya Nais kong upang matugunan ang mga kinakailangan sa paggamit ng SharePoint Designer.

Plano ko na magsulat tungkol sa mga ito nang mas detalyado (at sana ay naroroon sa isang user group o dalawa sa mga darating na taon), ngunit narito ang pangkalahatang solusyon:

  • Lumikha ng isang pasadyang aksyon na integrates sa SPD.
  • Ang custom action na nagbibigay-daan sa SPD ang magpatakbo ng isang web service at pumasa ito sa isang string ng mga XML.
  • Web serbisyo locates ang hilera sa custom na listahan at lumilikha ng isang bagong site bilang bawat ang data para sa na ang mga bagong client gamit ang custom na kahulugan site.
  • Web serbisyo pagkatapos ay ina-update ng mga custom na listahan ng ilang impormasyon tulad ng isang link sa bagong site.

Namin itinuturing na iba pang mga approach na ito, such as event handlers and visual studio based workflow. The SPD approach gives our end users a little more control over the process. Granted, mayroong isang pulutong ng mga C # code na ito sa solusyon, ngunit ito ay nakabalot sa loob ng isang paturol workflow, kaya namin makuha ang ilan sa mga pakinabang ng paturol workflow habang hooking in sa site ng paglikha-serbisyo.

All we need now is an easy tool to automatically migrate SPD workflows around as easily as we can for visual studio workflows and we’ll really be cooking with gas 🙂 I understand that some folk are out there working on this problem and I hope they have some good success with it soon.

</dulo>

Mag-subscribe sa aking blog.

Technorati Tags: ,

Mabilis at simpleng: Maglaan ng isang Web Site Paggamit ng SharePoint Bagay Model Sa 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.

Ang code na ito ay lumilikha ng isang bagong site Wiki:

 SPSite siteCollection;

    siteCollection = bago SPSite("http://conchang-o9l8qi");

    SPWeb w = siteCollection.OpenWeb();

    w.Webs.Add("xyzzy", "xyzzy Title",
        "xyzzy description", 1033, SPWebTemplate.WebTemplateWIKI, hindi totoo, hindi totoo);

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

Kung ikaw hanapin for "Webs.Add()", makakahanap ka ng isang bilang ng mga napaka-kapaki-pakinabang na mga entry sa blog, MSDN articles and SDK documentation that go into depth on this subject. I definitely recommend sa site na ito.

</dulo>

Mag-subscribe sa aking blog.

Technorati Tags:

Isama SharePoint Designer daloy ng trabaho sa Mga Serbisyo sa Web

Ako naglalaro sa paligid na may pasadyang mga aksyon para sa SharePoint Designer para sa ilang mga oras (makikita dito para sa ilang mga detalyadong mga bagay-bagay, kung na interes sa iyo).

Sa aking kasalukuyang proyekto, we need to do some fairly heavy lifting and we want to use declarative SPD workflow to manage the associated business process.

Long kuwento maikli, 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.

Narito ang lagda:

 publiko pisi Despatsador(
        GUID WebID, // Nakapasa ng runtime kapaligiran
        GUID SiteID, // Nakapasa ng runtime kapaligiran
        pisi ListID, // Nakapasa sa pamamagitan ng mga RTE (hindi alam kung bakit ito ay isang string, hindi isang GUID)
        int ListItemID, // Nakapasa sa pamamagitan ng mga RTE.
        pisi XmlMessage) // Nakapasa sa pamamagitan ng mga gumagamit na ito bilang ipinahayag sa SPD.

Pinakikinabangan nito ang katunayan na maaari naming makakuha ng sa mahalagang impormasyon workflow, tulad ng mga site, ID listahan, at iba pa. 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!

Sadly, ito ay malinaw naman ang isang one-way na tiket pababa sa "Loosey Goosey" anti-pattern lupa, ngunit ito ay mas mahusay kaysa sa paghagupit ng isang pader ng ladrilyo 🙂

Ito ba ay isang anti-pattern kung gagawin mo ito kahit na alam mo ito ay isang anti-pattern?

I hope to wrap this inside Codeplex in the near future. If you’re interested in me doing so, akong bigyan sundutin (email o mag-iwan ng komento) at mas magiging masigasig ako sa paggawa nito

</dulo>

Mag-subscribe sa aking blog.

Technorati Tags: ,

Linggo ng nakakatawang: “Siguro kung ang iyong password ay …”

Ako kamakailan binili tanghalian para sa aking kapatid na lalaki (gaya ng dati) and we ended up talking about funny things that we did at our respective colleges. At my alma mater, Lafayette College, 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.

Dalawang ng aking mga paboritong mga alaala nauugnay sa aking mabuting kaibigan, Gabe. He had made the terrible mistake of telling people his freshman year that "I’m a freshman, ngunit mayroon akong sopomor standing" dahil sa ang iba't-ibang mga advanced na mga klase sa placement siya ay kinuha, at iba pa. Many of us were similarly situated but we didn’t talk about it so much. His senior year, kapag ipinakilala namin siya sa mga tao, 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, mangyari pa, upang i-play mga laro.

Kami ay hindi tulad ng mga computer na walang magawa-inhinyero upang magkano kaya isa sa aming mga paboritong mga bagay-bagay na gawin ay magiging sa telnet sa kahon sila ay sa at magpatakbo ng X-mata 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. Subukang huwag tumawa nang malakas kapag sinusubukan ng isang kaawa-awang engineer na isara ang X-eye pagkatapos ng X-eye at bumubulong-bulong tungkol dito 🙂

We also played X-trek on those boxes. Upang gawin iyon, nagkaroon ka ng upang i-download ang source, 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, muling itinayo ito at pagkatapos ay nawasak Gabe sa susunod na namin ang naglaro.

Gabe ay din ng isang malaking fan ng isang palabas sa TV na tinatawag na Blake ni 7. I had never seen it, ngunit iyon ay hindi maiwasan ang akin mula sa insisting na Dr. Who is the superior show. Ang mga pagtatalo ay mag-iinit minsan 🙂

Minsan, 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, karapatan" was his answer. I then logged in, ipinasok ang kanyang user id, naka upang harapin sa kanya, nai-type at sinabi nang malakas, "I wonder if it’s B-L-A-K-E-7" ? Touch typing has never paid off as handsomely as it did that day.

Sa susunod na linggo (o sa lalong madaling panahon): More computer room antics from college.

Mayroon ba kayong anumang upang ibahagi? Leave a comment or email me and I’ll publish them here.

</dulo>

Mag-subscribe sa aking blog.

Technorati Tags: