HCL Marketing Operations Integration Services basics

You use HCL® Marketing Operations Integration Services to create custom procedures. You can use these procedures to trigger external events when certain events occur within Marketing Operations. You can use these procedures to run Marketing Operations functions from external systems or programs.

The API interface interacts with HCL Marketing Operations at the programmatic level, in the same way the GUI interfaces with Marketing Operations at a user level. Using the API, you construct procedures. Using these procedures, you communicate between Marketing Operations and external systems. The Marketing Operations Webservice is the container object for the procedures, API, and triggers.

The architecture of the Marketing Operations Integration Services is shown here.


Integration Services communicating with each other, and with external systems

The following are key components of the Integration Services.

  • Marketing Operations Procedure Manager: extends the business logic by interacting with Marketing Operations through the API.
  • Marketing Operations Trigger Manager: associates a condition (for example, the state change of a marketing object) with an action (a procedure to run when the condition for the trigger is met).

Methods

You use the components of HCL Marketing Operations Integration Services to develop custom procedures, as shown in the following diagram.


Programmer uses the Marketing Operations Installer, Java IDE, and Application Server

After you install the developer's kit, you follow these basic steps:

  1. Code the custom procedure. Currently, you must use Java™.
  2. Update the plug-in definition in the XML definition file.
  3. Build the plug-in:
    1. Compile the necessary classes.
    2. If you are using a third-party library that is not in the Marketing Operations archive, bundle the library inside the plan.war file and redeploy.
  4. Restart Marketing Operations. Changes to the procedure classes are applied when you restart the application server.
    Note: If you change the plan.war file, you must undeploy and redeploy Marketing Operations with the new plan.war file. Undeploy and redeploy Marketing Operations if you use a third-party library that is not in the Marketing Operations archive and you edit the plan.war file.

Basic Example to communicate between HCL Marketing Operations and the API

The following basic example describes establishing communication between the API and Marketing Operations. It does not do any useful work; it performs a round trip between Marketing Operations and the Integration Services.

This example uses portions of the example procedures included with the Marketing Operations Integration Services developer's kit. Specifically, you can find the code that is referenced here in the following files.

  • PlanClientFacade.java
  • PlanWSNOOPTestCase.java

The noop method is a webservice call to Marketing Operations. It is defined in the PlanClientFacade class, and passes null values in an array.

public ProcedureResponse noop(String jobId) 
  throws RemoteException, ServiceException {
  NameValueArrays parameters =
    new NameValueArrays(null, null, null, null, null, null, null, null); 
  return _serviceBinding.executeProcedure("uapNOOPProcedure", jobId, parameters);
}

The procedure testExecuteProcedure calls the noop method from PlanClientFacade to establish a round trip with the Marketing Operations application.

public void testExecuteProcedure() throws Exception {
  // Time out after a minute
  int timeout = 60000;
  PlanClientFacade clientFacade = new PlanClientFacade(urlWebService, timeout);
  System.out.println("noop w/no parameters");
  long startTime = new Date().getTime();
  ProcedureResponse response = clientFacade.noop("junit-jobid");
  long duration = new Date().getTime() - startTime;

  // zero or positive status => success
  System.out.println("Status: " + response.getStatus());
  System.out.println("Duration: " + duration + " ms");
  assertTrue(response.getStatus() >= 0);
  System.out.println("Done.");
}

For details of NameValueArrays, ProcedureResponse, and other listed methods and data types, refer to the Marketing Operations Integration Module and the JavaDocs.