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.HelloWorldConsumer
- tibco.bw.sample.core.modularity.AppsWithSharedModule.App.TimerEventComponent
Shared Module Project
- tibco.bw.sample.core.modularity.AppsWithSharedModule.SharedModule
- Procedure
- In the samples directory, select and double-click tibco.bw.sample.core.modularity.AppsWithSharedModule.SharedModule. For more information, see Accessing Samples.
- In Project Explorer, expand the tibco.bw.sample.core.modularity.AppsWithSharedModule.App.HelloWorldConsumer.
- Set the default ApplicationProfile to match the OS you are running on. For more information, see Setting the Default Application Profile.
- Fully expand the Processes directory and click MainProcess.bwp.
- 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.
- In the AppsWithSharedModule directory, double-click the tibco.bw.sample.core.modularity.AppsWithSharedModule.App.TimerEventComponent project.
- 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.TimerEventComponent.application.
- Click
Debug.
This runs the sample in Debug mode.
- Click the
Terminate
icon to stop the process.
Scenario 1
The following messages are written by the shared module and application module to the helloWorldServiceConsumer.log file at c:\tmp\AppsWithSharedModule location.
- --> LogMessage from HelloWorldServiceProcess for John
- --> Hello John from HelloWorldServiceProcess
Scenario 2
The following messages are written by the shared module and application module to the timerEvent.log file at c:\tmp\AppsWithSharedModule location.
- --> LogMessage from TimerEventProcessTimerEventProcess
- --> Hello TimerEventProcess--> from LogMessage from TimerEventProcess
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 Write To File activity logs the output from the calling process, HelloWorldServiceProcess.
Scenario 2: 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.