Infosys Microsoft Alliance and Solutions blog

« Should developers touch XAML? | Main | BI Dashboards: Best Practices and Design Ideas »

Calling Blueprint Command from .mht file

In the last blog we saw how to create WF process workflow for your blueprint to provide workflow based guidance. We also saw Workflow window where Activities are listed on left hand side showing whether those are ready to execute or blocked whereas right hand side was used to explain details of each activity as shown below.


Initial WF












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.  

Initial Menu 




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


 ‘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

Final WF 











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.

Blocked Message






When you click ‘Details’ button to know whats happening it will show you following window

Parent Activities







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.


Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

Please key in the two words you see in the box to validate your identity as an authentic user and reduce spam.

Subscribe to this blog's feed

Follow us on

Blogger Profiles

Infosys on Twitter