One of my clients worked with a previous contractor to build out a small but useful HR application for the enterprise. That contractor used SharePoint Designer to implement the workflow portion of the solution. It’s a bit of a mess. Por exemplo, there are nine SPD workflows in support of a single logical workflow process and up to five of them may fire simultaneously at any given time given the right conditions. It’s not easy to debug 🙂
O meu cliente ten un número de aínda pendentes previa, one of which is to generally provide more context when the system sends out email alerts – both in the email itself as well as associated task forms. As SPD workflow implementers know, the “collect data from user” SPD action actually creates a task with a custom content type. When we use that action, we don’t get to specify much. We can prompt for some values (e.g. "Aprobar" ou "negar") and we can specify a hard coded value in the title and description. That’s about it.
Esixencia do meu cliente é dúas veces:
- Cando o SharePoint envía un correo electrónico sobre unha asignación de tarefa, incluír unha morea de información sobre a tarefa no corpo do correo.
- Máis importante, de lonxe – cando o usuario fai clic na ligazón tarefa de correo-e, the task form should have all the information the approver needs in order to make his/her approve or deny decision. Right now, the manager needs to click on the item link itself to drill down into the underlying details and no one likes that. You have to click in the email. Then you need to click a sort of obscure link on the task item. Then you can look at the underlying data (unha forma InfoPath neste caso). Then you click back/back, etc. Everyone hates it.
Eu herdei esta solución un tanto confuso técnica e quero facer cambios na forma menos intrusiva posible.
The approach I’m taking right now is to create a custom alert template. Pode ler máis sobre iso aquí. The flow works like this:
- SPD fluxo de traballo é executado.
- Nalgún momento, que atribúe unha tarefa a un director.
- SharePoint system automatically sends out an alert to that manager. This is not part of the SPD workflow but rather “what SharePoint does.” (O servizo de axustado dunha decena do SharePoint, Creo).
- Un manipulador de alerta personalizado é invocado en favor do proceso estándar de alerta (seguindo as normas de máxicas como se describe no artigo anterior fai referencia a).
- Cando o meu manipulador personalizado alerta é executado, it generates a beautiful email. Máis importante, xa que ten a tarefa na man, tamén decora a tarefa real con todo o contexto da información necesaria para satisfacer o requisito de negocio.
- O usuario recibe o correo electrónico e está cheo de información de contexto útil.
- O usuario fai clic na ligazón e tarefa a tarefa en si está cheo de información de contexto útil.
- Todo o mundo vai a casa ter crema de sandía e xeo.
I did a quick POC and it works well in a lab environment. I get my custom email alert as expected. I also get to update the task description and title itself.
A única parte complicada, ata agora, para evitar unha situación na que as actualizacións alerta o elemento, triggering another alert. This doesn’t worry me.
Parece prometedor ata agora ...
The great thing about this is that I don’t need to muck about with any of the existing SPD workflows. They are blissfully unaware that an alert handler is “IIZ RUNNIN IN da xustificación, Decoratin tarefa TEH LISTA WiF CONTEXTO MOAR".
</final>
Siga-me no Twitter http://www.twitter.com/pagalvin