Java Code Examples for org.activiti.engine.impl.persistence.entity.ProcessDefinitionEntity#getStartFormHandler()
The following examples show how to use
org.activiti.engine.impl.persistence.entity.ProcessDefinitionEntity#getStartFormHandler() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SubmitStartFormCmd.java From flowable-engine with Apache License 2.0 | 6 votes |
@Override protected ProcessInstance execute(CommandContext commandContext, ProcessDefinition processDefinition) { ProcessDefinitionEntity processDefinitionEntity = (ProcessDefinitionEntity) processDefinition; ExecutionEntity processInstance = null; if (businessKey != null) { processInstance = processDefinitionEntity.createProcessInstance(businessKey); } else { processInstance = processDefinitionEntity.createProcessInstance(); } commandContext.getHistoryManager() .reportFormPropertiesSubmitted(processInstance, properties, null); StartFormHandler startFormHandler = processDefinitionEntity.getStartFormHandler(); startFormHandler.submitFormProperties(properties, processInstance); processInstance.start(); return processInstance; }
Example 2
Source File: GetStartFormCmd.java From flowable-engine with Apache License 2.0 | 6 votes |
@Override public StartFormData execute(CommandContext commandContext) { ProcessDefinitionEntity processDefinition = (ProcessDefinitionEntity) commandContext .getProcessEngineConfiguration() .getDeploymentManager() .findDeployedProcessDefinitionById(processDefinitionId); if (processDefinition == null) { throw new ActivitiObjectNotFoundException("No process definition found for id '" + processDefinitionId + "'", ProcessDefinition.class); } StartFormHandler startFormHandler = processDefinition.getStartFormHandler(); if (startFormHandler == null) { throw new ActivitiException("No startFormHandler defined in process '" + processDefinitionId + "'"); } return startFormHandler.createStartFormData(processDefinition); }
Example 3
Source File: FindFirstTaskFormCmd.java From lemon with Apache License 2.0 | 6 votes |
public FirstTaskForm findStartEventForm( ProcessDefinitionEntity processDefinitionEntity) { FirstTaskForm firstTaskForm = new FirstTaskForm(); firstTaskForm.setExists(true); firstTaskForm.setProcessDefinitionId(processDefinitionId); firstTaskForm.setTaskForm(false); DefaultFormHandler formHandler = (DefaultFormHandler) processDefinitionEntity .getStartFormHandler(); if (formHandler.getFormKey() != null) { String formKey = formHandler.getFormKey().getExpressionText(); firstTaskForm.setFormKey(formKey); firstTaskForm.setActivityId(processDefinitionEntity.getInitial() .getId()); } return firstTaskForm; }
Example 4
Source File: ActivitiUtil.java From alfresco-repository with GNU Lesser General Public License v3.0 | 5 votes |
public String getStartFormKey(String processDefinitionId) { ProcessDefinitionEntity procDef = (ProcessDefinitionEntity) getDeployedProcessDefinition(processDefinitionId); if(procDef.getStartFormHandler() == null) { return null; } return procDef.getStartFormHandler().createStartFormData(procDef).getFormKey(); }