Created
February 7, 2019 11:59
-
-
Save l0co/7e6c5ad1f557db38222ba75bd3ae5596 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| abstract class BaseProcessTest { | |
| fun startProcess(variables: Map<String, Any> = mapOf()): ProcessAssertions { | |
| logger.debug("Starting process: ${processName()}") | |
| val processTestEnvironment = ProcessTestEnvironment() | |
| runtimeService.addEventListener(processTestEnvironment) | |
| try { | |
| runtimeService.startProcessInstanceByKey(processName(), variables) | |
| } catch(e: Throwable) { | |
| processTestEnvironment.exception = e | |
| } finally { | |
| runtimeService.removeEventListener(processTestEnvironment) | |
| } | |
| return ProcessAssertions(processTestEnvironment) | |
| } | |
| // [...] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment