AXForum  
Вернуться   AXForum > Microsoft Dynamics CRM > Dynamics CRM: Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 05.11.2011, 05:59   #1  
Blog bot is offline
Blog bot
Участник
 
25,574 / 848 (80) +++++++
Регистрация: 28.10.2006
Microsoft Dynamics CRM Team Blog: Creating and Deploying XAML Workflows using the CRM Developer Toolkit
Источник: http://blogs.msdn.com/b/crm/archive/...r-toolkit.aspx
==============

In July we began shipping the CRM Developer Toolkit as a part of the CRM SDK. The newest release of the Toolkit adds several new features. In this post we’re going to look at how to use one of these new features: creating and deploying workflows using the Developer Toolkit.

In This Post:

  • Prerequisites
  • Creating a Visual Studio Solution
  • Add a CRM Workflow Activity Library
  • Add a CRM Workflow Activity
  • Creating your Workflow
  • Deploying your Workflow
  • Activating your Workflow
  • Related Links
Prerequisites

To follow the steps listed below you’re first going to need the following

  1. Visual Studio 2010
  2. The CRM Developer Toolkit. This is now a part of the Microsoft Dynamics CRM 2011 Software Development Kit (SDK) on the Microsoft Download Center.
  3. An On-Premise deployment with Declarative Workflows enabled. The ability to use these workflows is not supported in Online deployments. To enable Declarative Workflows, see the SDK topic: Custom XAML Workflows.
For more information see: Install or Uninstall the Developer Toolkit.

Creating a Visual Studio Solution

If you haven’t worked with the Developer Toolkit you may wish to read the following sections to familiarize yourself with it. If you already have a VS Solution ready to work with you can skip to the next section.

  1. Start Visual Studio, then a new Project.
  2. In the New Project dialog, under Installed Templates, select Visual C#->Dynamics CRM
  3. Create a ‘New Visual Studio Solution Template for Dynamics CRM 2011’


Figure 1 Creating a Visual Studio Solution

4. Fill in the information to connect to your CRM deployment

a. First enter the Discovery Server Name, Port and Protocol. Click Connect.

b. Enter the Username, Password and Domain. Click Log On.

c. Select the Organization, then Solution you want to connect to.

d. When you are done, click OK



Figure 2 Connecting to a CRM deployment

For more information see Create a New Developer Toolkit Project.

Add a CRM XAML Workflow Library

The next step is to add a CRM XAML Workflow Library to your Visual Studio Solution.

  1. From the Solution Explorer, right click the solution node, then click Add->New Project
  2. Under Installed Templates, select Dynamics CRM
  3. Create a new Dynamics CRM 2011 XAML Workflow Library


Figure 3 Adding XAML Workflow Library

For more information see: Create and Deploy XAML Workflows Using the Developer Toolkit.

Add a CRM XAML Workflow Activity

Now we just need to add the activity to our project

1. Right click the CRM XAML Workflow Activity Library you just added, then click Add->New Item

2. Under Installed Templates, click Dynamics CRM. Add a XAML Workflow Activity.



3. A window will appear asking for information about your Workflow. Fill out all the information, and when done click ‘Create’.



4. The Visual Studio Workflow Designer will new open your workflow.





Creating your Workflow

You now have all the files setup and can use the Visual Studio Workflow Designer to design your workflow. Inside the Toolbox all the CRM Activities have been added and are available for your use.



Figure 5 Using the Visual Studio Workflow Designer

For an example of a simple XAML Workflow see Create and Deploy a XAML Workflow Library.

Deploying your Workflow

When you are done creating your workflow you can deploy it to your server directly from Visual Studio.

  1. Right click the CrmPackage project in your solution, then click Deploy.
  2. Your Workflow, along with any plugins and web resources will be built and deployed to the server you are connected to.
  3. If you are connected to a CRM Online organization or On-Premise that has Declarative Workflows disabled, you will not be able to deploy the workflow.
See the SDK topic Custom XAML Workflows for more information

For more information see Deploy a Solution Using the Developer Toolkit.

Activating your Workflow

After deploy is complete, your workflow is in a Draft state. You can now activate it right in Visual Studio.

  1. If it’s not already, open the CRM Explorer window by clicking View->CRM Explorer
  2. You will now have a view of your deployment. Expand the first node to see a list of components on the server.
  3. Expand the Processes Node, and then expand the Workflow Node.
  4. Locate your Workflow and double click it.
  5. Here you can modify your workflow’s information. Note that you can’t use the CRM Workflow Designer since it was created in Visual Studio.
  6. When you are ready, click the Activate button at the top of the window.
  7. Your workflow is now active!


Figure 6 Editing and Activating a Workflow

And that’s a quick run-through on how to create workflow from Visual Studio.

Related Links

Developer Toolkit for Microsoft Dynamics CRM

Custom XAML workflows in CRM

Generic information about the Visual Studio Workflow Designer

CRM Software Development Kit

Cheers,

Chris Amert

Chris Amert worked on the CRM developer toolkit as his developer intern project. He added support for Workflows written in Visual Studio, generating the Installer package and made various improvements to the product.

Mahesh Vijayaraghavan




Источник: http://blogs.msdn.com/b/crm/archive/...r-toolkit.aspx
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
emeadaxsupport: New Content for Microsoft Dynamics AX 2012 : October 2011 Blog bot DAX Blogs 0 27.10.2011 17:11
dynamics-ax: Interview with Microsoft's Lachlan Cash on his new role, AX 2012 and more Blog bot DAX Blogs 6 22.04.2011 14:55
gatesasbait: Dynamics AX 2009 SSRS and SSAS Integration Tips Blog bot DAX Blogs 3 09.07.2009 13:07
Microsoft Dynamics CRM Team Blog: New Silverlight 2 Sample on Code Gallery Blog bot Dynamics CRM: Blogs 0 03.07.2009 04:07
Developer for Microsoft Dynamics AX Certification Roadmap Blog bot DAX Blogs 1 13.05.2009 16:17

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 13:40.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.