Action Life Cycle: Plugin Scope
You can control the visibility of all the available JEF plugins you have created in Ooyala Flex Enterprise. You can decide whether or not an ActionExecutor plugin is available to Ooyala Flex users.
This can be achieved using the following Java annotation:
@Component @Scope("prototype") @Slf4j @PluginScope(value = PluginScopeType.DEVELOPMENT)@ActionPlugin(uuid = "3ab237d4-0b19-4f01-8ded-396ee5444284", type = "smoke", plugin = "async-smoke-action", version = "1.0.2", actionConfiguration = AsyncSmokeActionConfiguration.class)public class AsyncSmokeActionExecutor extends ActionExecutor<AsyncSmokeActionConfiguration>
This annotation defines the level of visibility Enterprise is configured to show for each action.
A standard life cycle of a JEF action plugin could be as follows:
- Developers are free to change to any state in any release.
- It is recommended that only the ActionPlugin.version string is changed when altering the PluginScopeType, keeping the same ActionPlugin.uuid number.
- Enterprise always takes the latest version of an action plugin from the previously deployed action definitions (comparing the version as a string).
- Any action plugin that has been configured as “Obsolete” will not execute in JEF. These plugins will be visible in Ooyala Flex Enterprise if the level is configured, however they will not run successfully.
How Does Enterprise Use the ScopePlugin Configured Visibility?
A pluginScope variable present in consul properties (/flex/shared/flex-enterprise/jef/pluginScope) is used to define the level configured for the site.
- Release Level: The “Release" level hides all actions that are: in development, obsolete, or deprecated. However, those that are released will be shown.
- Development Level: The “Development” level hides all actions that are obsolete or deprecated, but shows those in development and those that are released.
- Deprecated Level: The “Deprecated” level hides all actions that are obsolete, but shows those that are deprecated, in development, and released.
- Obsolete Level: The “Obsolete” level will show all. Please keep in mind that obsolete actions cannot execute.
Each time a new version of an action plugin is deployed to Ooyala Flex Enterprise, the visibility scope is automatically updated. There is no need to restart Ooyala Flex Enterprise.
Tip:If you remove a previously existing plugin from Ooyala Flex Enterprise without deploying it as “Obsolete" first (Example: it is removed when a previous version was in a ‘released’ state), Ooyala Flex Enterprise will still show the plugin in the list of available options in the UI. It is important take into account that the plugin will not run successfully and the ActionExecutor will not be available to execute the job. For such a scenario, it is recommended that developers deploy at least one plugin in an “Obsolete” state.