Search Results

Modularity Among Applications with a Shared Module Project

This sample shows how modularity can be achieved among two application module projects and a shared module project.

Two scenarios in this sample show how a process in a shared module can be used by other application modules, without requiring changes to the contents of the shared module. The scenarios are demonstrated in the following projects:

Application Module Projects

  • tibco_bw_sample_core_modularity_appswithsharedmodule_app_timereventcomponent_application
  • tibco_bw_sample_core_modularity_appswithsharedmodule_app_helloworldconsumer_application

Shared Module Project

  • tibco_bw_sample_core_modularity_appswithsharedmodule_sharedmodule

Scenario 1

  1. In the samples directory in File Explorer view, expand core > modularity > AppsWithSharedModule and double-click the following one at a time to expand them in the Project Explorer:
    • tibco_bw_sample_core_modularity_appswithsharedmodule_sharedmodule.zip
    • tibco_bw_sample_core_modularity_appswithsharedmodule_app_helloworldconsumer.zip

    See Accessing Samples for more information.

  2. In Project Explorer, expand the tibco_bw_sample_core_modularity_appswithsharedmodule_app_helloworldconsumer.
  3. Fully expand the Processes directory and double-click MainProcess.bwp to open it in the Process Editor pane.
  4. Click Run > Debug Configurations.
  5. At the left hand tree of Debug Configuration wizard, expand BusinessWorks Application and select BWApplication
  6. Click the Applications tab and then click the Deselect All button if you have multiple applications. Select the check box next to tibco_bw_sample_core_modularity_appswithsharedmodule_app_helloworldconsumer_application.
  7. Click Debug. This will run the sample in Debug mode.
  8. Click the Terminate icon to stop the process.

    The following messages are written by the shared module and application module to the console.

    • 13:22:51.175 INFO [bwEngThread:In-Memory Process Worker-2] c.t.b.p.g.L.t.Log - Say Hello
    • 13:22:51.195 INFO [bwEngThread:In-Memory Process Worker-3] c.t.b.p.g.L.t.Log - Hello John from HelloWorldServiceProcess
  9. Optionally, push your application to the cloud. For details on how to do this see Pushing an Application to the Cloud.

Scenario 2

  1. In the AppsWithSharedModule directory in the File Explorer view, double-click the tibco_bw_sample_core_modularity_appswithsharedmodule_app_timereventcomponent.zip project.
  2. In Project Explorer, expand the tibco_bw_sample_core_modularity_appswithsharedmodule_app_timereventcomponent.
  3. Fully expand the Processes directory and double-click Process.bwp to open it in the Process Editor pane.
  4. Click Run > Debug Configurations.
  5. In the Debug Configuration wizard, expand BusinessWorks Application and select BWApplication
  6. Click the Applications tab and then click the Deselect All button if you have multiple applications. Select the check box next to tibco_bw_sample_core_modularity_appswithsharedmodule_app_timereventcomponent_application.
  7. Click Debug. This will run the sample in Debug mode.
  8. Click the Terminate icon to stop the process.

    The following messages are written by the shared module and application module to the console.

    • 13:37:06.395 INFO [bwEngThread:In-Memory Process Worker-2] c.t.b.p.g.L.t.Log - Time Event !
    • 13:37:06.417 INFO [bwEngThread:In-Memory Process Worker-3] c.t.b.p.g.L.t.Log - Hello TimerEventProcess--> from LogMessage from TimerEventProcess
  9. Optionally, push your application to the cloud. For details on how to do this see Pushing an Application to the Cloud.

Understanding the Configuration

Scenario 1: The MainProcess included in the tibco_bw_sample_core_modularity_appswithsharedmodule_app_helloworldconsumer application module, invokes the HelloWorldServiceProcess in the tibco_bw_sample_core_modularity_appswithsharedmodule_sharedmodule.

The Process included in the tibco_bw_sample_core_modularity_appswithsharedmodule_app_timereventcomponent application module invokes the TimerEventProcess in the tibco_bw_sample_core_modularity_appswithsharedmodule_sharedmodule.