If you want to process steps in an external application, this can be achieved using the REST API, for example. In this case, it is often necessary to react to step events. The following options are available here.
Actions after successfully sending the step
If a step is sent successfully, you can use a GET parameter to influence which actions are executed after sending:
Action |
Description |
|---|---|
close |
Closes the window in which the step dialog was opened. |
reloadParent |
Closes the window in which the step dialog was opened and also reloads the parent window. |
postMessage |
Closes the window in which the step dialog was opened and sends a message to the parent window. The browser-internal JavaScript function postMessage is used to ensure secure communication. Message structure {
Possible action values: •jobrouter-step-send •jobrouter-step-save •jobrouter-step-assign •jobrouter-step-request •jobrouter-step-answer •jobrouter-step-resubmission •jobrouter-step-abort •jobrouter-step-finish •jobrouter-step-jumpTo •jobrouter-step-back |
Examples
Link |
Result |
|---|---|
https://jobrouter-example.com/jobrouter/index.php?cmd=...&jr_after_send=close |
Step window is closed. |
https://jobrouter-example.com/jobrouter/index.php?cmd=...&jr_after_send=reloadParent |
Step window is closed, main window is reloaded. |
https://jobrouter-example.com/jobrouter/index.php?cmd=...&jr_after_send=postMessage |
Step window is closed, a message is sent to the parent. This can be treated in this way, for example:
window.addEventListener("message", handleMessage); |
Please note: For process instances started with the "Allow external process initiation" option, the specified action is executed immediately. If you want to display information, this can be done using the postMessage option.