Workflow Creation (ADF)

At the completion of this section, you will:

  • understand the use of workflows in the deployment process
  • be able to create/modify a build workflow
  • be able to create/modify a deploy workflow

A workflow is an orchestration of configurable steps that define a process and determine how the deployment process will execute.  Workflows are created once and then configured on multiple projects to define the execution for that project.

There are several types of workflows that can be created (only build and deploy will be used in this tutorial) :

build

Utilized for building a project.  Building a project requires retrieving the application code from the GIT repository using the cloneProjectSources operation of the installed GIT plugin and compiling and creating an ADF artifact using the applicationBuild operation of the installed JDeveloper plugin.  The cloneProjectSources operation allows the GIT repository information for the application to be defined once on the project and then retrieved from the project on execution.

deploy

Utilized for deploying a project.  Deploying a project requires retrieving the ADF artifact created by the build workflow and deploying the artifact using the deploy operation of the installed Weblogic plugin.

The workflows provide a consistent, repeatable and re-usable process that will be utilized for every ADF application.

Create Build Workflow

Now that we have a general understanding of why we need a build and deploy workflow, we can start to define the build workflow.  Select Workflows from the main menu or from the Home page.  Workflows are versioned and there is always a single active version that can be executed, this allows changes to be staged until ready to be activated.  Select the + to create a new workflow.



The workflow details screen will allow for the configuration of the build workflow. 

  1. Providing the workflow with a functional name will help find the correct workflow when the project is being created in a later section of the tutorial.
  2. Select Build as the Workflow Type
  3. The Workflow Group and Workflow Subgroup are organizational folders for the workflows and the values are completely controlled by the workflow developer, so use functional names that will help find the correct workflow easier.

Save the Main configuration and the Definition tab will activate.  The Definition is where the orchestration steps for the build will be configured.  Configuration is accomplished by dragging the appropriate components from the Workflow Operations and/or the Plugin Operations pane into the center pane between the start arrow and end block (a drop zone will appear as you get close).  There are several other features such an Workflow Inputs and Workflow Variables that will not be used in this tutorial.

Configure the GIT cloneProjectSources operation by adding it to the center pane and the plugin will open for additional configuration.  Since this is the cloneProjectSources operation, there is no configuration required and all composite based information will be retrieved from the project.  Select OK.  Clicking on any component in the workflow will open up the configuration screen for that component, if a change is needed.

GIT was chosen as the Source Code Management tool for this tutorial, however, FlexDeploy supports many other  Source Code Management tools and any one can be used in place of GIT.


Configure the JDeveloper applicationBuild operation by adding it to the center pane and the plugin will open for additional configuration.  Once again, the applicationBuild operation requires no additional configuration.  The applicationBuild operation knows where the application code was cloned, so the developer doesn't have to worry about the details.  At the successful completion of the applicationBuild operation, an EAR file will be generated as an artifact and will automatically be pulled back to the artifact repository.  Select OK.

The plugins are intelligent and eliminate as much development work as possible from the developers.  Once the components are added, the workflow needs to be saved and/or activated.  Saving the workflow changes will only save the current configuration to the database and is used when the developer may not be quite ready to activate these changes.  When the developer wants the changes to be executed by projects, the Activate button must be selected.  Once the current version of the workflow is activated, the workflow will be marked as read-only and have a green check mark next to it.  Active versions can't be modified and require the developer to select Make Copy.  This will create a new version and open that version up for editing, while the active version will not be changed.

Create Deploy Workflow

Create a new workflow for the deploy by selecting the +.  The workflow details screen will allow for the configuration of the deploy workflow.

  1. Providing the workflow with a functional name will help find the correct workflow when the project is being created in a later section of the tutorial.
  2. Selecting Deploy for the Workflow type.
  3. The Workflow Group and Workflow Subgroup are organizational folders for the workflows and the values are completely controlled by the workflow developer, so use functional names that will help find the correct workflow easier.

Configure the Weblogic undeploy operation by adding it to the center pane and the plugin will open for additional configuration.  There is no additional configuration information required on the undeploy operation.  It is a best practice to undeploy the existing application EAR file before deploying a new version of the EAR file to the server.

Now that we have undeployed the existing version of the application, we need to configure the Weblogic deploy operation by adding it to the center pane and the plugin will open for additional configuration.  There is no additional configuration information required on the deploy operation.

The deploy operation will automatically have the artifact generated by the build workflow available. Select OK and Activate the workflow.

Now that we have deployed the new version of the application,  we need to bounce the server by adding the Weblogic managedWeblogicStop operation to the center pane and the plugin will open for additional configuration.  There is no additional configuration information required on the managedWeblogicStop operation.

Now that we have stopped the server,  we need to start the server by adding the Weblogic managedWeblogicStart operation to the center pane and the plugin will open for additional configuration.  There is no additional configuration information required on the managedWeblogicStart operation.

The following macros are not currently supported in the footer:
  • style