« Should developers touch XAML? | Main | Calling Blueprint Command from .mht file »

Creating WF Process Workflow for your Blueprint

One of advantages of moving on to Blueprint over GAT/GAX is ability to have workflow based guidance. This ensures developer knows exact steps to follow and sequence of those steps to achieve certain solution which blueprint is addressing. Now we will cover how to create your own WF process workflow for your blueprint.

Let’s take example where we have Blueprint which will help to create Data Entities from database table. We will also assume we have two commands in the blueprint

  • Add Database connection
  • Add Data Entities

Now without having database connection one cannot create Data Entities.  This can be very well communicated to developer using WF process workflow in your blueprint.


To see this, I have created Blueprint named “CreateDataEntitiesBP” which has following
It has two commands ‘AddDBConnection’ and ‘AddDataEntities’ created.

It has menus which use above two commands.

So on right click of unfolded project you get menu as shown below

Inital Menu 

 

 

 

 

If you want to know how to achieve this in Blueprints please visit here.

If you click on Workflow in menu you will get default workflow which is attached to every new blueprint.

Initial WF 

 

 

 

 

 

 

 

 

 

Blueprint provides you way to change this workflow according to your requirement. You can add sequential activities here and even can configure dependent activities. To add your own WF process workflow for your blueprint, click on “Add WF Process” menu on your Blueprint project.

 

WF menu

 

 

 

 

 

 

 

 

 

This will add new workflow project in Blueprint solution. This workflow project will have file “project.workflow.xoml” which will contain the workflow. By default it will have sequential activity with BlueprintProcessActivity Overview added in it.

This BlueprintProcessActivity will have following important properties
 

Name: Name of activity
 

Description: Description of activity.
 

Details: Name of “.mht” file which explain this Activity in detail. This will appear in right side of workflow window.
 

Sequence: Sequence of Activity within Workflow.
 

ShortDescription: Short description of activity. This will appear in left side of workflow window

Add two more Activities in this workflow other than default Overview Activity.

 

WF 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Create two .mht files ‘AddDataEntities’.mht and ‘AddDBConnection’’.mht. Put these files in Blueprint’s project Content\Workflow directory. Change “Details” property of two newly added activities to show these files in workflow window. Change Sequence property to 0 and 1 so that they will appear in sequence.

Now Build WFProcess project. Build action will copy “project.workflow.xoml” file in solution directory of Blueprint project. This “.xoml” file is the one which represents workflow for our blueprint so it has to be there in Blueprint project’s folder Content\Workflow, so Add file “project.workflow.xoml” in this folder.

Build Blueprint project and test it using new Visual Studio Instance. Now Workflow will appear as shown below.

 

Final WF

 

 

 

 

 

 

 

 

 

 

If you recollect we had used Sequence 0 for ‘AddDBConnection’’ and 1 for ‘AddDataEntities’, ‘AddDataEntities’ activity is appearing as child of ‘AddDBConnection’’.


If required, you can also create Activities at same level in tree to do this we need to use Parallel Workflow Activity instead of sequential.  We have used it to have “Overview” and ‘AddDBConnection’’ activities at same level.

Best part of WF Process workflow in blueprints which I like is, it automatically takes care of disabling activity as long as all its parent activities are marked as complete by checking the checkbox shown.

All Activities which are ready to execute are shown with Green color whereas all blocked activities are shown with red color. If I checked ‘AddDBConnection’’ now, ‘AddDataEntities’ will become green.

In this way you can provide guidance based on workflow in your blueprint and this will notify developer about exact steps which he/she has to carry out and in what sequence, to use the blueprint. According to me this really adds value to improve developer’s productivity.

 

 

 

 

 

 

 

 

 

 

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