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
- In the
samples directory in
File Explorer view, expand
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.
- In Project Explorer, expand the tibco_bw_sample_core_modularity_appswithsharedmodule_app_helloworldconsumer.
- Fully expand the Processes directory and double-click MainProcess.bwp to open it in the Process Editor pane.
- Click .
- At the left-hand tree of Debug Configuration wizard, expand BusinessWorks Application and select BWApplication
- Click the Applications tab and then click the Deselect All button if you have multiple applications. Select the checkbox next to tibco_bw_sample_core_modularity_appswithsharedmodule_app_helloworldconsumer_application.
- Click Debug. This runs the sample in Debug mode.
- 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
- Optionally, push your application to the cloud. For details on how to do this see Pushing an Application to the Cloud.
Scenario 2
- In the AppsWithSharedModule directory in the File Explorer view, double-click the tibco_bw_sample_core_modularity_appswithsharedmodule_app_timereventcomponent.zip project.
- In Project Explorer, expand the tibco_bw_sample_core_modularity_appswithsharedmodule_app_timereventcomponent.
- Fully expand the Processes directory and double-click Process.bwp to open it in the Process Editor pane.
- Click .
- In the Debug Configuration wizard, expand BusinessWorks Application and select BWApplication.
- Click the Applications tab and then click the Deselect All button if you have multiple applications. Select the checkbox next to tibco_bw_sample_core_modularity_appswithsharedmodule_app_timereventcomponent_application.
- Click Debug. This runs the sample in Debug mode.
- 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
- 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.