This blog focuses on customizations and programming for Project Web App, Project Server, Project Professional and Project Standard. Includes User Interface (UI) customizations, Project Server Interface (PSI) and Visual Basic for Applications (VBA) Programming. It also covers Business Intelligence.
The skip to stage feature is designed to allow administrators the ability to restart a workflow and have it attempt to skip along the workflow until it reaches a particular stage. A common scenario for this functionality is when a project has progressed to a specific point in a workflow, but needs to be pushed back to a previous stage due to any number of reasons, such as, a new stage was inserted that needs to be addressed, certain fields need to be changed that are exposed only in previous stages, etc.
Project Server workflows, like SharePoint workflows, must always be executed linearly. They cannot begin execution at random locations within a workflow. Neither can they “jump” from one point to another point, unless coded to do so within the workflow. The skip to stage functionality cannot circumvent this limitation. As such, the issue with restarting a workflow and attempting to push it to a particular point is that any activities which “stopped” the workflow before will continue to do so again. For Example, activities such as SetProjectStage, OnProjectSubmit, OnProjectCommit, the officeTask, ect, will still cause the workflow to dehydrate and give control back to the user. Although for the SetProjectStage activity we have done some extra work and put logic inside it so that it can be skipped, so long as there are no required fields left in the stage
Therefore, to fully work with the skip to stage functionality you will need to wrap activities within “if statements”. When an administrator restarts a workflow and chooses to skip to a certain stage, we pass into the workflow two properties. The first property indicates that a skip stage command has been sent, and the second property contains the stage Guid that the workflow should stop at. Our SetProjectStage activity reads these two variables and skips if the first variable is set to true, and if the current stage is not the stage that is set in the second property. However, it won’t skip if there are required fields in the stage. So you will need to mimic this behavior around your other activities. You should wrap all of the activities between the SetProjectStage activities (not including the SetProjectStage activity) with an ifElseActivity statement that checks the first Property.
To make any workflow work correctly with the skip to stage functionality an “if statement” should be placed around all of the activities between each of the SetProjectStages. The key example of when this would be necessary is for the office task activities.
Screen shot of example workflow:
In the above example the “ifElseActivity1” is used to bypass the leadApproval sequence activity, which contains all of our approval activities.
As you can see from the above screen shot, it is the “if statement” that we need to figure out how to code. In order to do so, we need to be aware of the two properties that are passed into the workflow during a skip to stage event:
WorkflowContext.SkipToStage : Boolean : If true, a skip to stage functionality has been requested
WorkflowContext.StageUid : Guid : Guid of the stage the workflow should skip to
Steps for creating the workflow:
1. Insert and set the properties of a SetProjectStage activity
· You will need to set the “AlwaysWait” property to True in order for the Skip to Stage scenario to properly work.
· If you do not set the Always wait property to true the workflow may not be able to skip to and stop at previous stages.
2. Insert an IfElseActivity
3. Have the activity check the “projectSequence1.WorkflowContext.SkipToStage” variable.
· If variable is set to false, execute all activities
· Else, bypass
The WorkflowContext.StageUid is not needed for the “If Statement” but is there in case you wish to check what stage the user is trying to skip to.
*The complete above example is found in the attached Visual Studio solution.*
To attempt to force a project to skip to a particular stage, do the following within Project Server.
1. Log into Project Server as an Administrator
2. Go to Server Setting
3. Click on “Change or Restart Workflows”
4. In the top drop down, select the EPT that the project(s) that you would like to restart and skip to a stage belong to.
5. Select the project(s) which you would like restart and skip to stage from the left panel and add them to the right panel.
6. Check the “Restart current workflow for the selected projects” option
a. Alternatively you can also select the “Associate projects with a new Enterprise Project Type:” option. If you select an Enterprise Project Type that has a workflow associated with it, you can then select which stage in that workflow the project(s) should attempt to skip to.
7. Next select which stage the project(s) should attempt to skip to
a. Skip until the current workflow stage
i. Selecting this option will tell the projects to attempt to skip until they reach the stage that the project(s) are in currently
b. Skip to a particular workflow stage & then selecting a particular stage
i. Selecting this option will tell the projects to attempt to skip until they reach the stage that has been selected
ii. If the selected stage does not exist, the workflow will stop at the very first opportunity.
8. Press OK
9. The project restart jobs will be sent to the queue, and the projects will attempt to restart and skip.
Expected behavior of the skip to stage can be summed up by the following example.
· A workflow has 3 stages
· All stages are marked as “AlwaysWait”
· Project is on Stage 2
· Stage 1’s required custom fields are filled out
· Stage 2’s required custom fields are not filled out
· Stage 3’s required custom fields are not filled out
Administrator will go and:
o Restart Skip to current stage
§ This will make the workflow restart and stop at stage 2
o Restart Skip to stage 1 (trying to make the workflow stop on a stage where all of the require custom fields are filled out)
§ This will make the workflow stop at stage 1 and wait for submit
o Restart Skip to stage 3 (trying to make it jump over stage 2 even though its required custom fields are not yet filled out)
§ Workflow will stop at stage 2
§ Workflow will not be able to skip stage2 if it has required fields.
§ If you really want to skip it, you need wrap the SetProjectStage as well in an if/else skip condition, which checks the SkipToStage variable and the StageUid variable.
o Restart Skip to stage 5 (trying to make the workflow stop on a stage that does not exist)
§ Workflow will stop at stage 1. This is because of the combination of “Destination stage” doesn’t exist & current stage=”Always wait”.
This feature has been designed and created to address the majority of our customer needs when it comes to being able to skip between stages. In this blog we reviewed there are two steps to use this feature. The first is to correctly develop your workflows to be able to skip over the activities that are between the SetProjectStage activities. This is done by wrapping the activities within an ifElse activity. And the second stage is to restart the workflows and select the stage the project should attempt to skip to. This is done with Project Server --> Server Settings --> Change or Restart Workflows.
If you have any additional questions please feel free to post comments, and I will follow up accordingly.
In case you got Project 2010 Beta and you are interested in the activation process – this might be interesting for you.
Microsoft Office 2010 - including Project Standard 2010, Project Professional 2010 and Visio 2010 use the same volume activation technology as Windows 7 and Windows Vista. If you have already set up a Key Management Service (KMS) host to activate Windows, you can use the same host to activate Office 2010 after a few steps.
You can use the following methods to activate Office 2010 by using Office Activation Technologies, which are the same methods that are used for Windows Vista and later versions of Windows:
· Multiple Activation Key (MAK). With a MAK, clients activate Office 2010 online with the Microsoft hosted activation servers or by telephone.
· Key Management Service (KMS). KMS uses a KMS host key to activate a KMS host computer and establish a local activation service in your environment. Office 2010 connects to the local KMS host for activation.
· A combination of KMS and MAK.
For detailed information, see Overview of volume activation for Office 2010 in the technical library.
For information about when you would use each activation method, see the four scenarios described in detail in Volume activation quick start guide for Office 2010 in the technical library.
· Q: How could the product be activated in non-connected environments (e.g. without Internet access)?
· A: The option is to use MAK and activate by telephone or by a MAK proxy activation using the VAMT 2.0 – more information from Ted is available here: http://social.technet.microsoft.com/Forums/en/office2010volact/thread/2fab72e4-cd14-41ce-aa68-912c149e0529
· Q: Could I activate the Project Professional 2010 Beta by telephone?
· A: Unfortunately no – this option is not available for Beta products – you can however use the MAK proxy activation (see above) if your computer does not have access to the internet or your organization does not have KMS set-up.
· Q: Where do I find the MAK or a “Product Key” for Project Professional 2010 Beta?
· A: After registering for download on Microsoft Project Professional 2010 Beta page the key is generated for you, you can re-visit this page anytime.
· Q: How do I enter MAK or a “Product Key” for Project Professional 2010 Beta?
· A: run the application, click “File”, then choose “Help” and on the right hand side click “Change Product Key”.
The Project 2010 SDK nicely documents Custom Field functionality – very important functionality for customizing Project 2010 - Custom Fields enable you to capture and calculate additional metadata for Projects, Resources, Tasks and Assignments. Project 2010 SDK: “You can filter, group, sort, and create OLAP cubes and reports based on custom field values. Project 2010 extends the functionality and ease of use of custom fields compared to previous versions of Project.” – lot of power and relatively easy to do! However – proper planning is strongly advised :)
Project 2010 SDK: Custom Fields in Project 2010 (http://msdn.microsoft.com/en-us/library/ee767683(office.14).aspx)
Many executives like graphical indicators – that simple graphically show the values in your Custom Fields (Visual Studio not required, all could be configured via PWA or Project Desktop User Interface, even when an advanced calculation formula is required) -
Using Formulas and Graphical Indicators with Custom Fields (http://msdn.microsoft.com/en-us/library/ee767700(office.14).aspx)
Because there have been several recent changes in the post-beta version of Project Server 2010 and Office SharePoint Server 2010, the article How to: Use Impersonation with WCF in the January 2010 release of the SDK is not correct for the 4730.1010 and later builds of Project Server. The article in the March 2010 release of the SDK is correct. The attached Impersonation_PSIProxy.zip file includes the following:
Just wanted to bring–up few links on the BI capabilities – that could be used in 2010 as well:
We have finished another round of Project 2010 Ignites last week. Many are asking for slides here you go Microsoft Project 2010 “Ignite” training slide presentations - PowerPoint slides for a three-day training program to prepare EPM professionals for deployment, operations and customization of Project Server 2010.
Two last runs are coming in the US – check this link.
Dear all, please let me share few important resources regarding Project 2010 Beta -
- This Virtual Lab is the same version of the below downloadable image, but available as hosted experience directly in your Internet Explorer. Please click here to proceed.
- Please pay close attention to System Requirements – especially if you are in a corporate environment behind firewall!
- Download includes requirements, demo script and setup instructions - proceed here.
- Please pay close attention to Setting up the Host Machine document as it includes important steps to restore the Virtual Machine and get going!
- For optimal performance we recommend 8GB RAM and Solid State Drive (SSD) for your host machine.
- Information and download here.
- Product information
- Project Team Blog http://blogs.msdn.com/project/
- Videos & Project Conference sessions
- IT Professional related
- TechCenter @ TechNet http://technet.microsoft.com/ProjectServer/
- Admin Blog http://blogs.technet.com/projectadministration/
- Developer related
- Developer center @ MSDN http://msdn.microsoft.com/Project
- Programmability blog http://blogs.msdn.com/project_programmability/
- Additional questions? Project 2010 Forums!
We do our best in order to answer all your possible questions around Upgrade and Migration to Project 2010.
Here are the available resources:
This includes information on:
PLEASE NOTE: Upgrade from any pre-release version of Project Server 2010 (including currently available Beta) to the final version of Project Server 2010 will NOT be supported.
Why this post on Programmability blog? If your customers are on Project Server 2003 or Portfolio Server 2007 you will be involved in porting and customizing the processes on Project Server 2010… Great time to start digging around Project 2010 Programmability on http://msdn.microsoft.com/project/.