Skip Headers
Oracle® Communications Design Studio Modeling OSM Processes
Release 7.2.4
Go to Design Studio Help Home
Go to Table of Contents
Go to Feedback page

Go to previous page
Go to next page
Mobi · ePub

External Custom Java Automator that Changes the OSM Task Status

A basic external custom Java automator that changes the OSM task status has the following characteristics:

The following example shows an external custom automator that updates the OSM task status. This example assumes that the automation definition is an external event receiver that is receiving a message from ASAP, and that it is triggered by an automated task.

  package com.mslv.oms.sample.atm_frame;
 
  import com.mslv.oms.automation.plugin.*;
  import com.mslv.oms.automation.*;
  import java.rmi.*;

  public class AsapResponseHandler extends AbstractAutomator {
    public void run(String inputXML, AutomationContext task)
                throws AutomationException {
      try {
        TaskContext tctx = (TaskContext)task;
        String taskName = tctx.getTaskMnemonic();
        AtmFrameCatalogLogger.logTaskEventResponse
          (taskName,tctx.getOrderId(),tctx.getOrderHistoryId(),inputXML);
        tctx.completeTaskOnExit("activation_successful"); }
      catch(RemoteException ex) {
        throw new AutomationException(ex); }
      catch(AutomationException x) {
        throw x; }
    }
  }