
Although a new development tool is been introduced as a environment for building workflows, the well-known approach of having wizards is kept. The grouping remained the same, obviously to suit developers already used to the previous tools like VisualStudio or Visio. So exploring down what we could rely on, it`s obvious that we encounter a new wizard not existing for the [blackpearl].
Data Event wizard, as being a client wizard, adds extra logic to run on the server side, but specified on activity level. In general it gives the ability to map a set of fields, and once it`s executed, all the related values will be copied. It maintains one to one relations, requiring a field for destination, but providing flexibility for the source as another field or a static value.
Still the Data Event wizard works with fields defined only at its activity or global process level fields, which makes it suitable for following tasks :
- Maintain a counter - now you have the possibility without relying on an external system, to manually change a value of a local field.
- Extra copy of a data set - if working with shared process level fields, now you can provide their local copy per activity, and later if approval, to copy back the values to the process fields.
And now the promised surprise. How can we have this event at our [blackpearl] development stations. Well the approach is easy to follow and I`ll bring it up in a step by step followups. But first what you need : simply - having [blackpoint] K2 studio installed and a [blackpearl] development components (for VisualStudio or Visio). Mark at that point that no intervention with any K2 sever is required. It`s all about distributing the extra event wizard from one station to another. Underneath, it includes all the required code to run inside the process definition, so only the developer tools are under consideration here and later.
- Locate on the [blackpoint] station were the k2 files reside. It`s usually %ProgramFiles%\K2 blackpoint
- Under the bin folder locate the 2 files named : DataEvent.Design.dll and DataEvent.Wizard.dll
- Copy those 2 files to your [blackpearl] bin folder - usually %ProgramFiles%\K2 blackpearl\bin\
- Register those 2 files in the GAC of the [blackpearl] machine. Could be done by dropping the files at %windir%\assembly, using the command line tool - gacutil, or if Windows XP - use the Admin Tools -> .Net framework 2.0 Configuration tool
- Locate on the [blackpoint] station the folder "Design.DataEventItem", it`ll reside at %ProgramFiles%\K2 blackpoint\bin\DesignTemplates\CSharp\WindowsWorkflowExtender\1033\
- Copy the entire folder to your [blackpearl] location : %ProgramFiles%\K2 blackpearl\bin\DesignTemplates\CSharp\WindowsWorkflowExtender\1033\
- The easy part is over, so additional preparations are required before continuation - on both [blackpoint] and [blackpearl] locate the file "configurationmanager.config" and make a backup of it. It resides at the bin folder.
- You need the 2 files open (use wordpad or better text editor), and the transfer we`ll make is from the [blackpoint] file to the [blackpearl] file. The content is in XML, and you need to copy the entire xml elements (as specified underneath) to the same location on the other file.
- Copy the following xml elements (lines) from the [blackpoint]to the [blackpearl] file:
- <propertywizard text="Data Event" description="Data Event Property Wizard" makeavailableoffline="false" minversionrequired="4.0.0.0" type="SourceCode.Workflow.Wizards.DataEvent.DataEventPropertyWizard" assembly="DataEvent.Wizard, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d" name="F23B5E30-479F-436c-8771-7A949AA3F967"> </propertywizard>- this needs to go undernieth the xml element <propertywizards>
- <wizard text="Data Event" showintoolbox="true" description="Data Event Wizard" makeavailableoffline="false" minversionrequired="4.0.0.0" type="SourceCode.Workflow.Wizards.DataEvent.DataEventWizard" assembly="DataEvent.Wizard, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d" name="916261B2-1024-485f-89AD-A8E509CCEA8C">
<propertywizards>
<add name="Event General Property Wizard"/>
<add name="F23B5E30-479F-436c-8771-7A949AA3F967"/>
</propertywizards></wizard> - this needs to go underneath the the xml element <wizards>- <add name="916261B2-1024-485f-89AD-A8E509CCEA8C"></add>- this needs to go underneath the xml tree : <toolboxCategory default="Default Server Event Wizard" text="Event Wizards" name="ToolboxCategoryEvent"><toolboxImts>
In any case, keep the configurationmanager.config backup, if you want to get rid of the wizard, or you mess up with the xml file.
So the outcome is that if you register for the beta of [blackpoint] you can easily get stuffed with an extra wizard for your [blackpearl]. And if you were watching closely, you might have noticed there is another new wizard... Read more on this article...