protected override void OnInit(EventArgs e) { base.OnInit(e); this.AddResourceToClientDependency("FergusonMoriyam.Workflow.Umbraco.Web.Ui.Js.Util.js", ClientDependencyType.Javascript); this.AddResourceToClientDependency("FergusonMoriyam.Workflow.Umbraco.Web.Ui.Js.Config.js", ClientDependencyType.Javascript); // Get a reference to the application spring context and use it to get a reference // to the workflow transition service. If you know spring.net you could // Just add your aspx to the config in ~/config/fmworkflow var ctx = ContextRegistry.GetContext(); TheTransitionService = (IWorkflowTaskTransitionService)ctx.GetObject("TransitionService"); // Get a workflow instance - id is passed on the request. var id = Convert.ToInt32(Request["id"]); WorkflowInstance = TheTransitionService.GetWorkflowInstance(id); // Check that the workflow is able to be transitioned still - someone may have progressed it in the // meantime. CannotTransitionLiteral.Text = "This workflow cannot be transitioned"; if (!TheTransitionService.CanTransition(WorkflowInstance)) { CannotTransitionLiteral.Visible = true; return; } // Bind a list of possible transitions for current workflow task to the dropdown // Transitions are just a dictionary of Key = transition ID, Value = Description TransitonDropDownList.DataSource = TheTransitionService.GetTransitions(WorkflowInstance); TransitonDropDownList.DataTextField = "Value"; TransitonDropDownList.DataValueField = "Key"; TransitonDropDownList.DataBind(); }