Running a webMethods Messaging Trigger with a Launch Configuration

In Designer, you can run a webMethods messaging trigger to verify that the subscription, filters, and trigger service work as expected. Designer requires launch configurations to run webMethods messaging triggers. However, if a webMethods messaging trigger does not have an associated launch configuration and you bypass the Run Configurations dialog boxes when running the webMethods messaging trigger, Designer creates a launch configuration on the fly and saves it in your workspace. You can use this configuration from one session to the next. In fact, Designer reuses this configuration every time you run the webMethods messaging trigger without creating another launch configuration.

By default, Designer saves launch configurations locally in an unexposed location in your workspace. However, you might want to share launch configurations with other developers. You can specify that Designer save a launch configuration to a shared file within your workspace; this location will be exposed. On the Common tab in the Run Configurations dialog box, select the Shared file option and provide a workspace location in which to save the file.

In a launch configuration for a webMethods messaging trigger, you specify:

  • The condition that you want Designer to test. Each launch configuration can specify only one condition in the webMethods messaging trigger.
  • The document type whose subscription you want to test. For an Any (OR) or Only one (XOR) join condition, you specify the document type for which you want to supply input.
  • Input data that Designer uses to build a document. Designer evaluates the filter using the data in the document and provides the document as input to the trigger service.

You can create multiple launch configurations for each webMethods messaging trigger.

Creating a Launch Configuration for a webMethods Messaging Trigger

About this task

Use the following procedure to create a launch configuration for running a webMethods messaging trigger.

To create a launch configuration for running a webMethods messaging trigger

Procedure

  1. In the Service Development perspective, select Run > Run Configurations
  2. In the Run Configuration dialog box, select webMethods Messaging Trigger and click to add a new launch configuration.
  3. In the Name field, specify a name for the launch configuration.
  4. On the webMethods Messaging Trigger tab, in the Integration Server list, select the Integration Server on which the webMethods messaging trigger for which you are creating a launch configuration resides.
  5. In the webMethods Messaging Trigger field click Browse to navigate to and select the trigger.
  6. On the Input tab, in the Condition list, select the condition that you want to test using the launch configuration.
  7. If the condition is a join condition with an Any (OR) or Only one (XOR) join, do the following:
    1. Next to Document Type, click Select.
    2. In the Select a Document Type dialog box, select the document type for which you want to provide input data in this launch configuration.
      • For an Any (OR) join, select one document type.
      • For an Only one (XOR) join, select the document or document types that you want to use to test the join condition.
    3. Click OK.
  8. On the Input tab, select the tab with the name of the IS document type for which you want to provide input data.

    If the selected condition uses an All (AND) join, Designer displays one tab for each document type in the join condition. If the condition is an Only one (XOR) join and you selected multiple document types for which to supply input data, Designer displays one tab for each selected document type.

    1. Select or clear the Include empty values for String Types check box to indicate how to handle variables that have no value.
      • If you want to use an empty String (i.e., a String with a zero-length), select the Include empty values for String Types check box. Also note that Document Lists that have defined elements will be part of the input, but they will be empty.
      • If you want to use a null value for the empty Strings, clear the check box. String-type variables will not included in the input document.
      Note: The setting applies to all String-type variables in the root document of the input signature. The setting does not apply to String-type variables within Document Lists. You define how you want to handle String-type variables within Document Lists separately when you assign values to Document Lists variables.

      For more information, see webMethods Service Development Help.

    2. Specify the values to save with the launch configuration for the webMethods messaging trigger by doing one of the following:
      • Type the input value for each field in the document type.
      • To load the input values from a file, click Load to locate and select the file containing the input values. If Designer cannot parse the input data, it displays an error message indicating why it cannot load the data.

        For more information about loading input values from a file, see webMethods Service Development Help.

      Designer validates the provided input values. If provided values do not match the input parameter data type, Designer displays a message to that effect. You cannot use the launch configuration for the webMethods messaging trigger if the provided input does not match the defined data type.

  9. Repeat the preceding step for each IS document type displayed on the Input tab.
  10. If you want to save the input values that you have entered, click Save.
  11. Click Apply.
  12. If you want to execute the launch configuration, click Run. Otherwise, click Close.

Running a webMethods Messaging Trigger

About this task

Keep the following points in mind when running a webMethods messaging trigger:
  • When you run a webMethods messaging trigger, you can select the launch configuration that Designer uses to run the webMethods messaging trigger. If a launch configuration does not exist for a webMethods messaging trigger, Designer creates a launch configuration and immediately prompts you for input values and then runs the webMethods messaging trigger. Designer saves the launch configuration in your workspace.
  • When you run a webMethods messaging trigger, you can only test one condition at a time.
  • When you run a webMethods messaging trigger with a join condition Designer treats the activation IDs for the documents as identical. Designer ignores the value of the activation field in the document envelope.
  • When you run a webMethods messaging trigger by running a launch configuration, the webMethods messaging trigger is tested locally. That is, a document is not routed through the messaging provider.
    Note: To test a webMethods messaging trigger by publishing a document to the messaging provider, test a publishable document type. You test a publishable document type by creating and running a launch configuration for the publishable document type.
  • Designer displays results for running the webMethods messaging trigger in the Results view.

To run a webMethods messaging trigger

Procedure

  1. In Package Navigator view of the Service Development perspective, select the webMethods messaging trigger you want to run.
  2. Select Run > Run As > webMethods Messaging Trigger
  3. If multiple launch configurations exist for the service, use the Select Launch Configuration dialog box to select the launch configuration that you want Designer to use to run the webMethods messaging trigger.
  4. If the launch configuration is set up to prompt the user for input values or there is no launch configuration, in the Enter Input for triggerName dialog box, in the Condition list, select the condition that you want to test using the launch configuration.
  5. If the condition is a join condition with an Any (OR) or Only one (XOR) join, do the following:
    1. Next to Document type, click Select.
    2. In the Select a Document Type dialog box, select the document type for which you want to provide input data.
      • For an Any (OR) join, select one document type.
      • For an Only one (XOR) join, select one or more document types to use to test the join condition. Note that at run time, the trigger service processes only one of the documents. The trigger discards the other document.
    3. Click OK.
  6. In the Enter Input for triggerName dialog box, select the tab with the name of the IS document type for which you want to provide input data.
  7. Select or clear the Include empty values for String Types check box to indicate how to handle variables that have no value.
    • If you want to use an empty String (i.e., a String with a zero-length), select the Include empty values for String Types check box. Also note that Document Lists that have defined elements will be part of the input, but they will be empty.
    • If you want to use a null value for the empty Strings, clear the check box. String-type variables will not included in the input document.
    Note: The setting applies to all String-type variables in the root document of the input signature. The setting does not apply to String-type variables within Document Lists. You define how you want to handle String-type variables within Document Lists separately when you assign values to Document Lists variables. For more information, see webMethods Service Development Help.
  8. Specify the values to save with the launch configuration for the webMethods messaging trigger by doing one of the following:
    • Type the input value for each field in the document type.
    • To load the input values from a file, click Load to locate and select the file containing the input values. If Designer cannot parse the input data, it displays an error message indicating why it cannot load the data.

      For more information about loading input values from a file, see webMethods Service Development Help.

    Note: If you type in input values, Designer discards the values you specified after the run. If you want to save input values, create a launch configuration. For instructions, see Running a webMethods Messaging Trigger.
  9. Click OK.

    Designer runs the trigger and displays the results in the Results view.

Testing Join Conditions

While running a launch configuration for a webMethods messaging trigger provides verification of filters and the trigger service execution, it does not test all aspects of a join condition. For example, running a webMethods messaging trigger does not test the join expiration. In addition to running a launch configuration to test a join condition, consider testing the join condition in the following ways:

  • Publish documents from Designer using a launch configuration.

    You can publish documents by creating and running a launch configuration for a publishable document type.

    To test a join condition by publishing documents via a launch configuration, you must use the same activation ID for all the documents specified in the join. If you re-use an activation ID from one test to the next, make sure that the documents sent in the first test are processed before starting the next test.

  • Create a service that publishes the documents.

    You can also test join processing for a join condition by creating a flow service that invokes a publish service for each of the document types specified in the join condition. Integration Server automatically assigns an activation ID and uses that activation ID for all the documents published in the same service.

During trigger processing and join processing, Integration Server writes messages to the journal log. You can use the contents of the journal log to test and debug the join conditions in the webMethods messaging trigger.