Mga Archive ng kategorya: SharePoint workflow

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

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

SPD workflow “Mangolekta ng Data Mula sa Isang User”: Baguhin ang Binuo ng Form Task

I’m working on a project that uses five different SharePoint Designer work flows to handle some document approvals. SPD provides the "collect data from a user" pagkilos upang maaari naming prompt ng gumagamit para sa iba't ibang piraso ng impormasyon, tulad ng kung aprubahan nila ito, ilang mga komento at maaaring magtanong kung ano ang kanilang ay may para sa hapunan sa iba pang mga gabi.

The forms are perfectly functional. They are tied to a task list as a content type. They are 100% system-generated. This is their strength and weakness. If we can live with the default form, then we’re good to go. Gayunman, we don’t have too much control over how SPD creates the form. If we don’t like that default behavior, kailangan namin sa resort sa iba't ibang trick upang makakuha ng paligid nito (halimbawa, pagse-set ng priority sa isang gawain).

Kailangan ko upang magbigay ng isang link sa mga form ng gawain na binuksan ang mga katangian ng tanawin (dispform.asxp) of the "related item" in a new window. This provides one-click access to the meta data of the related item. This is what I mean:

imahen

Thankfully, we can do that and it’s not very hard. Broadly speaking, painitin SPD, navigate to the directory that houses the workflow files and open the ASPX file you want to modify. These are just classic XSL transform instructions and if you’ve mucked about with itemstyle.xsl, paghahanap o iba pang mga sitwasyon ng XSL, this will be easy for you. Sa katunayan, Nakita ko ito sa pangkalahatang mas madali dahil ang nabuong form ay medyo madali upang sundin kumpara sa mga resulta ng paghahanap core bahagi web (o ang kakila-kilabot CWQP).

Talaga, there is one major pitfall. SPD’s workflow editor expects full control over that file. If you modify it, SPD will happily overwrite your changes give the right set of circumstances. I did two quick tests to see how bad this could get. They both presuppose that you’ve crafted a valid SPD workflow that uses the "collect data from a user" hakbang.

Pagsubok 1:

  • Baguhin ang ASPX file sa pamamagitan ng kamay.
  • Subukan ito (i-verify na ang iyong mga pagbabago ay maayos na-save at ay hindi lumalabag sa anumang).
  • Buksan ang workflow at magdagdag ng isang hindi nauugnay na pagkilos (such as "log to history").
  • I-save ang workflow.

Magbunga: Sa kasong ito, SPD hindi muling likhain ang form.

Pagsubok 2:

  • Gawin ang parehong bilang #1 except directly modify the "collect data from a user" aksyon.

Magbunga: Ito muling lumilikha ng form mula sa simula, over-sumusulat ng iyong mga pagbabago.

Final Tala:

  • Hindi bababa sa dalawang SPD pagkilos lumikha ng mga form tulad nito: "Collect Data From a User" and "Assign To Do Item". Both of these actions’ form nang manu-mano ang binagong.
  • Ako ay magagawang upang bumuo ng aking link sa dispform.aspx dahil, sa kasong ito, the relate item always has its ID embedded in the related item’s URL. I was able to extract it and then build an <a href> based on it to provide the one-click meta data access feature. It’s unlikely that your URL follows this rule. There may be other ways to get the ID of the related item but I have not had to cross that bridge, kaya hindi ko alam kung nakakakuha ng sa iba pang mga gilid ng bangin.
  • Hindi ko sinisiyasat, ngunit hindi ako magiging magulat kung may ilang mga uri ng file ng template sa 12 pugad na maaari kong baguhin upang makaapekto sa kung paano bumubuo ng SPD ang form na default (halos tulad ng maaari naming baguhin ang mga template ng alerto).

</dulo>

Mag-subscribe sa aking blog!

Technorati Tags: ,

Solusyon (uri ng): I-set ang Mahalagang sa isang Task Gamit SharePoint Designer

Mayroon akong isang negosyo sitwasyong ganito:

  • Ang isang gumagamit na pag-upload ng isang dokumento sa isang library dokumento.
  • Siya ay pumipili ng isang uri ng nilalaman at nagpasok ng meta data bilang kinakailangan. Ang isa sa mga patlang ng meta data ay isang flag, "Urgent".
  • Ito ay nagpapalitaw ng isang workflow SharePoint Designer na, bukod sa iba pang mga bagay, uses the "Collect Data from a User" aksyon.

"Collect Data from a User" creates an item in a task list requesting approval for that document.

I needed to create a view of the task list that showed urgent requests for approval.

Solusyon: Put the word "URGENT:" into the title of these tasks.

I would have preferred to specify the priority field directly. Gayunman, I was unable to do that for several reasons:

  1. The collect data action does not provide a mechanism to update any field other than title (and those additional fields for which you want to collect data).
  2. The "assign a to do item" action has the same problem.
  3. It’s possible to insert an item into a list (i.e. insert an item into the task list directly) but this not a blocking action. That means that the workflow will not wait for the user to complete that task.

I considered a few approaches before (thankfully) realizing we could just put "urgent" in the title.

  1. Start a workflow on the task list itself so that when a new task is created, it somehow cross references back to the document that started the first workflow, pull out the urgent flag value and update priority as needed.
  2. Do something similar with an event receiver. On create of the task, locate the associated document and update priority as needed.
  3. Use the "create list item" action in conjunction with the "wait for field change" action and an event receiver. If we create a list item, we can specify all the fields we want. Use an event receiver to update the original item when the user completes the task and the "wait for field change" action’s condition would be met and the workflow would proceed. (For some reason, I had more or less settled on this approach before wisely deciding to walk away for a while).

There is a drawback to my solution (aside from the obvious fact that only the text of the title indicates urgency). Since "collect feedback" only accepts hard coded title names, I need to use two different collect feedback actions whose only difference is that hard coded title.

Pero, at least there’s a solution that does not require event receivers or custom SPD actions.

If someone has solved this in a more clever way, mangyaring ipaalam sa akin.

</dulo>

Mabilis at madali: Awtomatikong Buksan ang InfoPath Form Mula sa SharePoint Designer Email

I-UPDATE: Madjur Ahuja points out this link from a newsgroup discussion: http://msdn2.microsoft.com/en-us/library/ms772417.aspx. It’s pretty definitive.

===

We often want to embed hyperlinks to InfoPath forms in emails sent from SharePoint Designer workflows. When users receive these emails, maaari nilang i-click ang link sa mula sa email at pumunta nang direkta sa form na InfoPath.

This monster URL construction works for me:

http://server/sites/departments/Technical Services/InformationTechnology/HelpDesk/_layouts/FormServer.aspx?XmlLocation=/sites/departments/Technical Services/InformationTechnology/HelpDesk/REC REM RED Forms/REC2007-12-18T11_33_48.xml&Source=http://server.corp.domain.com/sites/departments/Technical%20Services/InformationTechnology/HelpDesk/REC%20REM%20RED%20Forms/Forms/AllItems.aspx&DefaultItemOpen=1

Replace the bolded red text with the name of the form, as shown in the following screenshot:

imahen

Note that there is a lot of hard-coded path in that URL, as well as a URL-encoded component. If this is too hard to translate to your specific situation, try turning on alerts for the form library. Post a form and when you get the email, view the source of the email and you’ll see everything you need to include.

Astute readers may notice that the above email body also shows a link that directly accesses the task via a filtered view. I plan to explain that in greater detail in a future post.

</dulo>

Technorati Tags:

Moss ay nagsasabi sa Akin “Access denied” i-edit ang isang daloy ng trabaho Task, Ngunit ko Talagang Mayroon ba Magkaroon ng Access

I’ve implemented a workflow using SharePoint Designer in a site which is mainly read-only to "NT_AUTHORITY\Authenticated Users" (i.e. lahat). There is a forms library for an InfoPath form. There is an associated workflow tasks list as well so that when the workflow operates, maaari itong magtalaga ng mga gawain sa mga tao.

I break permission for the forms library and task list so that any authenticated user can create forms and update their assigned tasks.

I test with my low-privileges test account.

Can I fill out and save a form to the library? –> YES

Can I access the task from an email link? –> YES

Can I see an Edit workflow task link –> YES

Can I click on that link? –> NO … Permission Denied.

Why can I see an edit link that denies me permission when I click on it? That’s not how it’s supposed to work…

I go through the security configuration again, very closely. I do it again. I consider deleting this post because I obviously don’t know anything about security.

Sa wakas, I search the Internets. I find this highly unlikely MSDN forum thread: http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=1838253&SiteID=17

The posters appear to be suggesting that the simple act of exporting the workflow to a drive platter will fix a MOSS security issue? I can hardly believe I just typed that. I’m reminded of the South Park episode about the 9/11 conspiracy where Stan is asking our Preznit, "Really?" over and over again.

Kaya, nothing to lose, I fire up SPD, right-click on the workflow and save it to my c:\ drive. That would be the c:\ drive on my laptop. I’m looking over my shoulder the whole time so that no one will ask me, "why are you saving that workflow to your laptop?"

Incredibly, that solves my problem. I can edit the task.

I hereby nominate this to be the Most Bizarre Workflow Workaround of 2007.

</dulo>

Technorati Tags:

SharePoint Designer, Kasalukuyang Item ni “Ganap na nai-encode na URL” at HTTPS

We often want to send an email that includes a hyperlink to the item or document that triggered the workflow. We can use current item’s "Encoded Absolute URL" for this purpose. Gayunman, it always seems to use "http" for the URL protocol. If your site runs on HTTPS then it will not work for you.

imahen

Sa pagkaalam ko, there is no out of the box solution to this problem. If you need to use HTTPS, wala kang sumali sa pagpipilian na kahon.

Upang malutas ito, create a custom action that provides a string replace function to use in your workflow. Alternatively, gumamit ng isang 3rd party na tool tulad ng mga mahuhusay na package dito: http://www.codeplex.com/spdwfextensions 🙂

</dulo>

Technorati Tags: ,

Email SharePoint Designer Ipinapadala ???? sa isang email

Mga gumagamit Forum paminsan-minsan magtanong: Bakit ang SharePoint Designer ilagay ???? sa aking e-mail sa halip ng isang halaga ng patlang?

Isang dahilan nangyari ito ay dahil ang mga variable na kung saan ang mag-refer sa iyo ay null.

This can happen because you are trying to reference a field from the "current item" ngunit ang user ay hindi kailanman ipinasok ng isang halaga sa patlang na iyon anyo.

<katapusan />

Technorati Tags:

Ihambing / Subukan ang para sa Blangkong petsa sa SharePoint Designer workflow

Senaryo: Sa isang SharePoint Designer workflow, you need to determine if a date field is blank.

Problema: SPD does not provide a direct method for comparing dates to anything other than a date. You cannot create a condition like this: "Kung [DateField] katumbas blangko ".

Solusyon: Convert the date to a string. Use string comparison to determine if the date is blank.

Screen shot:

The following screen shots show how to do this. Sa sitwasyong ito, isang patlang sa isang item, "Kapaligiran permit:Petsa ng unang permit Paalala ", ay isinumite at ang daloy ng trabaho na apoy sa tugon.

imahen

imahen

Mga Tala:

Kapag sinubukan ko ito, I was pleasantly surprised to learn that it works. I was worried that SharePoint Designer might disallow the string assignment (Nagbabago:StringReminderDateDate) ngunit ito payagan ang mga ito.

Ako ay din nababahala na nagpapahintulot ito, ang halaga ay maaaring maging null at alinman sa pumutok ang WF sa runtime o siguro taasan ang pandaigdigang temperatura 1/2 isang antas, ngunit ang mga alalahanin ay walang batayan.

</dulo>

Technorati Tags:

SharePoint Designer workflow Custom Action — Pagmamasid Tungkol sa <Designer Uri ng Patlang Tie =”StringBuilder” … />

Lamang ng isang mabilis na obserbasyon na may isang mahalagang pagkakaiba sa pagitan ng mga dalawang kahulugan:

<FieldBind Field = "InParam1" Designer type = "String Builder" Id = "2" Text = "parameter ng Input # 1" />

laban sa:

<FieldBind Field = "InParam1" Id = "2" Text = "parameter ng Input # 1" />

Ang unang mga palabas tulad nito sa SPD:

imahen

habang ang huli ay nagpapakita tulad nito:

imahen

I’m not sure how helpful these screen shots are but I put in the effort to make them so you have to view them 🙂

Pagmamasid ang mga ito: StringBuilder nagpapahintulot sa iyo na bumuo ng isang string (nang walang alinlangan) sa pamamagitan ng paghahalo-sama mga mga string literals at mga workflow data (sa pamamagitan ng "Magdagdag ng Lookup" pindutan sa mas mababa sa kaliwa sulok). When you use the Add Lookup button, ito pagsingit ng isang token sa form "[%token%]". When SharePoint invokes your custom action, (C # code sa aking mga kaso), SharePoint ipinapasa ang token mismo, not the value of the token. If you use the default designer type (ang ikalawang uri), SharePoint lumalaki ang token at magbabalik ng aktwal na halaga ng token sa iyong aksyon.

StringBuilder = Bad, default na uri ng designer = Magandang.

Talaga, that’s not what I really mean. Just don’t try and pass a parameter to your custom action when the designer type = StringBuilder. Use the default designer type and chain a StringBuilder to it up front if you need to build complex strings in your workflow (na hindi sinasadya ay kung ano mismo ang isa upang lumikha ng isang dynamic na paksa para sa ang email na aksyon, ngunit na ang isang paksa para sa isa pang blog entry, ay naging).

<katapusan />