Class HvlBpmnProcessServiceImpl
java.lang.Object
tr.com.havelsan.javarch.bpmn.admin.starter.module.process.logic.HvlBpmnProcessServiceImpl
- All Implemented Interfaces:
HvlBpmnProcessService
The class which implements
HvlBpmnProcessService
-
Constructor Summary
ConstructorDescriptionHvlBpmnProcessServiceImpl
(HvlBpmnProcessRepository processRepository, HvlBpmnProcessMapper processMapper, HvlBpmnProcessQueryGenerator processQueryGenerator, HvlBpmnProcessDiagramService processDiagramService, HvlBpmnProcessVersionService processVersionService, HvlBpmnRepositoryService bpmnRepositoryService, org.flowable.engine.RuntimeService runtimeService, HvlBpmnProcessProperties processProperties, HvlProcessDocAttachmentOperationalManager hvlProcessDocAttachmentOperationalManager, HvlProcessGeneratedDocOperationalManager hvlProcessGeneratedDocOperationalManager, HvlBpmnSessionDataProvider bpmnSessionDataProvider) Instantiates a new HvlBpmnProcessServiceImpl. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Removes object according to provided parameter.void
deployProcess
(@NotNull Long id) Deploy process.byte[]
Exports all processes as zip file.exportProcess
(@NotNull Long id) Exports process as bpmn xml.Gets namespace list.getProcessById
(@NotNull Long id) Gets process by id.getProcessByKey
(@NotNull String key) Gets process by key.com.fasterxml.jackson.databind.node.ObjectNode
getProcessModelNode
(@NotNull Long modelId) Gets process model node.importAll
(byte[] zipBytes) Imports all bpmn xml files from a zip file.importProcess
(byte[] xmlBytes, boolean isSystemProcess) Imports a bpmn xml.boolean
Check the process is locked.boolean
isProcessDeploymentExist
(@NotBlank String key) Checks if there is any deployed process exists with given key.boolean
isProcessInstanceExist
(@NotBlank String key, @NotNull Integer version) Checks if there is any process instance exists with given key and versionboolean
isSystemProcess
(@NotNull String processUuid) Check the process is system processvoid
Lock the process.queryCategoryList
(@NotBlank @Size(min=3,max=64) String namespace) Query as list.queryList
(@NotNull HvlBpmnProcessQueryModel processQueryModel) Query as list.tr.com.havelsan.javarch.data.commons.pageable.HvlPage
<HvlBpmnProcessModel> queryPage
(@NotNull HvlBpmnProcessQueryModel processQueryModel) Query as page.save
(@Valid HvlBpmnProcessModel processModel, Long sourceProcessId) Adds provided object.void
saveProcessModelNode
(@NotNull Long modelId, @NotEmpty org.springframework.util.MultiValueMap<String, String> values) Saves process model node.void
Unlock the process.update
(@Valid HvlBpmnProcessModel processModel, boolean newVersion, HvlBpmnProcessUpdateType updateType) Edits object associated provided object.void
upgradeVersion
(@NotNull String processDefinitionKey, byte[] upgradedProcessDefinitionXmlFile) Upgrade existing process definition.
-
Constructor Details
-
HvlBpmnProcessServiceImpl
public HvlBpmnProcessServiceImpl(HvlBpmnProcessRepository processRepository, HvlBpmnProcessMapper processMapper, HvlBpmnProcessQueryGenerator processQueryGenerator, HvlBpmnProcessDiagramService processDiagramService, HvlBpmnProcessVersionService processVersionService, HvlBpmnRepositoryService bpmnRepositoryService, org.flowable.engine.RuntimeService runtimeService, HvlBpmnProcessProperties processProperties, HvlProcessDocAttachmentOperationalManager hvlProcessDocAttachmentOperationalManager, HvlProcessGeneratedDocOperationalManager hvlProcessGeneratedDocOperationalManager, HvlBpmnSessionDataProvider bpmnSessionDataProvider) Instantiates a new HvlBpmnProcessServiceImpl.- Parameters:
processRepository
- the process repositoryprocessMapper
- the process mapperprocessQueryGenerator
- the process query generatorprocessDiagramService
- the process diagram serviceprocessVersionService
- the process version servicebpmnRepositoryService
- the bpmn repository serviceprocessProperties
- the process propertieshvlProcessDocAttachmentOperationalManager
- the process doc attachment operational managerhvlProcessGeneratedDocOperationalManager
- the process generated doc operational managerbpmnSessionDataProvider
- the bpmn session data provider
-
-
Method Details
-
save
Adds provided object.- Specified by:
save
in interfaceHvlBpmnProcessService
- Parameters:
processModel
- the process modelsourceProcessId
- the source process's id if cloning is wanted- Returns:
- the long
-
update
public Long update(@Valid @Valid HvlBpmnProcessModel processModel, boolean newVersion, HvlBpmnProcessUpdateType updateType) Edits object associated provided object.- Specified by:
update
in interfaceHvlBpmnProcessService
- Parameters:
processModel
- the process modelnewVersion
- the new versionupdateType
- the update type- Returns:
- the long
-
delete
Removes object according to provided parameter.- Specified by:
delete
in interfaceHvlBpmnProcessService
- Parameters:
id
- the id
-
deployProcess
Deploy process.- Specified by:
deployProcess
in interfaceHvlBpmnProcessService
- Parameters:
id
- the id
-
importProcess
public HvlProcessDefinitionImportResultModel importProcess(byte[] xmlBytes, boolean isSystemProcess) Imports a bpmn xml.- Specified by:
importProcess
in interfaceHvlBpmnProcessService
- Parameters:
xmlBytes
- the xml bytesisSystemProcess
- the is system process- Returns:
- the HvlProcessDefinitionImportResultModel
-
importAll
Imports all bpmn xml files from a zip file.- Specified by:
importAll
in interfaceHvlBpmnProcessService
- Parameters:
zipBytes
- the zip bytes- Returns:
- the list
- Throws:
IOException
- the io exception
-
exportProcess
Exports process as bpmn xml.- Specified by:
exportProcess
in interfaceHvlBpmnProcessService
- Parameters:
id
- the id- Returns:
- the map
-
exportAll
Exports all processes as zip file.- Specified by:
exportAll
in interfaceHvlBpmnProcessService
- Parameters:
idList
- the id list- Returns:
- the byte [ ]
- Throws:
IOException
- the io exception
-
queryList
public List<HvlBpmnProcessModel> queryList(@NotNull @NotNull HvlBpmnProcessQueryModel processQueryModel) Query as list.- Specified by:
queryList
in interfaceHvlBpmnProcessService
- Parameters:
processQueryModel
- the process query model- Returns:
- the list
-
queryPage
public tr.com.havelsan.javarch.data.commons.pageable.HvlPage<HvlBpmnProcessModel> queryPage(@NotNull @NotNull HvlBpmnProcessQueryModel processQueryModel) Query as page.- Specified by:
queryPage
in interfaceHvlBpmnProcessService
- Parameters:
processQueryModel
- the process query model- Returns:
- the hvl page
-
queryCategoryList
public List<String> queryCategoryList(@NotBlank @Size(min=3,max=64) @NotBlank @Size(min=3,max=64) String namespace) Query as list.- Specified by:
queryCategoryList
in interfaceHvlBpmnProcessService
- Parameters:
namespace
- the namespace- Returns:
- the list
-
lock
Lock the process.- Specified by:
lock
in interfaceHvlBpmnProcessService
- Parameters:
id
- the id
-
unlock
Unlock the process.- Specified by:
unlock
in interfaceHvlBpmnProcessService
- Parameters:
id
- the id
-
isLocked
Check the process is locked.- Specified by:
isLocked
in interfaceHvlBpmnProcessService
- Parameters:
id
- the id- Returns:
- the boolean
-
upgradeVersion
public void upgradeVersion(@NotNull @NotNull String processDefinitionKey, byte[] upgradedProcessDefinitionXmlFile) Upgrade existing process definition.- Specified by:
upgradeVersion
in interfaceHvlBpmnProcessService
- Parameters:
processDefinitionKey
- the process definition keyupgradedProcessDefinitionXmlFile
- the upgraded process definition xml file
-
getProcessById
Gets process by id.- Specified by:
getProcessById
in interfaceHvlBpmnProcessService
- Parameters:
id
- the id- Returns:
- the process by id
-
getProcessByKey
Gets process by key.- Specified by:
getProcessByKey
in interfaceHvlBpmnProcessService
- Parameters:
key
- the key- Returns:
- the process model
-
isSystemProcess
Check the process is system process- Specified by:
isSystemProcess
in interfaceHvlBpmnProcessService
- Parameters:
processUuid
- the process uuid- Returns:
- the boolean
-
getProcessModelNode
public com.fasterxml.jackson.databind.node.ObjectNode getProcessModelNode(@NotNull @NotNull Long modelId) Gets process model node.- Specified by:
getProcessModelNode
in interfaceHvlBpmnProcessService
- Parameters:
modelId
- the model id- Returns:
- the process model node
-
saveProcessModelNode
@Transactional public void saveProcessModelNode(@NotNull @NotNull Long modelId, @NotEmpty @NotEmpty org.springframework.util.MultiValueMap<String, String> values) Saves process model node.- Specified by:
saveProcessModelNode
in interfaceHvlBpmnProcessService
- Parameters:
modelId
- the model idvalues
- the values
-
getNamespaceList
Gets namespace list.- Specified by:
getNamespaceList
in interfaceHvlBpmnProcessService
- Returns:
- the namespace list
-
isProcessDeploymentExist
Checks if there is any deployed process exists with given key.- Specified by:
isProcessDeploymentExist
in interfaceHvlBpmnProcessService
- Parameters:
key
- process definition key- Returns:
- boolean boolean
-
isProcessInstanceExist
public boolean isProcessInstanceExist(@NotBlank @NotBlank String key, @NotNull @NotNull Integer version) Checks if there is any process instance exists with given key and version- Specified by:
isProcessInstanceExist
in interfaceHvlBpmnProcessService
- Parameters:
key
- process definition keyversion
- process definition version- Returns:
- boolean boolean
-