Package com.flowable.form.engine.impl
Class FormServiceImpl
- java.lang.Object
-
- org.flowable.common.engine.impl.service.CommonServiceImpl<C>
-
- org.flowable.common.engine.impl.service.CommonEngineServiceImpl<FormEngineConfiguration>
-
- com.flowable.form.engine.impl.FormServiceImpl
-
- All Implemented Interfaces:
CoreFormService
,FormService
public class FormServiceImpl extends CommonEngineServiceImpl<FormEngineConfiguration> implements CoreFormService
- Author:
- Tijs Rademakers
-
-
Field Summary
-
Fields inherited from class org.flowable.common.engine.impl.service.CommonEngineServiceImpl
commandExecutor
-
Fields inherited from class org.flowable.common.engine.impl.service.CommonServiceImpl
configuration
-
-
Constructor Summary
Constructors Constructor Description FormServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bulkDeleteFormInstancesByProcessInstanceIds(Collection<String> processInstanceIds)
void
bulkDeleteFormInstancesByScopeIdsAndScopeType(Collection<String> scopeIds, String scopeType)
FormInstance
createFormInstance(Map<String,Object> variables, FormInfo formInfo, String taskId, String processInstanceId, String processDefinitionId, String tenantId, String outcome)
FormInstanceQuery
createFormInstanceQuery()
FormInstance
createFormInstanceWithScopeId(Map<String,Object> variables, FormInfo formInfo, String taskId, String scopeId, String scopeType, String scopeDefinitionId, String tenantId, String outcome)
void
deleteFormInstance(String formInstanceId)
void
deleteFormInstancesByFormDefinition(String formDefinitionId)
void
deleteFormInstancesByProcessDefinition(String processDefinitionId)
void
deleteFormInstancesByScopeDefinition(String scopeDefinitionId)
Map<String,Object>
filterFormValues(String elementId, String elementType, String scopeDefinitionId, String scopeType, Map<String,Object> formValues)
Filter the form values based on the defined output mappings.FormInstanceInfo
getFormInstanceModelById(String formDefinitionId, String taskId, String processInstanceId, Map<String,Object> variables)
FormInstanceInfo
getFormInstanceModelById(String formDefinitionId, String taskId, String processInstanceId, Map<String,Object> variables, String tenantId, boolean fallbackToDefaultTenant)
FormInstanceInfo
getFormInstanceModelById(String formInstanceId, Map<String,Object> variables)
FormInstanceInfo
getFormInstanceModelByKey(String formDefinitionKey, String taskId, String processInstanceId, Map<String,Object> variables)
FormInstanceInfo
getFormInstanceModelByKey(String formDefinitionKey, String taskId, String processInstanceId, Map<String,Object> variables, String tenantId, boolean fallbackToDefaultTenant)
FormInstanceInfo
getFormInstanceModelByKeyAndParentDeploymentId(String formDefinitionKey, String parentDeploymentId, String taskId, String processInstanceId, Map<String,Object> variables)
FormInstanceInfo
getFormInstanceModelByKeyAndParentDeploymentId(String formDefinitionKey, String parentDeploymentId, String taskId, String processInstanceId, Map<String,Object> variables, String tenantId, boolean fallbackToDefaultTenant)
FormInstanceInfo
getFormInstanceModelByKeyAndParentDeploymentIdAndScopeId(String formDefinitionKey, String parentDeploymentId, String scopeId, String scopeType, Map<String,Object> variables)
FormInstanceInfo
getFormInstanceModelByKeyAndParentDeploymentIdAndScopeId(String formDefinitionKey, String parentDeploymentId, String scopeId, String scopeType, Map<String,Object> variables, String tenantId, boolean fallbackToDefaultTenant)
FormInstanceInfo
getFormInstanceModelByKeyAndScopeId(String formDefinitionKey, String scopeId, String scopeType, Map<String,Object> variables)
FormInstanceInfo
getFormInstanceModelByKeyAndScopeId(String formDefinitionKey, String scopeId, String scopeType, Map<String,Object> variables, String tenantId, boolean fallbackToDefaultTenant)
byte[]
getFormInstanceValues(String formInstanceId)
FormInfo
getFormModelWithVariablesById(String formDefinitionId, String taskId, Map<String,Object> variables)
FormInfo
getFormModelWithVariablesById(String formId, String taskId, Map<String,Object> variables, String tenantId, boolean fallbackToDefaultTenant)
FormInfo
getFormModelWithVariablesByKey(String formDefinitionKey, String taskId, Map<String,Object> variables)
FormInfo
getFormModelWithVariablesByKey(String formDefinitionKey, String taskId, Map<String,Object> variables, String tenantId, boolean fallbackToDefaultTenant)
FormInfo
getFormModelWithVariablesByKeyAndParentDeploymentId(String formDefinitionKey, String parentDeploymentId, String taskId, Map<String,Object> variables)
FormInfo
getFormModelWithVariablesByKeyAndParentDeploymentId(String formDefinitionKey, String parentDeploymentId, String taskId, Map<String,Object> variables, String tenantId, boolean fallbackToDefaultTenant)
Map<String,Object>
getSavedFormVariables(FormInstance formInstance)
Map<String,Object>
getStartFormVariables(String processInstanceId, String scopeId)
Map<String,Object>
getVariablesFromFormSubmission(String elementId, String elementType, String scopeId, String scopeDefinitionId, String scopeType, FormInfo formInfo, Map<String,Object> values)
Map<String,Object>
getVariablesFromFormSubmission(String elementId, String elementType, String scopeId, String scopeDefinitionId, String scopeType, FormInfo formInfo, Map<String,Object> values, String outcome)
FormInstance
saveFormInstance(Map<String,Object> variables, FormInfo formInfo, String taskId, String processInstanceId, String processDefinitionId, String tenantId, String outcome)
FormInstance
saveFormInstanceByFormDefinitionId(Map<String,Object> variables, String formDefinitionId, String taskId, String processInstanceId, String processDefinitionId, String tenantId, String outcome)
FormInstance
saveFormInstanceWithScopeId(Map<String,Object> variables, String formModelId, String taskId, String scopeId, String scopeType, String scopeDefinitionId, String tenantId, String outcome)
FormInstance
saveFormInstanceWithScopeId(Map<String,Object> variables, FormInfo formInfo, String taskId, String scopeId, String scopeType, String scopeDefinitionId, String tenantId, String outcome)
void
validateFormFields(String elementId, String elementType, String scopeId, String scopeDefinitionId, String scopeType, FormInfo formInfo, Map<String,Object> values)
-
Methods inherited from class org.flowable.common.engine.impl.service.CommonEngineServiceImpl
getCommandExecutor, setCommandExecutor
-
Methods inherited from class org.flowable.common.engine.impl.service.CommonServiceImpl
getConfiguration
-
-
-
-
Method Detail
-
getVariablesFromFormSubmission
public Map<String,Object> getVariablesFromFormSubmission(String elementId, String elementType, String scopeId, String scopeDefinitionId, String scopeType, FormInfo formInfo, Map<String,Object> values)
-
validateFormFields
public void validateFormFields(String elementId, String elementType, String scopeId, String scopeDefinitionId, String scopeType, FormInfo formInfo, Map<String,Object> values)
- Specified by:
validateFormFields
in interfaceFormService
-
getVariablesFromFormSubmission
public Map<String,Object> getVariablesFromFormSubmission(String elementId, String elementType, String scopeId, String scopeDefinitionId, String scopeType, FormInfo formInfo, Map<String,Object> values, String outcome)
- Specified by:
getVariablesFromFormSubmission
in interfaceFormService
-
createFormInstance
public FormInstance createFormInstance(Map<String,Object> variables, FormInfo formInfo, String taskId, String processInstanceId, String processDefinitionId, String tenantId, String outcome)
- Specified by:
createFormInstance
in interfaceFormService
-
saveFormInstance
public FormInstance saveFormInstance(Map<String,Object> variables, FormInfo formInfo, String taskId, String processInstanceId, String processDefinitionId, String tenantId, String outcome)
- Specified by:
saveFormInstance
in interfaceFormService
-
saveFormInstanceByFormDefinitionId
public FormInstance saveFormInstanceByFormDefinitionId(Map<String,Object> variables, String formDefinitionId, String taskId, String processInstanceId, String processDefinitionId, String tenantId, String outcome)
- Specified by:
saveFormInstanceByFormDefinitionId
in interfaceFormService
-
createFormInstanceWithScopeId
public FormInstance createFormInstanceWithScopeId(Map<String,Object> variables, FormInfo formInfo, String taskId, String scopeId, String scopeType, String scopeDefinitionId, String tenantId, String outcome)
- Specified by:
createFormInstanceWithScopeId
in interfaceFormService
-
saveFormInstanceWithScopeId
public FormInstance saveFormInstanceWithScopeId(Map<String,Object> variables, FormInfo formInfo, String taskId, String scopeId, String scopeType, String scopeDefinitionId, String tenantId, String outcome)
- Specified by:
saveFormInstanceWithScopeId
in interfaceFormService
-
saveFormInstanceWithScopeId
public FormInstance saveFormInstanceWithScopeId(Map<String,Object> variables, String formModelId, String taskId, String scopeId, String scopeType, String scopeDefinitionId, String tenantId, String outcome)
- Specified by:
saveFormInstanceWithScopeId
in interfaceFormService
-
getFormModelWithVariablesById
public FormInfo getFormModelWithVariablesById(String formDefinitionId, String taskId, Map<String,Object> variables)
- Specified by:
getFormModelWithVariablesById
in interfaceFormService
-
getFormModelWithVariablesById
public FormInfo getFormModelWithVariablesById(String formId, String taskId, Map<String,Object> variables, String tenantId, boolean fallbackToDefaultTenant)
- Specified by:
getFormModelWithVariablesById
in interfaceFormService
-
getFormModelWithVariablesByKey
public FormInfo getFormModelWithVariablesByKey(String formDefinitionKey, String taskId, Map<String,Object> variables)
- Specified by:
getFormModelWithVariablesByKey
in interfaceFormService
-
getFormModelWithVariablesByKey
public FormInfo getFormModelWithVariablesByKey(String formDefinitionKey, String taskId, Map<String,Object> variables, String tenantId, boolean fallbackToDefaultTenant)
- Specified by:
getFormModelWithVariablesByKey
in interfaceFormService
-
getFormModelWithVariablesByKeyAndParentDeploymentId
public FormInfo getFormModelWithVariablesByKeyAndParentDeploymentId(String formDefinitionKey, String parentDeploymentId, String taskId, Map<String,Object> variables)
- Specified by:
getFormModelWithVariablesByKeyAndParentDeploymentId
in interfaceFormService
-
getFormModelWithVariablesByKeyAndParentDeploymentId
public FormInfo getFormModelWithVariablesByKeyAndParentDeploymentId(String formDefinitionKey, String parentDeploymentId, String taskId, Map<String,Object> variables, String tenantId, boolean fallbackToDefaultTenant)
- Specified by:
getFormModelWithVariablesByKeyAndParentDeploymentId
in interfaceFormService
-
getFormInstanceModelById
public FormInstanceInfo getFormInstanceModelById(String formInstanceId, Map<String,Object> variables)
- Specified by:
getFormInstanceModelById
in interfaceFormService
-
getFormInstanceModelById
public FormInstanceInfo getFormInstanceModelById(String formDefinitionId, String taskId, String processInstanceId, Map<String,Object> variables)
- Specified by:
getFormInstanceModelById
in interfaceFormService
-
getFormInstanceModelById
public FormInstanceInfo getFormInstanceModelById(String formDefinitionId, String taskId, String processInstanceId, Map<String,Object> variables, String tenantId, boolean fallbackToDefaultTenant)
- Specified by:
getFormInstanceModelById
in interfaceFormService
-
getFormInstanceModelByKey
public FormInstanceInfo getFormInstanceModelByKey(String formDefinitionKey, String taskId, String processInstanceId, Map<String,Object> variables)
- Specified by:
getFormInstanceModelByKey
in interfaceFormService
-
getFormInstanceModelByKey
public FormInstanceInfo getFormInstanceModelByKey(String formDefinitionKey, String taskId, String processInstanceId, Map<String,Object> variables, String tenantId, boolean fallbackToDefaultTenant)
- Specified by:
getFormInstanceModelByKey
in interfaceFormService
-
getFormInstanceModelByKeyAndParentDeploymentId
public FormInstanceInfo getFormInstanceModelByKeyAndParentDeploymentId(String formDefinitionKey, String parentDeploymentId, String taskId, String processInstanceId, Map<String,Object> variables)
- Specified by:
getFormInstanceModelByKeyAndParentDeploymentId
in interfaceFormService
-
getFormInstanceModelByKeyAndParentDeploymentId
public FormInstanceInfo getFormInstanceModelByKeyAndParentDeploymentId(String formDefinitionKey, String parentDeploymentId, String taskId, String processInstanceId, Map<String,Object> variables, String tenantId, boolean fallbackToDefaultTenant)
- Specified by:
getFormInstanceModelByKeyAndParentDeploymentId
in interfaceFormService
-
getFormInstanceModelByKeyAndScopeId
public FormInstanceInfo getFormInstanceModelByKeyAndScopeId(String formDefinitionKey, String scopeId, String scopeType, Map<String,Object> variables)
- Specified by:
getFormInstanceModelByKeyAndScopeId
in interfaceFormService
-
getFormInstanceModelByKeyAndScopeId
public FormInstanceInfo getFormInstanceModelByKeyAndScopeId(String formDefinitionKey, String scopeId, String scopeType, Map<String,Object> variables, String tenantId, boolean fallbackToDefaultTenant)
- Specified by:
getFormInstanceModelByKeyAndScopeId
in interfaceFormService
-
getFormInstanceModelByKeyAndParentDeploymentIdAndScopeId
public FormInstanceInfo getFormInstanceModelByKeyAndParentDeploymentIdAndScopeId(String formDefinitionKey, String parentDeploymentId, String scopeId, String scopeType, Map<String,Object> variables)
- Specified by:
getFormInstanceModelByKeyAndParentDeploymentIdAndScopeId
in interfaceFormService
-
getFormInstanceModelByKeyAndParentDeploymentIdAndScopeId
public FormInstanceInfo getFormInstanceModelByKeyAndParentDeploymentIdAndScopeId(String formDefinitionKey, String parentDeploymentId, String scopeId, String scopeType, Map<String,Object> variables, String tenantId, boolean fallbackToDefaultTenant)
- Specified by:
getFormInstanceModelByKeyAndParentDeploymentIdAndScopeId
in interfaceFormService
-
filterFormValues
public Map<String,Object> filterFormValues(String elementId, String elementType, String scopeDefinitionId, String scopeType, Map<String,Object> formValues)
Description copied from interface:CoreFormService
Filter the form values based on the defined output mappings.- Specified by:
filterFormValues
in interfaceCoreFormService
- Parameters:
elementId
- element id to which the form is attached to.elementType
- element type to which the form is attached to.scopeDefinitionId
- definition id to which the form is attached to.scopeType
- scope type to which the form is attached to.- Returns:
- the filtered values.
-
getFormInstanceValues
public byte[] getFormInstanceValues(String formInstanceId)
- Specified by:
getFormInstanceValues
in interfaceFormService
-
createFormInstanceQuery
public FormInstanceQuery createFormInstanceQuery()
- Specified by:
createFormInstanceQuery
in interfaceFormService
-
deleteFormInstance
public void deleteFormInstance(String formInstanceId)
- Specified by:
deleteFormInstance
in interfaceFormService
-
deleteFormInstancesByFormDefinition
public void deleteFormInstancesByFormDefinition(String formDefinitionId)
- Specified by:
deleteFormInstancesByFormDefinition
in interfaceFormService
-
deleteFormInstancesByProcessDefinition
public void deleteFormInstancesByProcessDefinition(String processDefinitionId)
- Specified by:
deleteFormInstancesByProcessDefinition
in interfaceFormService
-
deleteFormInstancesByScopeDefinition
public void deleteFormInstancesByScopeDefinition(String scopeDefinitionId)
- Specified by:
deleteFormInstancesByScopeDefinition
in interfaceFormService
-
getSavedFormVariables
public Map<String,Object> getSavedFormVariables(FormInstance formInstance)
-
getStartFormVariables
public Map<String,Object> getStartFormVariables(String processInstanceId, String scopeId)
-
bulkDeleteFormInstancesByProcessInstanceIds
public void bulkDeleteFormInstancesByProcessInstanceIds(Collection<String> processInstanceIds)
-
bulkDeleteFormInstancesByScopeIdsAndScopeType
public void bulkDeleteFormInstancesByScopeIdsAndScopeType(Collection<String> scopeIds, String scopeType)
-
-