- How to?
- Creating an action plan
- Describing an action plan
- Actions that can be used in an action plan
- Characteristics of the actions
- Action with parameters
- Managing the failures and errors
- Specific action: Running an action plan
- WLanguage events associated with an action plan
- Testing an action plan
The action plans group all actions that will be performed by the software factory. An editor of action plans is used to easily define these actions. It is used to automatically define the sequence of actions to perform. Action plans are created from WINDEV, WEBDEV or WINDEV Mobile.
Creating an action plan
To create an action plan:
- Open the project for which an action plan must be created.
Remark: An action plan is not necessarily linked to a project as it can be used by several projects. However, a project must be used to create an action plan. You also have the ability to create an "Action plan" project.
- Click in the quick access buttons.
- The new element window appears: click "Automation" then "Action plan".
- The wizard for creating a project configuration is automatically started on the current project.
- In the wizard, specify:
- the name and description of the action plan.
- the elements included in the action plan. In most cases, no element must be included in the action plan. This plan allows you to include elements used by a specific action of the action plan (procedure used by a WLanguage action for example).
- Validate the creation of project configuration.
- A default action plan is generated and it is displayed in the editor of action plans.
- Save the action plan (Ctrl + S). The action plan corresponds to a file with a "wpa" extension. The action plan is displayed in the project explorer.
Describing an action plan
The editor of action plans is as follows:
1: Name of the action plan. The "Description" option of the popup menu is used to:
- modify the name of the action plan.
- specify the parameters of the action plan.
: List of actions that can be performed by the action plan. To add an action to the action plan, all you have to do is "drop" an action into the list of actions of the plan. The action will be included at the location hovered by the mouse cursor when the action is dropped.
The popup menu of the action is used to:
- Display the description window of the action. This window is used to specify the necessary parameters (the name of the project to open for example) and to manage the errors and the persons affected by the status report.
- Move up, move down or delete the action.
: List of actions in the action plan. 4
: Action performed if an error occurs. This operating mode was configured in the configuration window of the action.
Actions that can be used in an action plan
The following is a non-exhaustive list of actions that can be executed in an action plan:
- Open WINDEV, WEBDEV, WINDEV Mobile.
- Close WINDEV, WEBDEV, WINDEV Mobile.
- Open a project from the SCM.
- Open a project on the disk.
- Close the project.
- Update components.
- Update templates.
- Update styles.
- Update skins.
- Relocate components.
- Select a configuration.
- Generate a configuration.
- Multiple generation.
- Generate help about new features.
- Compile help.
- Create the setup.
- WDMSG extraction.
- WDMSG reintegration.
- Update SCM repository.
- Check out from the SCM.
- Check in from the SCM.
- Cancel check-out from the SCM.
- Label SCM.
- Check-out from SCM for test.
- Cancel check-out from SCM for test.
- Search in SCM history.
- Start audits.
- Run automated tests.
- Specify command line for testing.
- Recompile project.
- Update project.
- Enable / Disable UI errors, warnings, messages.
- Enable / Disable Reports & Queries.
- Enable / Disable code style.
- Show / Hide code prefixes.
- Enable / Disable spelling audit.
- Define name of the file to be generated.
- Define version number.
- Enable / Disable version number increment.
- Define Copyright.
- Define Splash screen.
- Generate a component's documentation.
- Define compatible version number.
- Define Android SDK path.
- Define Android signature.
- Emit a sound.
- Copy a file or directory.
- Burn a CD.
- Delete a directory.
- Open all elements.
- Close all elements.
- Add a file to the project.
- Send an email.
- Delete unused items in the analysis.
- Save and generate the analysis.
- Reset the version number of the analysis.
New in version 28
Migrate a project.
New in version 28
Deploy to a Private Store.
New in version 28
Open a project in Git.
New in version 28
Generate the technical documentation.
Characteristics of the actions
Action with parameters
An action may require parameters. For example, the action called "Open a project from SCM" requires the name of the project to open.
The definition of these parameters is performed in the "General" tab of the description window of the action ("Description" in the context menu of the action).
The parameters can be defined:
- As a "fixed" value: the value is specified in the action plan directly.
- As parameters passed during the execution of the action plan.
This parameter will be required to run the action plan.
For the name of the project to open, it must be specified as parameter by the developer.
Tip: If possible, the parameters should be defined when creating the action plans in order for these action plans to be re-used for different projects.
Managing the failures and errors
Important point of the action plan: defining the behavior if the action fails. Simple example: what to do when updating a window that is checked out in exclusive mode by a developer.
The management mode of errors that is the most consistent with the action is selected by default. You also have the ability to customize it. Let's take a look at the possible management modes of errors:
- Stop the execution of the action plan and save the error in the status report.
This management mode should be reserved for the major errors, a project that fails to open for example...: there is no need to try to continue.
- Run the custom error process of the action plan.
This management mode allows you to manage a specific error mechanism. For example, send an SMS if an error occurs.
- Save the error in the status report and continue the execution.
This management mode allows you to continue the execution of the action plan even if an error occurs.
For example, if a component is not updated (offline server, etc.), the action plan can continue.
- Save for information but do not generate any error.
For example, when the audit detects that unused files are found in the project directory, this is not an error but it may be important to have this information.
If the action fails, you have the ability to select one or more persons to inform ("Message" tab of the description window of the action).
In any case, the owner of the action plan is informed of the execution result (success or failure).
Tip: To get all the potential errors of a project, you have the ability to use the "Save the error in the status report and continue" mode and a specific action: "Stop the execution if an error occurs". For example, if the synchronization of the templates is not performed, the error is saved and the action plan continues to run. In the rest of the action plan, if the recompilation detects some UI errors, these errors will be stored. Therefore, all the project errors are found in a single execution of the action plan.
Special case: Executing a procedure in an action plan:
Depending on the result of the procedure, the action plan must be interrupted. The following code must be used in the WLanguage procedure:
IF bRes = False THEN
sErrorMessage is string = "Error in XXX function" + CR + ...
Specific action: Running an action plan
You can run an action plan from another action plan.
This action may be useful to share the operations common to the WINDEV, WEBDEV and WINDEV Mobile projects.
For example, a specific action plan can be used to start WINDEV, WEBDEV or WINDEV Mobile according to a parameter. The useless actions can be disabled by apDisableAction
In this case:
- The action plan contains the 3 startups of the products.
- The initialization code of the action plan is as follows:
CASE ~= "WD"
// We don't want to start WEBDEV or WINDEV Mobile
CASE ~= "WB"
// We don't want to start WINDEV or WINDEV Mobile
CASE ~= "WM"
// We don't want to start WINDEV or WEBDEV
ExceptionThrow(1, "This type of project is not associated with a product")
WLanguage events associated with an action plan
Two events associated with an action plan:
|Initialization of action plan||Run before the execution of action plan.|
|End of action plan||Run after the execution of action plan.|
WINDEV allows you to perform a "Go" of an action plan in order to check its operating mode locally, especially the custom actions containing WLanguage code.
This page is also available for…