|
|
| |
OpenXPKI::Server::API2::Plugin::Workflow::wakeup_resume_workflow(3) |
User Contributed Perl Documentation |
OpenXPKI::Server::API2::Plugin::Workflow::wakeup_resume_workflow(3) |
OpenXPKI::Server::API2::Plugin::Workflow::wakeup_resume_workflow
Wakes up a workflow in "PAUSE" state.
Reads the last action from the history and reruns it. This method
is also used by the watchdog.
By default, the workflow is executed "inline", all
actions are handled and the method returns a HashRef with the UI
control structure of the new workflow state. Use parameters
"async" and/or
"wait" for "background"
execution using a newly spawned process (see below).
Parameters
- "id" Int - workflow ID.
Required.
- "type" Str - workflow type,
specifying it will prevent another config lookup. Optional.
- "async" Bool -
"background" execution (asynchronously): forks a new process.
Optional.
Return HashRef contains the UI control structure of the
OLD workflow state.
- "wait" Bool - wait for background
execution to start (monitors the database, max. 15 seconds). Optional.
Return HashRef contains the UI control structure of the
current state of the running workflow. Please note that this might be
the next step or any following step as this depends on random timing,
i.e. when the monitoring loop happens to check the database again.
Changes compared to API v1:
- 1. Parameter "WORKFLOW" was renamed to "type"
- 2. String parameter "ASYNC" was split into two boolean
parameters "async" and "wait":
-
CTX('api') ->wakeup_workflow(.. ASYNC => "fork") # old API
CTX('api2')->wakeup_workflow(.. async => 1) # new API
CTX('api') ->wakeup_workflow(.. ASYNC => "watch") # old API
CTX('api2')->wakeup_workflow(.. async => 1, wait => 1) # new API
Resumes a workflow that is in exception state.
For details see similar command "wakeup_workflow"
Addtional parameter force can be used to resume a workflow
from running state. Do so only after doublechecking that the workflow
is really not running on any node of your cluster. YOU HAVE BEEN WARNED!
Changes compared to API v1:
- 1. Unused parameter "WORKFLOW" was removed
- 2. String parameter "ASYNC" was split into two boolean
parameters "async" and "wait":
-
CTX('api') ->wakeup_workflow(.. ASYNC => "fork") # old API
CTX('api2')->wakeup_workflow(.. async => 1) # new API
CTX('api') ->wakeup_workflow(.. ASYNC => "watch") # old API
CTX('api2')->wakeup_workflow(.. async => 1, wait => 1) # new API
Does the work for resume and wakeup, pulls the last action from the history and
executes it.
Parameters
- $wakeup_mode Bool - 0 = resume workflows, 1
= wakeup paused workflows
- $id Int - workflow ID. Required.
- $async Bool - execute the workflow
asynchronously, i.e. in a new process.
- $wait Bool - only if
$async is set: wait until there are any status
changes in the background (monitors the database).
Visit the GSP FreeBSD Man Page Interface. Output converted with ManDoc. |