Package io.jmix.stormbpmn.service
Interface StormbpmnService
- All Known Implementing Classes:
StormbpmnServiceImpl
public interface StormbpmnService
Service for working with Storm BPMN diagrams.
-
Method Summary
Modifier and TypeMethodDescriptiongetDiagramById(UUID id) Returns diagram by its ID.getDiagrams(int page) Returns diagrams for the specified page.intreloadDiagram(StormbpmnDiagram diagram) uploadDiagrams(Collection<StormbpmnDiagram> diagrams) Uploads diagrams to Storm BPMN.
-
Method Details
-
getDiagramsTotalCount
int getDiagramsTotalCount()- Returns:
- total count of diagrams in Storm BPMN or
-1if returned HTTP code status is not OK
-
getDiagrams
Returns diagrams for the specified page.- Parameters:
page- page number starts from 0- Returns:
- list of diagrams
- Throws:
IllegalArgumentException- if the page number is negative
-
getDiagramById
Returns diagram by its ID.- Parameters:
id- diagram ID- Returns:
- diagram or
nullif not found
-
reloadDiagram
- Parameters:
diagram- diagram to reload- Returns:
- reloaded diagram
- Throws:
IllegalStateException- if the diagram was not found with the given ID
-
uploadDiagrams
Uploads diagrams to Storm BPMN.Note, maximum available diagrams size for single request is
StormbpmnClient.DIAGRAMS_UPLOAD_BATCH_SIZE.- Parameters:
diagrams- diagrams to upload- Returns:
- result of upload operation
- Throws:
IllegalStateException- if diagrams number exceeds the limit
-