Hi J
If you use the same form then you can show and hide controls on a form based on a condition if the workflow has started or not. You need to create a workflow context schema and add it to your form as a secondary datasource. The link below describes this process. After clicking the link below scroll to the section title Adding Workflow Context Data as a Secondary Data Source HYPERLINK "http://msdn2.microsoft.com/en-us/library/ms558892.aspx"http://msdn2.microsoft.com/en-us/library/ms558892.aspx You can then add a rule to conditional formatting on the display tab for a section or other controls to check if the value of isStartWorkflow="true", if isStartWorkflow is true then you are showing the form as an initiation form and you could then hide data/controls that should only be modified in the association form. If you want to use two different forms then you complete a Save As from InfoPath from one of the forms to make sure they both have the same namespace. Debugging workflows is exactly the same as debugging web parts (or any .dll in sharepoint). Attach to the correct w3wp.exe process from VS2005. 1. Set a breakpoint in your code – OnWorkFlowActivated activity 2. Attach to the correct w3wp.exe process. If you are after the id of the worker process (because you might have multiple displayed) then in a command window type iisapp. This will return all web application and their process ids. 3. Start your workflow from SharePoint UI 4. And wholla, you should hit your break point. If you don’t hit your break point and you are sure you have attached to the correct process then there may be some differences between your class file in VS2005 and your assembly in the GAC. These need to be the same or you will not hit your breakpoint. So, build and deploy your assembly to the GAC, recycle the application pool and move the above steps again. I am not sure though if you would ever hit your break point as the error is occurring when the Association form is trying to pass data to the Instantiation form. This might happen before the activated activity even is raised? Not sure. Let me know how you travel. Cheers CJ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeremy Thake Sent: Thursday, 20 December 2007 03:10 PM To: [email protected] Subject: Re: [OzMOSS] Debugging a Workflow with InfoPath forms Thanks Clayton. "Luckily you can use the same form for your association and initialisation. Change the workflow.xml Association_FormURN and Instantiation_FormURN to use the same urn id." If I use the same form, what is the best approach to hide and show the relevant fields? ie. If it's the Association state, show the first two text entry boxes, if it's the Instation state show the other. IF I use seperate InfoPath forms, but want the same namespace...how do I change the namespace? The Workflow.xml looks like this: <MetaData> <Association_FormURN>urn:schemas-microsoft-com:office:infopath:AssocForm:-myXSD-2007-12-05T08-18-26</Association_FormURN> <Instantiation_FormURN>urn:schemas-microsoft-com:office:infopath:InitForm:-myXSD-2007-12-05T08-18-26</Instantiation_FormURN> <Task0_FormURN>urn:schemas-microsoft-com:office:infopath:ActionForm:-myXSD-2007-12-05T08-43-01</Task0_FormURN> </MetaData> e.g. "-myXSD-2007-12-05T08-18-26" is same on InitForm and AssocForm but when I look at datasource the namespace stays as the old XSD. How do I change this? More importantly, can you recommend any steps for stepping into this code to get it to stop at breakpoints? Thanks again, Jeremy On Dec 19, 2007 8:59 PM, Clayton James <HYPERLINK "mailto:[EMAIL PROTECTED]"[EMAIL PROTECTED]> wrote: Hi J Good to see you in moss land J Could not find schema information for element...sounds like your schemas are different. HYPERLINK "http://msdn2.microsoft.com/en-us/library/bb629921.aspx" \nhttp://msdn2.microsoft.com/en-us/library/bb629921.aspx The line below (which was copied from the above article) is probably related to your problem. "Both the association and the initiation form must work with a main data source that is defined within the same namespace." This basically means that you need to use the same xml schema in your association form and your initialisation form. You have different forms and I bet they have different schemas. Luckily you can use the same form for your association and initialisation. Change the workflow.xml Association_FormURN and Instantiation_FormURN to use the same urn id . Try using the same form for both and see how you go. Cheers Clayton James Consultant/Trainer Data Cogs Information Technology Blog: HYPERLINK "http://claytonj.wordpress.com/" \nhttp://claytonj.wordpress.com From: HYPERLINK "mailto:[EMAIL PROTECTED]" [EMAIL PROTECTED] [mailto:HYPERLINK "mailto:[EMAIL PROTECTED]" \n [EMAIL PROTECTED] On Behalf Of Jeremy Thake Sent: Wednesday, 19 December 2007 05:12 PM To: HYPERLINK "mailto:[email protected]" [EMAIL PROTECTED] Subject: [OzMOSS] Debugging a Workflow with InfoPath forms I'm having some grief with debugging a workflow that has infopath forms. The error is coming up in the Event Log: The form template failed to load. (User: ALPHAWEST\spservice, Form Name: InitForm, IP: , Request: HYPERLINK "http://sp001:1111/_layouts/IniWrkflIP.aspx?List=ae980b65-13b9-440a-98ad-8a0882f7c77b&ID=2&TemplateID=%7bd52cd4b0-92ed-4415-afa0-0f9da553a216%7d&Source=http://sp001:1111/Leave%2520Request/Forms/AllItems.aspx" \nhttp://sp001:1111/_layouts/IniWrkflIP.aspx?List=ae980b65-13b9-440a-98ad-8a0882f7c77b&ID=2&TemplateID={d52cd4b0-92ed-4415-afa0-0f9da553a216}&Source=http://sp001:1111/Leave%2520Request/Forms/AllItems.aspx, Form ID: urn:schemas-microsoft-com:office:infopath:InitForm:-myXSD-2007-12-05T08-38-09, Type: SchemaValidationException, Exception Message: Could not find schema information for the element ' HYPERLINK "http://schemas.microsoft.com/office/infopath/2003/myXSD/2007-12-05T08:18:26:flowFields'." \nhttp://schemas.microsoft.com/office/infopath/2003/myXSD/2007-12-05T08:18:26:flowFields'.) For more information, see Help and Support Center at HYPERLINK "http://go.microsoft.com/fwlink/events.asp" \nhttp://go.microsoft.com/fwlink/events.asp. I'm using three forms an Association, Instatiation and a Action form based on a sample file I've been given. I want to break into the code. I've tried attaching to the process and followed the HYPERLINK "http://blog.spsclerics.com/Lists/Posts/Post.aspx?ID=18" \nsteps to adjust the web.config and reset IIS but it still doesn't break in! I'm deploying the workflow as a feature using the standard batch job that deactivates, uninstalls, installs and reactives the feature. Can anyone point me in the right direction to resolve this issue? Google has a flood of posts listed but nothing seems to help me past it to then try and resolve the actual issue of seeing why the error message is occuring. The schemas in the Assoc. and Inst. are both the same. Thanks very much and Merry Xmas! Jeremy Thake HYPERLINK "http://wss.made4the.net/" \nhttp://wss.made4the.net/ ------------------------------------------------------------------- OzMOSS.com - to unsubscribe from this list, send a message back to the list with 'unsubscribe' as the subject. Powered by HYPERLINK "http://mailenable.com/" \nmailenable.com - List managed by HYPERLINK "http://www.readify.net/" \nwww.readify.net No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.17.4/1188 - Release Date: 17/12/2007 02:13 PM No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.17.4/1188 - Release Date: 17/12/2007 02:13 PM ------------------------------------------------------------------- OzMOSS.com - to unsubscribe from this list, send a message back to the list with 'unsubscribe' as the subject. Powered by HYPERLINK "http://mailenable.com/" \nmailenable.com - List managed by HYPERLINK "http://www.readify.net/" \nwww.readify.net ------------------------------------------------------------------- OzMOSS.com - to unsubscribe from this list, send a message back to the list with 'unsubscribe' as the subject. Powered by mailenable.com - List managed by www.readify.net No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.17.5/1190 - Release Date: 19/12/2007 07:37 PM No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.17.5/1190 - Release Date: 19/12/2007 07:37 PM ------------------------------------------------------------------- OzMOSS.com - to unsubscribe from this list, send a message back to the list with 'unsubscribe' as the subject. Powered by mailenable.com - List managed by www.readify.net
