// // GET: /Form/ public ActionResult ActivityForm(long flowId) { IExecutionSessionLocal executionComponent = null; try { executionComponent = ServiceLocator.Instance.GetService(typeof(IExecutionSessionLocal)) as IExecutionSessionLocal; IFlow flow = executionComponent.GetFlow(flowId); ViewData["activity"] = flow.Node; ViewData["processDefinition"] = flow.ProcessInstance.ProcessDefinition; ViewData["preview"] = "activity"; //AddImageCoordinates((IState)flow.Node); //create Form IActivityForm activityForm = executionComponent.GetActivityForm(flowId); AddFormData(activityForm); } finally { ServiceLocator.Instance.Release(executionComponent); } return(View()); }
public void ShowActivityForm(long flowId) { if (log.IsDebugEnabled) { log.Debug("ShowActivityForm flowId:" + flowId); } IExecutionSessionLocal executionComponent = null; try { executionComponent = ServiceLocator.Instance.GetService(typeof(IExecutionSessionLocal)) as IExecutionSessionLocal; IFlow flow = executionComponent.GetFlow(flowId); Context.Flash["activity"] = flow.Node; Context.Flash["processDefinition"] = flow.ProcessInstance.ProcessDefinition; Context.Flash["preview"] = "activity"; AddImageCoordinates((IState)flow.Node); //create Form IActivityForm activityForm = executionComponent.GetActivityForm(flowId); AddFormData(activityForm); } finally { ServiceLocator.Instance.Release(executionComponent); } RenderView("activityForm"); }