In the 12.2.1.3.0 release of WebLogic Server, ZDT Patching offers a cool new feature that allows you to extend the logic of your existing patching workflows by adding user-defined scripts that can be “hooked” at predefined locations (known as extension points). These user-defined scripts, known as extensions, are executed in conjunction with the workflow.

With the custom hooks feature, you can have your workflow perform any additional task that is specific to a business need but is not appropriate to include in the base patching workflow. You can add checks on each node in the workflow to ensure that there is enough disk space for the rollout of Oracle home, or have your workflow perform admin tasks such as deploy or redeploy any additional applications, or define custom logic to send out email notifications about the status of the upgrade, and so on.

This feature provides seven extension points for multitenant and non-multitenant workflows where you can insert your custom scripts and resources. Implement custom hooks to modify any patching workflow in five simple steps:

  1. From the list of available predefined extension points, determine the point in the workflow where you want to implement the extension (which is nothing, but your extended logic). Extension points are available at different stages of the workflow. For instance, ep_OnlineBeforeUpdate can be used to execute any logic before the patching operation starts on each node. This is typically the point where prerequisite checks can be performed. You can find the complete list of extension points available for multitenant and non-multitenant workflows at About Extension Points in the Administering Zero Downtime Patching Workflows guide.

  2. Create extension scripts to define your custom logic. The scripts can be UNIX-specific shell scripts or Window-specific batch scripts. Optionally, your scripts can use the predefined environment variables that this feature provides.

  3. Specify the extensions in the extensionConfiguration.json file. However, this feature allows more than one way of specifying extensions to give you the flexibility to override or customize parameters at different levels. Learn more about these options at Specifying Extensions to Modify the Workflow in the Administering Zero Downtime Patching Workflows guide.

  4. Once you have created the extensionConfiguration.json file and defined your custom logic in extension scripts, you must package them into a JAR file that has a specific directory structure. You can find the directory structure of the extension JAR file in our docs. At this point, you must remember to place the extension JAR on all nodes similar to how you place the patched Oracle home on all nodes before the rollout.

  5. Configure the workflow using either WLST or the WebLogic Server Administration Console, and specify the name of the JAR file that you created for the update.

You will find complete details about available extension points and how to use the custom hooks feature in Modifying Workflows Using Custom Hooks in the Administering Zero Downtime Patching Workflows guide.