294. WorkflowManager

Provides API for configuring workflows

294.1. Summary of Module Globals

List of Global Functions

  • AddWorkflow - Stores new workflow (if such workflow exists) into the Worflow Store.

  • CleanWorkflowsDirectory - Removes all xml and ycp files from directory where

  • DumpCurrentSettings - Returns the current settings used by WorkflowManager. This function is just for debugging purpose.

  • GetAdditionalFinishSteps - Returns list of additional inst_finish steps requested by additional workflows.

  • GetAllUsedControlFiles - Returns list of control-file names currently used

  • HaveAdditionalWorkflows - Returns whether some additional control files are currently in use.

  • MergeWorkflows - Function uses the Base Workflow as the initial one and merges all added workflow into that workflow.

  • PrepareProposals - Check all proposals, split those ones which have multiple modes or architectures or stages into multiple proposals.

  • PrepareSystemProposals - Check all proposals, split those ones which have multiple modes or architectures or stages into multiple proposals. Works with base product proposals.

  • PrepareSystemWorkflows - Check all workflows, split those ones which have multiple modes or architectures or stages into multiple worlflows. Works with base product workflows.

  • PrepareWorkflows - Check all workflows, split those ones which have multiple modes or architectures or stages into multiple workflows

  • RedrawWizardSteps - Redraws workflow steps. Function must be called when steps (or help for steps) are active. It doesn't work in case of active another dialog.

  • RemoveWorkflow - Removes workflow (if such workflow exists) from the Worflow Store. Alose removes the cached file but in the installation.

  • ResetWorkflow - Resets the Workflow (and proposals) to use the base workflow. It must be stored. Clears also all additional workflows.

  • SetAllUsedControlFiles - Sets list of control-file names to be used. ATTENTION: this is dangerous and should be used in rare cases only!

  • SetBaseWorkflow - Stores the current ProductControl settings as the initial settings. These settings are: workflows, proposals, inst_finish, and clone_modules.

  • SomeWorkflowsWereChanged - Returns whether some additional control files were added or removed from the last time MergeWorkflows() was called.

List of Global Variables

294.2. Global Functions

294.2.1. AddWorkflow

Stores new workflow (if such workflow exists) into the Worflow Store.

Function parameters

  • symbol type

  • integer src_id

  • string name

Return value

  • boolean - whether successful (true also in case of no workflow file)

Example 140. 

	AddWorkflow (`addon, 4, "");


294.2.2. CleanWorkflowsDirectory

Removes all xml and ycp files from directory where

Return value

  • void

294.2.3. DumpCurrentSettings

Returns the current settings used by WorkflowManager. This function is just for debugging purpose.

Return value

  • map <string, any> - of current settings

[
		"workflows" : ...
		"proposals" : ...
		"inst_finish" : ...
		"clone_modules" : ...
		"unmerged_changes" : ...
	];

294.2.4. GetAdditionalFinishSteps

Returns list of additional inst_finish steps requested by additional workflows.

Function parameters

  • string which_steps

Return value

  • list <string> - steps to be called ...see which_steps parameter

294.2.5. GetAllUsedControlFiles

Returns list of control-file names currently used

Return value

  • list <string> - files

294.2.6. HaveAdditionalWorkflows

Returns whether some additional control files are currently in use.

Return value

  • boolean - some additional control files are in use.

294.2.7. MergeWorkflows

Function uses the Base Workflow as the initial one and merges all added workflow into that workflow.

Return value

  • boolean - if successful

294.2.8. PrepareProposals

Check all proposals, split those ones which have multiple modes or architectures or stages into multiple proposals.

Function parameters

  • list <map> proposals

Return value

  • list <map> - updated proposals

	Input: [
		$["label":"Example", "name":"example","proposal_modules":["one","two"],"stage":"initial,firstboot"]
	]
	Output: [
		$["label":"Example", "name":"example","proposal_modules":["one","two"],"stage":"initial"]
		$["label":"Example", "name":"example","proposal_modules":["one","two"],"stage":"firstboot"]
	]

294.2.9. PrepareSystemProposals

Check all proposals, split those ones which have multiple modes or architectures or stages into multiple proposals. Works with base product proposals.

Return value

  • void

294.2.10. PrepareSystemWorkflows

Check all workflows, split those ones which have multiple modes or architectures or stages into multiple worlflows. Works with base product workflows.

Return value

  • void

294.2.11. PrepareWorkflows

Check all workflows, split those ones which have multiple modes or architectures or stages into multiple workflows

Function parameters

  • list <map> workflows

Return value

  • list <map> - updated workflows

294.2.12. RedrawWizardSteps

Redraws workflow steps. Function must be called when steps (or help for steps) are active. It doesn't work in case of active another dialog.

Return value

  • boolean

294.2.13. RemoveWorkflow

Removes workflow (if such workflow exists) from the Worflow Store. Alose removes the cached file but in the installation.

Function parameters

  • symbol type

  • integer src_id

  • string name

Return value

  • boolean - whether successful (true also in case of no workflow file)

Example 141. 

	RemoveWorkflow (`addon, 4, "");


294.2.14. ResetWorkflow

Resets the Workflow (and proposals) to use the base workflow. It must be stored. Clears also all additional workflows.

Return value

  • void

294.2.15. SetAllUsedControlFiles

Sets list of control-file names to be used. ATTENTION: this is dangerous and should be used in rare cases only!

Function parameters

  • list <string> new_list

Return value

  • void

Example 142. 

	SetAllUsedControlFiles (["/tmp/new_addon_control.xml", "/root/special_addon.xml"]);


294.2.16. SetBaseWorkflow

Stores the current ProductControl settings as the initial settings. These settings are: workflows, proposals, inst_finish, and clone_modules.

Function parameters

  • boolean force

Return value

  • void

294.2.17. SomeWorkflowsWereChanged

Returns whether some additional control files were added or removed from the last time MergeWorkflows() was called.

Return value

  • boolean - boolen see description

294.3. Global Variables

294.3.1. additional_finish_steps_before_chroot

Additional inst_finish settings defined by additional control files. They are always empty at the begining.

294.4. Module Requirements

294.4.1. Module Imports

  • Directory
  • FileUtils
  • Label
  • ProductControl
  • ProductFeatures
  • Report
  • Stage
  • String
  • Wizard
  • XML

294.4.2. Module Includes