Skip to content

Commit

Permalink
(PROC-21233) Added possibility to define initial assignees during sta…
Browse files Browse the repository at this point in the history
…rting an approval process (#52)
  • Loading branch information
ivouchak-sc committed Mar 31, 2022
1 parent e845823 commit 2d63443
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,10 @@ class ProcessManagerService implements InitializingBean {
}
}

def startProcess(def processTypeID, def user, def variables) {
startProcess(processTypeID, user, variables, null)
}

/**
* Starting process execution
*
Expand All @@ -251,7 +255,7 @@ class ProcessManagerService implements InitializingBean {
*
* @return process ID value if process was started successfully
*/
public def startProcess(def processTypeID, def user, def variables) {
public def startProcess(def processTypeID, def user, def variables, Map<String, List<String>> assignees) {
// check processTypeID in supportedProcessTypes
if (!processFactory.getProcessTypes().contains(processTypeID)) {
log.error("Cannot start process of type '${processTypeID}'. Type is not supported.")
Expand Down Expand Up @@ -309,7 +313,7 @@ class ProcessManagerService implements InitializingBean {
// create process variables
defineVariables(basicProcess, process)

updateProcessAssignees(basicProcess, processAssignees)
updateProcessAssignees(basicProcess, assignees ?: processAssignees)

BasicProcess.withTransaction {status->
basicProcess.addToNodes(startNode)
Expand Down

0 comments on commit 2d63443

Please sign in to comment.