Calling Blueprint Command from .mht file
When I was working with this workflow, I realized that ,this is just Visual representation of Activities we have achived so far. To Run the activity I have to go again to project, right click and click Menu – related to each activity as shown below.
And here we don’t have any control on execution as Menu does not check whether activity related to it is ready to execute yet or blocked. Is this killing the purpose of having functionality supported to show activities in colors indicating their status?
Ofcourse there has to be some way to restrict execution of blocked activity unless all its parent activities are marked as complete. After exploring, I found that to have such restriction through menu is currently not possible but there is other way we can achieve it.
What if we have a link in my .mht file which is shown for each activity in workflow window. This link should also allow me to run command associated with Activity. Link will work only if activity is ready to execute (Green in color).
So I opened ‘AddDBConnection.mht’ file and added on hyperlink there say ‘Execute’. Address set for this hyperlink was as follows
blueprints://60db6b1b-5562-4bd7-9773-f8dc8fa3fc32/
‘60db6b1b-5562-4bd7-9773-f8dc8fa3fc32’ is guid associated with blueprint command which you need to execute for given activity. This guid can be easily obtained from file ‘Commands.xml’ in ‘properties’ folder of Blueprint project. Note that guid will be generated only when you will build your blueprint project.
Now workflow window will look like as shown below
If you click on execute for ‘AddDBConnection’ activity it will execute properly as activity is Green and ready to execute.
But if you click on execute for ‘AddDataEntities’ activity it will show following message as activity is Red and blocked as long as ‘AddDBConnection’ is marked as complete by checking checkbox.
When you click ‘Details’ button to know whats happening it will show you following window
I truly admire this wonderful feature provided out of box by blueprint. This allows us to run activities directly from .mht file instead of providing menus. In this way activities become truly dependent on each other restricting developer to do anything wrong. Ofcourse this will hold true only if he always use blueprint activities only to complete his/her task. If developer does any activity manually we cannot get the information whether it is completed or not.



