34
08/06/2013

2013.06.08 SPUG PT - Novidades Workflow em SharePoint 2013

Embed Size (px)

DESCRIPTION

Os workflows foram incorporados na plataforma SharePoint na sua versão 2007, sofreram importantes evoluções em SharePoint 2010 ao permitir a criação de workflows de forma declarativa usando o SharePoint Designer. Em SharePoint 2013, toda a componente foi revista com uma nova arquitetura baseada na “Cloud”. Nesta sessão serão apresentadas as principais novidades do workflow relativamente a versões anteriores desde a nova arquitectura ao desenvolvimento de workflows com SharePoint Designer e Visual Studio 2012.

Citation preview

Page 1: 2013.06.08 SPUG PT - Novidades Workflow em SharePoint 2013

08/06/2013

Page 2: 2013.06.08 SPUG PT - Novidades Workflow em SharePoint 2013

Novidades Workflow em SharePoint 2013Miguel IsidoroCreate It

Page 3: 2013.06.08 SPUG PT - Novidades Workflow em SharePoint 2013

Sobre mim

Consultor de Soluções SharePointOffice & SharePoint Solutions TeamBlog: http://blogit.create.pt/blogs/miguelisidoro/

Miguel [email protected]

Page 4: 2013.06.08 SPUG PT - Novidades Workflow em SharePoint 2013

História Nova Arquitectura Workflows com SharePoint Designer Workflows com Visual Studio 2012 Dynamic Values SharePoint Online vs On-Premises Demos Q & A

AgendaNOVIDADES WORKFLOW EM SHAREPOINT 2013

Page 5: 2013.06.08 SPUG PT - Novidades Workflow em SharePoint 2013

História

Page 6: 2013.06.08 SPUG PT - Novidades Workflow em SharePoint 2013

SharePoint 2007NOVIDADES WORKFLOW EM SHAREPOINT 2013

2007

2010

2013

- Hosting de WF feito em SharePoint“Coupling” com SharePoint

- Tarefas, histórico e estado guardados na content database de SharePoint- Baseado em .NET 3.0- Maiores desafios:

Escalabilidade (arquitectura pensada em deployments “on-premise”)Deployment exige permissões de administrador no servidor SharePoint

Page 7: 2013.06.08 SPUG PT - Novidades Workflow em SharePoint 2013

SharePoint 2010

2007

2010

2013

- Site WorkflowsWorkflow a correr ao nível da SPWeb em vez de SPListItem

- Workflow EventsEx: WorkflowCompleted

- SharePoint Designer WorkflowsReusable WorkflowsDesenho da lógica de workflow no Visio e importação em SPDImportação de Reusable Workflows de SPD para VS 2010

- Baseado em .NET 3.5

NOVIDADES WORKFLOW EM SHAREPOINT 2013

Page 8: 2013.06.08 SPUG PT - Novidades Workflow em SharePoint 2013

SharePoint 2013

2007

2010

2013

- Workflow é agora tratado como um serviço- Nova Arquitectura Cloud: Windows Azure Workflow

“Decoupling” entre WF e SharePointTarefas, histórico e estado deixam de ser guardados na content database de SharePointMaior escalabilidade

- Utilização “On-Premise”Instalação Workflow Manager

- Baseado em .NET 4- Melhorias a APIs CSOM & REST API’s para WF- Comunicação entre WF e SharePoint usando:

CSOM / RESTOAuth

- Workflows suportados em SharePoint 2013SharePoint 2010 Workflow:

Workflow Foundation v3.5, “hosting” em SharePointSharePoint 2013 Workflow:

Windows Azure Workflow“Hosting” em Azure / On-Premise, WF v4

NOVIDADES WORKFLOW EM SHAREPOINT 2013

Page 9: 2013.06.08 SPUG PT - Novidades Workflow em SharePoint 2013

Arquitetura

Page 10: 2013.06.08 SPUG PT - Novidades Workflow em SharePoint 2013

ArquiteturaNOVIDADES WORKFLOW EM SHAREPOINT 2013

Page 11: 2013.06.08 SPUG PT - Novidades Workflow em SharePoint 2013

Permite a execução de workflows SP2010 a partir de workflows SP2013

Permite a utilização de actions de workflows de SharePoint 2010 que não se encontram disponíveis em workflows de SharePoint 2013

Workflow Interop BridgeNOVIDADES WORKFLOW EM SHAREPOINT 2013

Page 12: 2013.06.08 SPUG PT - Novidades Workflow em SharePoint 2013

Add List Item Permissions

Assign a Form to a Group

Assign a To-do Item Capture a version of the

Document Set Collect Data from a User Copy List Item Declare Record Inherit List Item Parent

Permissions Lookup Manager of a

User Remove List Item

Permissions

Workflow Interop BridgeNOVIDADES WORKFLOW EM SHAREPOINT 2013

Acções apenas disponíveis com Interop Brige:

Replace List Item Permissions

Send Document Set to Repository

Set Content Approval Status

Set Content Approval Status for the Document Set

Set Workflow Status Start Approval Process Start Custom Task

Process Start Document Set

Approval Process Start Feedback Process Undeclare Record

Page 13: 2013.06.08 SPUG PT - Novidades Workflow em SharePoint 2013

Requisitos Software:• Windows Server 2008 R2 SP1 x64• SQL Server 2008 R2 SP1 (Express) or SQL

Server 2012• .NET Framework 4 PU3 or .NET Framework 4.5• IIS• IIS ASP.NET• IIS Management Service• IIS Windows Authentication• Windows Identity Foundation

• Requisitos para executar Configuration Wizard para configuração do Workflow e Service Bus:– SQL Server or SQL Server Express instance– TCP/IP connections and named pipes must

be configured in SQL Server.– Windows Firewall must be enabled– Ports 4446 and 5112 must be available.– Internet Protocol 4 (IPv4). (Workflow and

Service Bus do not work correctly in pure IPv6 environments.)

Windows Azure WorkflowNOVIDADES WORKFLOW EM SHAREPOINT 2013

Page 14: 2013.06.08 SPUG PT - Novidades Workflow em SharePoint 2013

Duas opções: WF 4: Windows Azure Workflow WF 3.5: Workflow Interop Bridge

Nova paradigma de desenvolvimento: Usar Web Services para encapsular lógica WFs declarativos em SharePoint Designer ou Visual Studio com

chamadas a Web Services Workflows programáticos apenas possíveis para Azure Workflow

usando Visual Studio 2012 Não são workflows de SharePoint 2013 Podem comunicar com SharePoint 2013 por CSOM/REST e OAuth

Custom WorkflowsNOVIDADES WORKFLOW EM SHAREPOINT 2013

Page 15: 2013.06.08 SPUG PT - Novidades Workflow em SharePoint 2013

Workflows com SharePoint Designer 2013

Page 16: 2013.06.08 SPUG PT - Novidades Workflow em SharePoint 2013

Stages Loops Possível sem código (declarativamente):

Chamadas a API de SharePoint Query a bases de dados Consumo de feeds (ATOM/REST) Chamadas a serviços SOAP / REST

SharePoint Designer 2013NOVIDADES WORKFLOW EM SHAREPOINT 2013

Page 17: 2013.06.08 SPUG PT - Novidades Workflow em SharePoint 2013

Cut / Copy / Paste / Undo / Redo / Select All Editor email com capacidades de edição Rich Text Visio Designer integrado no SPD 2013

SharePoint Designer 2013NOVIDADES WORKFLOW EM SHAREPOINT 2013

Page 18: 2013.06.08 SPUG PT - Novidades Workflow em SharePoint 2013

SharePoint Designer 2013 - StagesNOVIDADES WORKFLOW EM SHAREPOINT 2013

Page 19: 2013.06.08 SPUG PT - Novidades Workflow em SharePoint 2013

Tipos de acções: Core

Ex: Send Email, Call Web Service List

Check In/Out de items, cópia de items, actualização de items Conditional Utility

Ex: Validação se valor de campo começa por uma string Task

Criação, actualização e conclusão de tarefas

SharePoint Designer 2013 – AcçõesNOVIDADES WORKFLOW EM SHAREPOINT 2013

Page 20: 2013.06.08 SPUG PT - Novidades Workflow em SharePoint 2013

SharePoint Designer 2013 – DebuggingNOVIDADES WORKFLOW EM SHAREPOINT 2013

Page 21: 2013.06.08 SPUG PT - Novidades Workflow em SharePoint 2013

Workflows com Visual Studio 2012

Page 22: 2013.06.08 SPUG PT - Novidades Workflow em SharePoint 2013

Workflows Visual Studio 2012 vs SharePoint DesignerNOVIDADES WORKFLOW EM SHAREPOINT 2013

Page 23: 2013.06.08 SPUG PT - Novidades Workflow em SharePoint 2013

VS2012 tem novo tipo de projecto “Workflow Custom Activity” para criação de novas actividades

Actividades podem ser usadas tanto em WFs de SPD como de VS2012

Workflows com Visual Studio 2012NOVIDADES WORKFLOW EM SHAREPOINT 2013

Page 24: 2013.06.08 SPUG PT - Novidades Workflow em SharePoint 2013

Workflows declarativos recomendados Suportados em SharePoint Designer e Visual

Studio Permite abstracção à API de WF

Workflows com “Custom code” Suportados em WF 3.5 (SharePoint 2010) Com WF 4, devem ser usadas as novas

actividades para chamar web services que encapsulam “custom code”

Web Services: Recomendação: usar serviços OData (mais fáceis

de consumir) Têm que suportar JSON Acedem a SharePoint via REST / CSOM com

autenticação OAuth

Workflows com Visual Studio 2012NOVIDADES WORKFLOW EM SHAREPOINT 2013

Page 25: 2013.06.08 SPUG PT - Novidades Workflow em SharePoint 2013

SharePoint 2010 Workflows: Workflow Foundation v3.5 Deployment como farm solutions

SharePoint 2013 Workflows: Workflow Foundation v4.0 Duas opções: On-Premise e com hosting externo (ex:

Azure) Packaging em *.WSP ou *.APP

Workflows com Visual Studio 2012 - DeploymentNOVIDADES WORKFLOW EM SHAREPOINT 2013

Page 26: 2013.06.08 SPUG PT - Novidades Workflow em SharePoint 2013

Dynamic Values

Page 27: 2013.06.08 SPUG PT - Novidades Workflow em SharePoint 2013

Permite a criação e consumo de estruturas de dados em workflows declarativamente

Estruturas de dados pode ser recursiva e suporta JSON (útil para consumo de serviços)

Actividades incluídas em Azure Workflow para trabalhar com DynamicValues:

BuildDynamicValue CountDynamicValueItems GetDynamicValueProperties

ContainsDynamicValueProperty CreateDynamicValue GetDynamicValueProperty<T>

CopyDynamicValue CreateUriFromDynamicValue ParseDynamicValue

Dynamic ValuesNOVIDADES WORKFLOW EM SHAREPOINT 2013

Page 28: 2013.06.08 SPUG PT - Novidades Workflow em SharePoint 2013

Request: http://foo.com/odata/v2/Products/Titles?Top=2 accept: application/json

Response:{“d”: {“results”: {"ID":"123", "Name":"Phone", "Price":"74.99"}, {"ID":"456", "Name":"Laptop", "Price":"1999.99"} }}

DynamicValue Path: d/results(1)/Name

Results: Laptop

Dynamic Values - ExemploNOVIDADES WORKFLOW EM SHAREPOINT 2013

Page 29: 2013.06.08 SPUG PT - Novidades Workflow em SharePoint 2013

SharePoint Online vs On-Premises

Page 30: 2013.06.08 SPUG PT - Novidades Workflow em SharePoint 2013

Office 365 / SharePoint Online Sem necessidade de instalação ou configuração Workflow Manager instalado e gerido pela Microsoft Não suporta custom actions

On-Premises Instalar farm Workflow Manager Ligar farm SharePoint a farm Workflow Manager

Register-SPWorkflowService -SPSite "http://intranet.contoso.com" -WorkflowHostUri "http://workflowfarmserver:12291" –AllowOAuthHttp

Não pode ser instalado em Domain Controller

SharePoint Online vs On-PremisesNOVIDADES WORKFLOW EM SHAREPOINT 2013

Page 31: 2013.06.08 SPUG PT - Novidades Workflow em SharePoint 2013

Demos

Page 32: 2013.06.08 SPUG PT - Novidades Workflow em SharePoint 2013

Q&A

Page 33: 2013.06.08 SPUG PT - Novidades Workflow em SharePoint 2013

http://blog.appliedis.com/2012/12/07/what-changed-in-sharepoint-2013-workflow-pretty-much-everything/

http://www.brightstarr.com/what%E2%80%99s-new-in-sharepoint-2013-workflows#.UXqWZbXV9F0

http://sergeluca.wordpress.com/2013/04/09/calling-the-sharepoint-2013-rest-api-from-a-sharepoint-designer-workflow/

http://blogs.msdn.com/b/sharepointdesigner/archive/2012/09/05/how-to-work-with-web-service-using-call-http-web-service-action.aspx

http://www.andrewconnell.com/blog/SP2013-Workflow-Advanced-Workflow-Debugging-with-Fiddler

http://www.andrewconnell.com/blog/my-msdn-sharepoint-2013-workflow-samples-updated

http://technet.microsoft.com/en-us/library/jj658588.aspx

ReferênciasNOVIDADES WORKFLOW EM SHAREPOINT 2013

Page 34: 2013.06.08 SPUG PT - Novidades Workflow em SharePoint 2013

08/06/2013