Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages


home | help


       Base class for OpenXPKI Activities. Deriving from this class is
       mandatory if you	use the	extended flow control features.

   Configuration parameters
       To use the flow control features, you can set several parameters	in the
       workflow	configuration. The retry params	can be set in either the
       activity	or in the state	block. If both are given, those	in the state
       block are superior. The autofail	parameter is allowed only in the state

	   Integer value, how many times the system will redo the action after
	   pause is called.  If	the given value	is exceeded, the action	stops
	   with	an error state.

       retry_interval (default 5 minutes)
	   The amount of time to sleep after pause is called, before a new
	   retry is done.  The value needs to be parsable as a relative
	   OpenXPKI DateTime string.  Note that	this is	a minimum amount of
	   time	that needs to elapse, after which the watchdog is allowed to
	   pick	up the job. Depending on your load and watchdog	settings, the
	   actual time can be much greater!

       retry_random (optional)
	   Integer value, interpreted as percentage value (e.g.	25 = 25%),
	   spreads the wakeup time by the given	percentage. E.g. the
	   retry_interval is 20	Minutes	and the	random_factor is 25%, the next
	   wakeup is scheduled between 15 and 25 minutes.

	   If set to "yes", the	workflow is moved directly to the FAILURE
	   state and set to finished in	case of	an error. This also affects a
	   retry_exceeded situation!

       Is called during	the creation of	the activity class.  Sets
       $self->{PKI_REALM} to CTX('session')->data->pki_realm

       Sets $self->workflow() as a reference to	the current workflow.

       immediately ends	the execution of current action. this is achieved via
       throwing	an exception of	class OpenXPKI::Server::Workflow::Pause.
       before that, $self->workflow()->pause() will be called, which stores
       away all	necessary informations.

       returns the number of max allowed retries (normally defined in xml-
       config).	default: 0

       sets the	number of max allowed retries

       returns the retry interval (relative OpenXPKI DateTime String, normally
       defined in xml-config). default:	"+0000000005"

       sets the	retry interval (relative OpenXPKI DateTime String e.g.

       returns the reap_at interval (relative OpenXPKI DateTime	String).
       default:	"+0000000005"

       sets the	reap_at	interval (relative OpenXPKI DateTime String, e.g.

       Return the value	of the retry counter.

       Hook method. Will be called if Workflow::execute_action() is called
       after proc-state	"pause". The current workflow is given as argument.

       NOTE The	hook methods are executed on a dedicated instance of the
       action class so you can NOT share data with the execute method via
       $self, use the workflow context object to share data if needed.

       Hook method. Will be called if Workflow::execute_action() is called
       after proc-state	"exception" or "retry_exceeded".  The current workflow
       is given	as first argument, the process state to	recover	from as

       Hook method. Will be called if Workflow::execute_action() is called
       with an proc-state which	is not appropriate (e.g. "finished" or
       "running")  The current workflow	is given as argument.

       Helper to retrieve a config path	from the parameter or autocreate from
       interface/server. Expects the name of the node inside the server	config
       that should be used as fallback (single item as string or nested	path
       as arrayref), if	config_path is not explicitly set in the action

Parameter mapping
       Parameters in the yaml configuration of the activity that start with
       _map_ are parsed	using template toolkit and imported into the namespace
       of the action class.

       The prefix is stripped and the param is set to the result of the
       evaluation, the value is	interpreted as template	and filled with	the

	   class: .....
	   _map_my_tt_param: my_prefix_[% context.my_context_key %]

       If you just need	a single context value,	the dollar sign	is a shortcut:

	   class: .....
	   _map_my_simple_param: $my_context_key

       The shortcut syntax also	supports retrieval of subkeys from nested

	   class: .....
	   _map_my_simple_param: $my_context_key.key_in_hash

       The values are accessible via the $self->param call using the basename.

       Activity	configuration example

       If "my_context_key" has a value of foo in the context, this

	   class: .....
	   _map_my_simple_param: $my_context_key
	   _map_my_tt_param: my_prefix_[% context.my_context_key %]

       Is the same as:

	   class: .....
	   my_simple_param: foo
	   my_tt_param:	my_prefix_foo

       Note that the square bracket is a special char in YAML, if you place it
       at the beginning	of the string, you must	put double quotes around, e.g.

	   _map_my_tt_param: "[% context.my_context_key	%]"

perl v5.32.0			  2020-OpenXPKI::Server::Workflow::Activity(3)

Name | Description | Functions | Parameter mapping

Want to link to this manual page? Use this URL:

home | help