Developing a custom wizard

  • 9 February 2010
  • 3 replies
  • 0 views

Badge +5

I'm trying to go through the tutorial in Tech Article - Developing a Custom Wizard using the K2 Wizard Template.pdf. Everything's working except for Step 11 – Copy working code back into the wizard file. I figured out that the ExtenderProjects folder is actually in C:Documents and SettingsusernameLocal SettingsTemp, but when I tried testing the final wizard, I got:


Error    1    Could not deserialize complex property 'WorkflowContext.LockedActivities'.


Could not set property 'WorkflowContext.LockedActivities' on object of type 'WorkflowContext'.
    C:Program FilesMSBuildMicrosoftWindows Workflow Foundationv3.0Workflow.Targets


I've checked the @safeitemname@.xoml, and it appears to be right. The relevant section:


  <ns0:WorkflowContext.LockedActivities>
        <CodeActivity x:Name="codeActivity1" ExecuteCode="codeActivity1_ExecuteCode" />
    </ns0:WorkflowContext.LockedActivities>


@safeitemname@.xoml.cs has a private void codeActivity1_ExecuteCode method.


Has anyone successfully completed this tutorial/demo? What am I missing?


3 replies

Badge +5

I did not copy the complete folder; I copied only my changes to the files.

Badge +5

The wizard works fine; I tested it before I made the final XOML-copy change. That's what broke it.


I attached a zip file with the modified safeitemname files for inspection. I'm not sure what you mean by copying the changes from VS to the wizard project. As far as I can tell I'm doing it the way the tutorial says to, which involves directly updating C:Program FilesK2 blackpearlBinDesignTemplatesCSharpWindowsWorkflowExtender1033Demo Email.Demo EmailEventItemEventItemAdditionalFiles after building and registering the wizard.

Badge +5

That's exactly what I did wrong. When cutting and pasting the CodeActivity, I put it inside the ns0:WorkflowContext.LockedActivities tag rather than outside where it belongs.


Thank you very much!

Reply