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 assessing and postinstallation steps for the TIBCO Order Management engines, start and verify that all services have been started or deployed without any errors.
  2. Start TIBCO Business Studio located at $TIBCO_HOME/studio/4.0/eclipse.
  3. Create a workspace for AF_TestHarness_BW6 and import the RestTestHarnessBW6.zip 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.
  4. 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-clientorder-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 thegetPlan endpoint of the data-service.
    /om/data-service/getPlan/includeItems TRUE The includeItems is an input parameter in thegetPlan endpoint of the data-service.
    /om/data-service/getPlan/requestReply FALSE The requestReply is an input parameter in thegetPlan endpoint of the data-service.
    /om/data-service/getPlanItem/idsOnly FALSE The idsOnly is an input parameter in thegetPlanItem endpoint of the data-service.
    /om/data-service/getPlanItem/requestReply FALSE The requestReply is an input parameter in thegetPlanItem endpoint of the data-service.
    /om/data-service/setPlan/requestReplyFALSE The requestReply is an input parameter in thesetPlan endpoint of the data-service.
    /om/data-service/setPlanItem/requestReply FALSE The requestReply is an input parameter in the setPlanItem endpoint of the data-service.
    /om/data-service/host localhost Data-service host
    /om/data-service/includeTDSFALSE 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_modeREST 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 therequestReply flag is true; used in JMS tds call (Legacy support)
    /om/jms-connection/MIG_Password adminJMS password
    /om/jms-connection/MIG_QueueConnectionFactoryQueueConnectionFactory 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 adminJMS user name
    /om/orchestrator/preQualificationFailed/response_actionRetryOPD Response action takes place when PreQualificationFailedReply sent to the Orchestrator. Possible values are RetryOPD, WITHDRAW, and RetryFeasibility (Case sensitive)
    /om/orchestrator/planItemErrorHandler/response_actionError Response action takes place when PlanItemErrorHandlerReply sent to the 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/hostlocalhost Orchestrator service host
    /om/orchestrator/orch_modeREST Orchestrator communication mode, value can be REST or JMS
    /om/orchestrator/planItem-activate-request-queuetibco.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-queuetibco.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/port9089 Port where application opens for communication

  5. Go to Run > Run Configurations > BusinessWorks Application > BWApplication and select the RestTestHarnessBW6 checkbox to select all the properties.
    Module Properties Selection

  6. Click the Run button at the bottom.
    The test harness is up and running.

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 notifications published by the 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 the REST response immediately. That separate thread is responsible for sending the execution response.

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

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

utilities.stub.order-execution.rest.auth This package contains only one subprocess, which is responsible for fetching an auth token from the authorization service and cache it in memory.
utilities.stub.order-execution.rest.client These are the subprocesses responsible to post responses on the Orchestrator. Usually, these are internally called by different processes depending on the nature of the 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 can inject multiple orders for details. Refer to the OrderTemplate and TestInjectorConfig files in RestTestHarnessBW6.module\config.