Skip to content

Commit

Permalink
fileContext added to dto (#10)
Browse files Browse the repository at this point in the history
* fileContext added to dto

* second method

* first method shortened
  • Loading branch information
martind260 authored Sep 1, 2022
1 parent 8c47bf5 commit 0b65b57
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,24 @@ public class StartProcessService {
*
* @param processKey key of the process
* @param payload Data to start the process
* @return
* @return the emit result
*/
public boolean startProcess(final String processKey, final Map<String, Object> payload) {
return startProcess(processKey, null, payload);
}

/**
* Starts a process with the given payload and file context.
*
* @param processKey key of the process
* @param fileContext file context for document storage
* @param payload Data to start the process
* @return the emit result
*/
public boolean startProcess(final String processKey, final String fileContext, final Map<String, Object> payload) {
final StartProcessEvent startProcessEvent = StartProcessEvent.builder()
.key(processKey)
.fileContext(fileContext)
.data(payload)
.build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ public interface StartProcess {
*/
String getKey();

/**
* Return the file context for document storage.
*/
String getFileContext();

/**
* Returns the data that is passed to the created process instance
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ public class StartProcessEvent implements StartProcess {
@NotBlank
private String key;

/**
* File context for document storage
*/
private String fileContext;

/**
* Data that is set
*/
Expand Down

0 comments on commit 0b65b57

Please sign in to comment.