The Event Process Life Cycle Management refers to deployment of an Event Process in various environments such as Development, Testing, Staging, and Production. Instead of creating different Event Processes for different environments, you can simply specify the properties for service instances comprising Event Processes for various environments in a single Event Process. Moreover, it is not required to configure on each instance of environment change, while you can load the existing configuration by just selecting the required environment.

Setting Properties of Service Instances for Different Environments

The default environment for a new Event Process will be 'development'. To configure a different environment, select the Target Environment in the Environment Properties tab of the Event Process comprising the service instance. Hereafter, the environment dependent service properties will be written to the corresponding env.xml file and will be picked up from that file when Event Process is launched in that particular environment. You can specify these properties for more than one environment by switching the Target Environment (property present in the Properties pane) of an event process.

Configuring service instances for different environments is made easy, since the configuration properties of the service instance in a new environment will be picked up from the previously configured environment when the CPS is opened. In this manner, service instances can have different set of properties while running on different environments.

Setting up the Event Process

A FileReader instance can be configured to read from a dev.txt file in a Development environment and from a prod.txt file in a Production environment.

To enable this, perform the following initial actions:

  1. Create an Event Process with name 'EPLCM_Example'. Then add a FileReader component from File category in Micro Service Palette and Display component from Util category. Now, connect the FileReader output port to Display input port.

    Icon

    Display component is to view the contents read by the FileReader component in different environments.



    Figure 1: EPLCM_Example event process with FileReader and Display components
     

  2. Create two text files in a preferred location (D:\EnvTest\data in this example) in your system with the following text (change the text as you need) in it:
    • dev.txt with text "Development content" for Development environment
    • prd.txt with text "Production content" for Production environment


      Figure 2: Text files dev.txt and prd.txt saved for different environments

Configuring Service Instance for Development Environment

To configure the FileReader component to read from dev.txt file in development environment, perform the following actions in the EPLCM_Example orchestrator:

  1. Double-click the FileReader component in the orchestrator to open its Configuration Property Sheet (CPS).
  2. In the Interaction Configurations panel, click the FileReader Configuration Ellipsis button.
  3. In the FileReaderConfig dialog box, provide the following details and then click OK:
    1. Compute Paths relative to Directory: Provide the absolute path for the files to be read from. By default, it points to the FIORANO_HOME directory. Change it to the path where you prefer to pick the files from ('D:\EnvTest' in this example) and give relative path in the Source, Working and Error Directories.
    2. File name: Name of the file from the data needs to be read from, that is, dev.txt (for the development environment).
    3. Source Directory: Name of the folder from which the files are to be read from, data folder in this example.
    4. Working Directory: Name of the directory/folder where intermediate processing needs to happen. (This property is visible only when Use Working Directory option is selected and hence it is optional).
    5. Error Directory: Name of the directory which should hold the files whose processing has not been successful.

      Icon
      • Provide absolute path in Source Directory, Working Directory and Error Directory, if Compute Paths relative to Directory does not carry the absolute path to the dev.txt file location.
      • Working Directory and Error Directory folders need not be created manually. FileReader creates it while processing the input message.
      • Select Is configured for different machine? checkbox if the Peer Server on which the component is to be launched and Fiorano Studio are running on different machines
      Icon
      • Configuration set in this instance can be saved with a name by providing a name under Named Configuration and can be used to read from the same file in a future instance. Refer the "From CPS of the component" section to understand how to save a Named Configuration in the CPS.


      Figure 3: FileReader configuration

  4. Click Next in the Interaction Configurations panel to navigate to Scheduler Configurations panel and perform the following actions:

    1. Select Enable Scheduling checkbox to fetch the data automatically (without the help of Feeder component) on every 10 seconds interval.

      Icon

      Data in the file can be amended on run time and the updated data will be fetched accordingly.

    2. Click Finish in the Interaction Configurations panel to close the CPS saving the FileReader configuration.


      Figure 4: Enabling Scheduling
       
    3. The input port will be eliminated from the FileReader component as scheduling is enabled.


      Figure 5: FileReader without input port after enabling scheduling
       
  5. By default, the configuration will be saved for development environment; Target Environment in the Environment Properties will be 'Development'. To check this, perform the following actions:
    1. Right-click anywhere (not on the components) in the Fiorano Orchestrator and click Properties from the right-click menu.


      Figure 6: Opening Properties panel
       
    2. In the Properties panel, click Environment Properties tab. You can see that the Target Environment is 'Development'.


      Figure 7: Navigating to Environment Properties tab

    3. Click the Click … to View value next to FileReaderConfiguration property and then click the ellipsis button to find the configuration set by following the above steps. Click Close to close the FileReaderConfiguration dialog box.

      Icon

      These properties cannot be edited from this view, but can only be edited from the CPS of the specific service instance and form the deployment tab of the service instance in the properties view.



      Figure 8: Checking FileReaderConfiguration in Environment Properties view

Configuring Service Instance for Production Environment

To configure the EPLCM_Example event process in Production environment, perform the following actions:

  1. In the Properties panel, select 'Production' from the Target Environment drop-down.


    Figure 9: Changing the environment to 'Production'
     
  2. Click Yes in Copy Missing configurations dialog box to copy the configurations set in Development environment previously.


    Figure 10: Option to copy or ignore the configuration set in the previous environment
     
  3. Configure the FileReader in production environment in the same manner as explained in "Configuring Service Instance for Development Environment" section above, but with the below change:
    Provide File Name as 'prod.txt' in FileReaderConfig dialog box in CPS. After closing the CPS, cross-check the configuration in Environment Properties and click Close to close the FileReaderConfiguration dialog box.


    Figure 11: Checking the configuration in Environment Properties view

Running the Event Process and Verifying Output

To run the EPLCM_Example event process, perform the following actions in the Orchestrator:

  1. In the Environment Properties tab in Properties panel, choose 'Development' option from the Target Environment drop-down.
  2. In the Copy missing configurations dialog box, click NO because the configurations need not be copied at this instance.
  3. Click Check Resource and Connectivity icon (or press ALT+SHIFT+C) to check resource and connectivity.
  4. Click Run Event Process icon (ALT+SHIFT+R) to run the event process; Display window gets opened.
  5. Display window shows the data read by the FileReader component from the dev.txt file, that is, the text "Development content" (as explained in the "Setting up the Event Process" section).


    Figure 12: FileReader Output in Development environment
     
  6. Click Stop Event Process icon to stop the execution happening in Development environment.
  7. Change the Target Environment to 'production' in Environment Properties tab.
  8. In the Copy missing configurations dialog box, click NO.
  9. Check resource and connectivity and run the process again.
  10. Display window shows the data read by the FileReader component from the prod.txt file, that is, the text "Production content".


    Figure 13: FileReader Output in Production environment
     

    Likewise, you can manage to switch between the Testing and Staging environments as well and switch between them to assume different configurations for a similar scenario.
    In the above example, you can change the content during runtime where the changed data will be fetched by the component and displayed in the Display window.
Icon

In scenarios where the environment specific configuration is defined in mapper, the environment value is available as a JMS property in the message and can be used to change resources based on Environment property.

Defining Named Configurations for different environments

Named configurations can be defined in two ways.

  1. Using Configuration Property Sheet (CPS) of the component.
  2. From Configuration Repository.

Setting up the Event Process

The two ways of saving named configurations are explained in the following sections using DB configuration as example. Two databases, Oracle and MySQL, are configured using two different methods and used alternatively while running the event process.

To do this, create an event process with name 'EPLCM_Naming' and add a DB component from DB category in Micro Service Palette to the Orchestrator.

Figure 14: Adding a DB component to EPLCM_Naming event process

From Configuration Repository

To save Named Configuration for MySQL database from Configuration Repository, perform the following actions:

  1. Open Configuration Repository panel by navigating through Window > Show View.
     
  2. In the Configuration Repository panel, right-click Resource and click Add Configuration.


    Figure 15: Navigating to add Naming Configuration
     
  3. In the Add New Configuration dialog box, provide the following values:
    1. Name: Provide a logical name. Provide the name 'MySQL_ConfigRepo' to represent the configuration done from Configuration Repository.
    2. Environment: Select your preferred environment from the options: Development, Testing, Staging, and Production. Select 'Development' for this example.
    3. Type: Choose the type of configuration from the Type drop-down list. Select DBConfigurations.


      Figure 16: Providing name for SQL configuration under Development environment
       
  4. Click Next to configure the details specific to the type of configuration (DBConfigurations in this case). After entering the details, click Finish to close the dialog box and thereby to save the Named Configuration 'MySQL_ConfigRepo'.


    Figure 17: Setting up SQL Configuration
     
  5. Check the presence of newly added Named Configuration in the Configuration Repository under Resource folder within the chosen environment, that is, 'Development'.


    Figure 18: MySQL database configuration named under Development environment

From CPS of the component

To define Named configuration from the Configuration Property Sheet of the component, perform the following actions:

  1. Double-click the DB component in the EPLCM_Naming orchestrator to open its CPS.
  2. Click the Database Configuration ellipsis button to open DbConfigurations Panel.
  3. In the DBConfigurations dialog box, provide values for Oracle DB Configuration under Component Configuration section and provide a name in the Named Configuration field to save it as a named configuration. For this example, provide the name 'Oracle_CPS' to represent the named configuration added using CPS.


    Figure 19: Naming Oracle Connection configuration
     
  4. Click OK in the DBConfigurations dialog box and click Save and Close in the Managed Connection Factory panel.
  5. Check the presence of newly added Named Configuration (Oracle_CPS) in the Configuration Repository under Resource folder within the chosen environment, that is, 'Development'.


    Figure 20: Oracle database configuration named under Development environment
     
  6. By default, the environment of the named configuration created will be same as the Event Process Target Environment, that is, 'Development'. When the environment of the Event Process is changed, named configurations will be automatically copied to the new target environment. So, change the Target Environment to 'Production'.
  7. In the Copy Missing Configuration dialog box that pops up, click Yes to copy the configurations from the previous environment, that is, copy the DBconfigurations named configuration from Development environment to Production environment.


    Figure 21: Changing the enviroment to 'Production'
     
  8. In the Configuration Repository panel, expand Production under Resource section to verify that the configurations from previous environment are copied to the new environment. The configuration can be seen in Environment Properties under Properties panel.


    Figure 22: Oracle Named Configuration copied to Production environment

Using Named Configuration to work with DB component

Configure the DB component with Oracle database using Oracle_CPS in Production Environment and configure it with SQL database using MySQL_ConfigRepo in Development Environment by performing the following actions:

  1. In the Production environment, open DB CPS and go to Database Configurations section.
  2. 'Oracle_CPS' will be available in the Named Configurations drop-down as it is configured in the above section. Choose this Named Configuration.
  3. Click OK, go to the next screen by clicking Next and configure your preferred query (Configure select query named SelectQueryOracle in Scheduler mode to fetch data automatically) in SQL Configuration section, and then click Finish.


    Figure 23: Configuring Select query in Oracle database under Production Environment
     
  4. Click Finish in the Interaction Configurations panel to close the CPS and save the configuration.
  5. Verify the Database Configuration in the DB component under Production environment by going to DBConfigurations under Environment Properties in Properties panel.
    You can see that the input port is disappeared from the DB component as Scheduler mode is selected during SQL Configuration and hence external input is not required.


    Figure 24: Verifying Oracle DB configuration in Environment Properties view
     
  6. Change the Target Environment to 'Development'. In the Copy missing configurations dialog box, click NO because the configurations need not be copied at this instance.
  7. In the Development environment, open the DB CPS and go to Database Configurations section.
  8. 'MySQL_ConfigRepo' will be available in Named Configurations drop-down as it is configured in the "From Configuration Repository" section. Choose this Named Configuration.


    Figure 25: Selecting the Named Configuration for MySQL configured from Configuration Repository
     
  9. Click OK, go to the next screen by clicking Next and configure your preferred query in SQL Configuration section (Configure select query named SelectQuerySQL in Scheduler mode to fetch data automatically), and then click Finish.


    Figure 26: Configuring Select query in MySQL database under Development Environment
     
  10. Click Finish in the Interaction Configurations panel to close the CPS and save the configuration.
  11. Go to Environment Properties and cross-check the configuration present under Development environment by opening DBConfigurations dialog box.


    Figure 27: Verifying MySQL DB configuration in Environment Properties view

Running Event Process and Verifying Output

While event Process is running in Development environment, it connects to MySQL DB and while running in Production environment, it connects to Oracle DB.

To run the EPLCM_Naming event process, perform the following actions in the Orchestrator:

  1. In the Environment Properties tab in Properties panel, choose 'Development' option from the Target Environment drop-down.
  2. In the Copy missing configurations dialog box, click NO because the configurations need not be copied at this instance.
  3. Click Check Resource and Connectivity icon (or press ALT+SHIFT+C) to check resource and connectivity.
  4. Click Run Event Process icon (ALT+SHIFT+R) to run the event process; Display window gets opened.
  5. Display window shows the data selected from the SQL database by the help of 'SelectQuerySQL' query configured in the Development environment.


    Figure 28: Output from MySQL DB in Development environment
     
  6. Click Stop Event Process icon to stop the execution happening in Development environment.
  7. Change the Target Environment to 'production' in Environment Properties tab.
  8. In the Copy missing configurations dialog box, click NO.
  9. Check resource and connectivity and run the process again.
  10. Display window shows the data selected from the Oracle database by the help of 'SelectQueryOracle' query configured in the Development environment.


    Figure 29: Output from Oracle DB in Production environment

    Likewise, you can manage Naming Configuration for Testing and Staging environments as well and switch between them to assume different configurations for similar scenario.
    In the above example, you can amend the table contents during runtime where the amended data will be fetched by the component and displayed in the Display window.

 

Adaptavist ThemeBuilder EngineAtlassian Confluence