|
|
||||||
|
#1
|
|
|
|
|
Hi All,
I wrote a custom workflow activity. I created a workflow in the CRM and added this activity as a step. The workflow starts and says "waiting". Then when I open it, it says An error occurred. Try this action again or check with microsoft community etc.... I'm trying to attach my workflow to a process. I followed the steps in the below article [url down] I tried both w3pw.exe and Asuncronouscrm.exe. Below is my code. (I created a workflow activity library project) namespace sitatestARC { [CrmWorkflowActivity("CreateCustomActivity")] public sealed partial class CreateCustomActivity:SequenceActivity { protected override ActivityExecutionStatus Execute(ActivityExecutionContext executionContext) { IContextService contextService = (IContextService)executionContext.GetService(typeo f(IContextService)); IWorkflowContext context = contextService.Context; ICrmService crmService = context.CreateCrmService(); Guid invoiceId = context.PrimaryEntityId; String name = context.PrimaryEntityName; ColumnSet cSet = new ColumnSet(new string[] { "name" }); BusinessEntity entity = crmService.Retrieve(name, invoiceId, cSet); String invoiceXML = entity.ToString(); FileStream file = new FileStream("C:\\invoice.txt", FileMode.Create, FileAccess.Write); StreamWriter sw = new StreamWriter(file); sw.Write(invoiceXML); //convertToPdf(invoiceXML); return ActivityExecutionStatus.Closed; } } } The breakpoint never gets hit. I put the breakpoint on the execute method. Is something wrong with my code or I didn't attach the workflow to a process correctly? Can anyone please help me. Thanks a lot in advance, Madhu |
|
|
|
#2
|
|
|
|
|
Have you signed the wokflow activity in visual studio?
Rob "Madhu T." wrote: [..] |
|
#3
|
|
|
|
|
Thank you for the response.
I didn't sign the workflow activity. In 4.0.5, I think you need not sign the workflow activities I think, isn't it? However, I just got it working by trial and error. I was able to attach the workflow activity to a debugger. Thanks, Sita "Rob Mottram" wrote: [..] |
|
|
| Similar Threads | |
| Error on Attaching to the process while debugging Hello there, I'm writting a debugger, the problem is there no good interpretation ... here's the codes: my_debugger.py : #!/usr/bin/env python from ctypes import * from... |
|
| Custom Workflow Activity I have a question regarding custom workflow activity. Within IWorkflowContext we have these properties PrimaryEntityPreImage PrimaryEntityPostImage What exactly they... |
|
| Custom Activity Workflow I have create created a Custom Activity Workflow, I also use the one on the SDK. I registered it successfully (with the SDK Plugin Developper tool). I create a workflow using... |
|
| Custom workflow activity - HELP !! Hi I am trying to create an activity which returns a list of emails as an output parameter . The next step for this activity will be a "send mail " activity where I want to... |
|
| Attaching a process for debugging is dead slow Hello, Am trying to attach a a process( a .Net application) to VS IDE. It is taking nearly 3 minutes to attach the process to the IDE. I am using Visual studio version... |
|
|
All times are GMT. The time now is 09:50 PM. | Privacy Policy
|