Adaptable Workflow

class AdaptableWorkflow(api)

Bases: _WorkflowBase

create(name, parent_folder, stage, powershell_script_name, powershell_script_content, approvers=None, reason_code=None, use_approvers_from_powershell_script=False, attributes=None, get_if_already_exists=True)

Note

If a list of approver identity objects is provided, they will be added directly to the workflow as approvers of the workflow. If the approvers should come from the PowerShell script, do not supply this parameter. Instead, set use_approvers_from_powershell_script = True. If the approvers should come from the object requiring the workflow, such as the certificate object, then do not supply approvers or use_approvers_from_powershell_script.

Parameters
  • name (str) – Name of the workflow object.

  • parent_folder (Union[config.Object, str]) – Config Object or Distinguished Name (DN) of the parent folder.

  • stage (int) – One of the valid stages that represent the certificate lifecycle.

  • powershell_script_name (str) – Name (not path) of the actual PowerShell script on the TPP server.

  • powershell_script_content (bytes) – Contents of the PowerShell script as bytes.

  • approvers (List[Union[ident.Identity, str]]) – List of Identity Object or Prefixed Name for each approver.

  • reason_code (int) – Integer reason code.

  • use_approvers_from_powershell_script (bool) – If True and no approvers is supplied, then set the workflow to use the approvers defined by the script.

  • attributes (dict) – Additional attributes to apply to the workflow object.

  • get_if_already_exists (bool) – If the objects already exists, it is modified according to these parameters. Else and exception is raised..

Returns

Config Object of the workflow object.

delete(workflow)

Deletes a workflow.

Parameters

workflow (Union[config.Object, str]) – Config Object or Distinguished Name (DN) of the workflow object.

get(workflow_dn, raise_error_if_not_exists=True)

Returns the config object of the folder DN.

Parameters
Returns

Config Object of the workflow object.