How to Execute MS CRM 2011 Workflows in Visual Studio
-
viernes, 27 de abril de 2012 8:43
Hi,
i have a question about MS CRM Worklfows. Is it possible to execute a MS CRM Workflow in Visual Studio ?
For Example i desgin a Worklow in Visual Studio with the CRM SDK and would test it in Visual Studio ( Simualtion ) can i do something ?
Thank you for Help.
Todas las respuestas
-
viernes, 27 de abril de 2012 9:09
Hi Leno,
As per my understanding goes , Crm 2011 On-premises supports the ability to create custom XAML workflows.
Custom XAML workflows, also called declarative workflows, allow you to harness the power of Windows Workflow Foundation to create reusable workflows for Microsoft Dynamics CRM.
Using the Microsoft Visual Studio Workflow Designer, you can create workflows by dragging workflow activities from the toolbox onto the design surface, create variables, and set properties of these activities to implement the workflow’s functionality.
This is just a designer you cannot EXECUTE a workflow in Visual Studio
To execute the Designed workflow you must
packaged the workflow into a Microsoft Dynamics CRM solution and imported into the server for you to be able to execute the workflow
hth
if the response answered your question, please take a minute and mark the response as an answer.
-
viernes, 27 de abril de 2012 9:15
Hi,
What you can do is to unit test your custom workflow business logic.
The workflow must be packaged into a Microsoft Dynamics CRM solution and imported into the CRM server for you to be able to execute the workflow.
In your custom workflow activity class (and this also applies to plugins), put the logic in a separate method.
----------------------
namespace Movies
{
public class MovieRating : CodeActivity
{
#region Input Parameters
[RequiredArgument]
[Input("Movie Id")]
#endregion
#region Output Parameters
#endregion
protected override void Execute(CodeActivityContext executionContext)
{
}
private long CheckMovieRating(CrmServiceContext serviceContext, Guid MovieId)
{//business logic
return ;
}
}
}----------------------
In above custom workflow activity, CheckMovieRating is a separate method. In this write all your business logic. Run a unit test on this method. You can also mock your unit test with free third party mocks.
I hope this helps. If my response answered your question, please mark the response as an answer and also vote as helpful.
Ashish Mahajan, CRM Developer, CSG (Melbourne)
My Personal Website: http://www.ashishmahajan.com
My Blogs: http://ashishmahajancrm.blogspot.com.au and http://ashishmahajancrm.wordpress.com
My Youtube Channel: http://www.youtube.com/user/ashishmahajanmscrm
My Twitter: https://twitter.com/#!/ashishmahajan74My Linkedin: 
- Propuesto como respuesta Ashish Mahajan Australia (Architect) viernes, 27 de abril de 2012 9:15
-
viernes, 27 de abril de 2012 9:18
Hi,
OK i unterstand, i cannot execute a Worklfow in VS. I know that the CRM Workflow engine based on Windows Worklfow Foundation, therefore i think its executable in VS.
I write my Bachelor Degree about Process Mining and must execute the Workflow for x times to have Data to analyse the Process.
Have you an idee to execute the Worklflow x times ?
-
viernes, 27 de abril de 2012 12:58
hi leno,
Here is good article regarding recurring workflows - http://gonzaloruizcrm.blogspot.com/2011/05/quite-often-we-have-business-process.html
hth
if the response answered your question, please take a minute and mark the response as an answer.
-
lunes, 30 de abril de 2012 12:41
Hi
Did this help?
Please make sure to mark as answer to the response that helped you get through. This will help others with similar problem identify the answer and also close this thread as resolved.
Thanks
Dkay
-
miércoles, 02 de mayo de 2012 8:41
No. The answers are not what i expected : ) . OK won't t o start the workflows in CRM ( for example 1000 timer ) . The Workflow is a little bit complex and have some dessicion points ( Human touch points ) . I wont to execute the 1000 Worklfow executions with some client simulator. The client go throw the process and make dessicsion like a Human.
Have anybody some idea?