Is there a way to the the current progress on a workflow controlled item without having to create milestones.
I have a workflow will several states and I would like to track the progress in a higher level schedule.
I realize I could add a milestone on each state, but because the workflow has several shortcuts I may actually not enter/leave all of them.
I would like to just set a milestone on a final state of the workflow, but the manually set the progress through a action script.
Any ideas?
Hello Sten,
I'm wondering if you could just set/create the milestones dynamically as workflow transitions are completed to push up status to your project? You'd have to review your workflow transitions and logic to understand when to create a new milestone or update existing ones. Here's a function that may be helpful to you.
-Jared
/* functionality: Create a single MS set to today's date. Useful when triggered in conjunction with a workflow set to set the milestone based on When the actual WF was triggered input : WFstates(associative array) -- Key(string) = Workflow State Name, progress -- Value(int) 0-100 representing % complete return : example: createSingleState('50% Complete', 50) */ function createSingleState(wfState, progress) { var milestoneExists = false; //adjust existing milestone date for(var milestoneIndex in item.milestones){ if(item.milestones[milestoneIndex].workflowStateName === wfState){ milestoneExists = true; //Update the date and the warning window item.milestones[milestoneIndex].milestoneDate = new Date(); item.milestones[milestoneIndex].warnThreshold = 0; break; } } if(milestoneExists === false){ var newMileStone = item.addMilestone(); //set the new milestone properties newMileStone.setWorkflowState(wfState); newMileStone.milestoneType = 'ENTER'; newMileStone.milestoneDate = new Date(); newMileStone.warnThreshold = 0; newMileStone.progress = progress; } }
I do something similar on some of my other workflows.
By problem with that method is that it generates a lot of action scripts. Especially because I already have action scripts in this workflow.
It makes it impossible to reuse in a elegant way.
Thinking about it, then maybe what I want is the ability to have multiple action scripts on a workflow transition.
Also, another problem with building up the milestones dynamically is 'return for correction loops' i the workflow. In that case I would have to delete milestones since I may not hit them the second time through the workflow.
For larger workflow the logic behind dynamically creating and deleting milestones quickly becomes convoluted and very difficult to maintain/support.
Hi,
What about something like the following? The set up is to have items with workflow (WF) in one workspace and another workspace with Project Management (PM) functionality that is linked to the first one.
Caveats: Filling in milestones on the linked items interferes with this approach. Also, an item is colored either green (end date has not been reached OR item is complete) or red (end date has been exceeded) without an in-between yellow identifier as a warning.
Attached is a screenshot with an example of this approach.
Sara Murray
Razorleaf Corp.