public virtual object Execute(CommandContext commandContext) { var processEngineConfiguration = context.Impl.Context.ProcessEngineConfiguration; DeploymentCache deploymentCache = processEngineConfiguration.DeploymentCache; ProcessDefinitionEntity processDefinition = deploymentCache.FindDeployedProcessDefinitionById(ProcessDefinitionId); EnsureUtil.EnsureNotNull("Process Definition '" + ProcessDefinitionId + "' not found", "processDefinition", processDefinition); foreach (var checker in commandContext.ProcessEngineConfiguration.CommandCheckers) { checker.CheckReadProcessDefinition(processDefinition); } IStartFormHandler startFormHandler = processDefinition.StartFormHandler; if (startFormHandler == null) { return(null); } var formEngine = context.Impl.Context.ProcessEngineConfiguration.FormEngines[FormEngineName]; EnsureUtil.EnsureNotNull("No formEngine '" + FormEngineName + "' defined process engine configuration", "formEngine", formEngine); IStartFormData startForm = startFormHandler.CreateStartFormData(processDefinition); return(formEngine.RenderStartForm(startForm)); }
public static void InitFormPropertiesOnScope(IVariableMap variables, IActivityExecution execution) { ProcessDefinitionEntity pd = (ProcessDefinitionEntity)((PvmExecutionImpl)execution).ProcessDefinition; IStartFormHandler startFormHandler = pd.StartFormHandler; startFormHandler.SubmitFormVariables(variables, execution); }
public virtual IStartFormData Execute(CommandContext commandContext) { var processEngineConfiguration = context.Impl.Context.ProcessEngineConfiguration; DeploymentCache deploymentCache = processEngineConfiguration.DeploymentCache; ProcessDefinitionEntity processDefinition = deploymentCache.FindDeployedProcessDefinitionById(ProcessDefinitionId); EnsureUtil.EnsureNotNull("No process definition found for id '" + ProcessDefinitionId + "'", "processDefinition", processDefinition); foreach (var checker in commandContext.ProcessEngineConfiguration.CommandCheckers) { checker.CheckReadProcessDefinition(processDefinition); } IStartFormHandler startFormHandler = processDefinition.StartFormHandler; EnsureUtil.EnsureNotNull("No startFormHandler defined in process '" + ProcessDefinitionId + "'", "startFormHandler", startFormHandler); return(startFormHandler.CreateStartFormData(processDefinition)); }
public CreateStartFormInvocation(IStartFormHandler startFormHandler, ProcessDefinitionEntity definition) : base(null, (IResourceDefinitionEntity)definition) { this.StartFormHandler = startFormHandler; this.Definition = definition; }
public DelegateStartFormHandler(IStartFormHandler formHandler, DeploymentEntity deployment) : base(formHandler, deployment.Id) { }