Starting the Test Harness

You must have TIBCO ActiveMatrix BusinessWorks installed on your machine to use the test harness.

The RestTestHarnessBW6 project is intended for testing only. Perform the following steps to use the test harness for the use case:

Procedure

  1. After performing installation and postinstallation steps for the TIBCO Order Management engines, start and verify that all services have been started or deployed without any errors.
  2. Extract the $OM_HOME/samples/RestTestHarnessBW6.zip file.
  3. Start TIBCO Business Studio located at $TIBCO_HOME/studio/4.0/eclipse.
  4. Create a workspace for AF_TestHarness_BW6 and import RestTestHarnessBW6 project as an existing studio project into the workspace.
    Note: Ensure that the project has no errors. If it displays any error, there might be a version mismatch of BW6 and AF_TestHarness_BW6 project as the project is built on BW 6.6.0.
  5. Open the module properties of the project and update the required configuration.
    Module Properties
    The following table shows the description and default values of module properties:
    Test Harness Module properties
    Property name Default Value Description
    /om/authorization-service/enableSecureAPI TRUE If the secure API is enabled on Orchestrator, then it must be in sync with Orchestrator.
    /om/authorization-service/host localhost host of authorization-service
    /om/authorization-service/order-management-client order-management-client order-management-client
    /om/authorization-service/order-management-secret order-management-secret order-management-secret
    /om/authorization-service/password admin password for user
    /om/authorization-service/port 9091 authorization-service port
    /om/authorization-service/username admin user name
    /om/data-service/getPlan/idsOnly FALSE The idsOnly is an input parameter in getPlan endpoint of data-service.
    /om/data-service/getPlan/includeItems TRUE The includeItems is an input parameter in getPlan endpoint of data-service.
    /om/data-service/getPlan/requestReply FALSE The requestReply is an input parameter in getPlan endpoint of data-service.
    /om/data-service/getPlanItem/idsOnly FALSE The idsOnly is an input parameter in getPlanItem endpoint of data-service.
    /om/data-service/getPlanItem/requestReply FALSE The requestReply is an input parameter in getPlanItem endpoint of data-service.
    /om/data-service/setPlan/requestReply FALSE The requestReply is an input parameter in setPlan endpoint of data-service.
    /om/data-service/setPlanItem/requestReply FALSE The requestReply is an input parameter in setPlanItem endpoint of data-service.
    /om/data-service/host localhost data-service host
    /om/data-service/includeTDS FALSE This flag indicates whether you want a tds call during planitem execution or not.
    /om/data-service/port 9095 data-service port
    /om/data-service/tds_mode REST This property used to toggle between REST tds call and JMS tds call (Legacy support)
    /om/data-service/tds_read_timeout 3000 This property used to set wait time in milliseconds if requestReply flag is true; used in JMS tds call (Legacy support)
    /om/jms-connection/MIG_Password admin JMS password
    /om/jms-connection/MIG_QueueConnectionFactory QueueConnectionFactory Queue Connection Factory
    /om/jms-connection/MIG_TopicConnectionFactory TopicConnectionFactory Topic Connection Factory
    /om/jms-connection/MIG_Url tibjmsnaming://localhost:7222 JMS URL
    /om/jms-connection/MIG_Username admin JMS user name
    /om/orchestrator/preQualificationFailed/response_action RetryOPD Response action takes place when PreQualificationFailedReply sent to Orchestrator. Possible values are RetryOPD, WITHDRAW, and RetryFeasibility (Case sensitive)
    /om/orchestrator/planItemErrorHandler/response_action Error Response action takes place when PlanItemErrorHandlerReply sent to Orchestrator. Possible values are Retry, Resume, Complete, and Error (Case sensitive)
    /om/orchestrator/orderInjector/orderTemplate $OM_HOME\samples\TestHarness\RestTestHarnessBW6.module\config\OrderTemplate.json Order Template Path
    /om/orchestrator/orderInjector/testInjectorConfig $OM_HOME\samples\TestHarness\RestTestHarnessBW6.module\config\TestInjectorConfig.xml TestInjector configuration file for the Test Injector
    /om/orchestrator/host localhost Orchestrator service host
    /om/orchestrator/orch_mode REST Orchestrator communication mode, value can be REST or JMS
    /om/orchestrator/planItem-activate-request-queue tibco.aff.orchestrator.planItem.activate.request planItem activate request queue
    /om/orchestrator/planItem-execute-reply-path /v1/planitem/executionreply planItem runs reply path
    /om/orchestrator/planItem-execute-request-queue tibco.aff.orchestrator.planItem.execute.request planItem runs request queue
    /om/orchestrator/planItem-suspend-reply-path /v1/planitem/suspendreply planItem suspends reply path
    /om/orchestrator/planItem-suspend-request-queue tibco.aff.orchestrator.planItem.suspend.request planItem suspends request queue
    /om/orchestrator/port 9093 Orchestrator port
    /om/process-component/host localhost current host
    /om/process-component/port 9089 port where application opens for communication
  6. Go to Run --> Run Configurations --> BusinessWorks Application --> BWApplication and select the RestTestHarnessBW6 check box to select all the properties.
    Module Properties Selection

  7. Click the Run button at the bottom.
    The Test Harness is up and running.

Example

Types of services offered by components:
Test Harness Services
  • PlanItem Execute Service
  • PlanItem Activate Service
  • PlanItemSuspend Service
  • PlanItemErrorHandler Service
  • Feasibility check Service
  • PreQualification Failed Service
  • OrderInjection
  • Data Services
  • State Notification Services
Packaging Description:
Test Harness Packages
Test Harness Packages and Description
Package name Description
utilities.notifications These processes listen and print all the state change notification published by Orchestrator.
utilities.stub.order-execution These processes listen asynchronous process component calls.
utilities.stub.order-execution.jms These processes listen jms requests and then process it as older versions (Legacy support).
utilities.stub.order-execution.rest These processes serve as REST service of process components and proceed it according to Async, Sync Confirm, and Sync No Confirm processes.

Async process notifies a separate thread of process available in package utilities.stub.order-execution and send REST response immediately. That separate thread is responsible for sending execution response.

Sync No Confirm process responds an execution response directly in REST response.

Sync Confirm responds an execution response first and then send confirmation in REST response.

utilities.stub.order-execution.rest.auth This package contains only one subprocess which is responsible to fetch an auth token from authorization service and cache it in memory.
utilities.stub.order-execution.rest.client These are the subprocesses responsible to post responses on Orchestrator. Usually, these are internally called by different processes depending on the nature of requests.
utilities.stub.order-execution.subprocess These are intermediate subprocesses.
utilities.stub.order-execution.subprocesses.jms These sub processes internally called to test data services if the includeTDS flag is on (Legacy support).
utilities.stub.order-execution.subprocess.tds These sub processes internally called to test data services if the includeTDS flag is on (Rest and Legacy support).
utilities.test.injector These processes are capable to inject multiple orders for details. Refer to the OrderTemplate and TestInjectorConfig files in RestTestHarnessBW6.module\config.