All posts by Fernando Ribeiro

About Fernando Ribeiro

Professional with 17 years of experience in enterprise solution development. Already worked as sales consultant, solution architect and full stack developer in companies like Oracle, Red Hat and IBM. Currently works as Principal Digital & Cloud Architect at Oracle and contributes to open source projects.

How to Get an Inventory Item in the Oracle Field Service Cloud with the Activity Management API

import static java.lang.System.out;

import toa.activity.Activity_Service;
import toa.activity.ApiPortType;
import toa.activity.GetInventoryParameters;
import toa.activity.User;

public final class OfscSample {

  public static void main(final String[] args) {
    final Activity_Service service = new Activity_Service();

    final ApiPortType port = service.getActivity();

    final GetInventoryParameters req = new GetInventoryParameters();

    final User user = new User();

    user.setNow("now");

    user.setLogin("login");

    user.setCompany("company");

    user.setAuthString("authString");

    req.setUser(user);

    req.setInventoryId("inventoryId");

    out.println(port.getInventory(req));
  }

}
Advertisements

How to Get Resource Inventory in the Oracle Field Service Cloud with the Activity Management API

import static java.lang.System.out;

import toa.activity.Activity_Service;
import toa.activity.ApiPortType;
import toa.activity.GetResourceInventoryListParameters;
import toa.activity.User;

public final class OfscSample {

  public static void main(final String[] args) {
    final Activity_Service service = new Activity_Service();

    final ApiPortType port = service.getActivity();

    final GetResourceInventoryListParameters req = new GetResourceInventoryListParameters();

    final User user = new User();

    user.setNow("now");

    user.setLogin("login");

    user.setCompany("company");

    user.setAuthString("authString");

    req.setUser(user);

    req.setResourceId("resourceId");

    out.println(port.getResourceInventoryList(req));
  }

}

How to Get Customer Inventory in the Oracle Field Service Cloud with the Activity Management API

import static java.lang.System.out;

import toa.activity.Activity_Service;
import toa.activity.ApiPortType;
import toa.activity.GetCustomerInventoryListParameters;
import toa.activity.User;

public final class OfscSample {

  public static void main(final String[] args) {
    final Activity_Service service = new Activity_Service();

    final ApiPortType port = service.getActivity();

    final GetCustomerInventoryListParameters req = new GetCustomerInventoryListParameters();

    final User user = new User();

    user.setNow("now");

    user.setLogin("login");

    user.setCompany("company");

    user.setAuthString("authString");

    req.setUser(user);

    req.setActivityId("activityId");

    out.println(port.getCustomerInventoryList(req));
  }

}

How to Create Resource Inventory in the Oracle Field Service Cloud with the Activity Management API

import static java.lang.System.out;

import toa.activity.Activity_Service;
import toa.activity.ApiPortType;
import toa.activity.CreateResourceInventoryParameters;
import toa.activity.Property;
import toa.activity.User;

public final class OfscSample {

  public static void main(final String[] args) {
    final Activity_Service service = new Activity_Service();

    final ApiPortType port = service.getActivity();

    final CreateResourceInventoryParameters req = new CreateResourceInventoryParameters();

    final User user = new User();

    user.setNow("now");

    user.setLogin("login");

    user.setCompany("company");

    user.setAuthString("authString");

    req.setUser(user);

    req.setResourceId("resourceId");

    final Property prop = new Property();

    prop.setName("name");

    prop.setValue("value");

    req.getProperties().add(prop);

    out.println(port.createResourceInventory(req));
  }

}

How to Create Customer Inventory in the Oracle Field Service Cloud with the Activity Management API

import static java.lang.System.out;

import toa.activity.Activity_Service;
import toa.activity.ApiPortType;
import toa.activity.CreateCustomerInventoryParameters;
import toa.activity.Property;
import toa.activity.User;

public final class OfscSample {

  public static void main(final String[] args) {
    final Activity_Service service = new Activity_Service();

    final ApiPortType port = service.getActivity();

    final CreateCustomerInventoryParameters req = new CreateCustomerInventoryParameters();

    final User user = new User();

    user.setNow("now");

    user.setLogin("login");

    user.setCompany("company");

    user.setAuthString("authString");

    req.setUser(user);

    req.setActivityId("activityId");

    final Property prop = new Property();

    prop.setName("name");

    prop.setValue("value");

    req.getProperty().add(prop);

    out.println(port.createCustomerInventory(req));
  }

}

How to Unlink Activities in the Oracle Field Service Cloud with the Activity Management API

import static java.lang.System.out;

import toa.activity.Activity_Service;
import toa.activity.ApiPortType;
import toa.activity.UnlinkActivitiesParameters;
import toa.activity.User;

public final class OfscSample {

  public static void main(final String[] args) {
    final Activity_Service service = new Activity_Service();

    final ApiPortType port = service.getActivity();

    final UnlinkActivitiesParameters req = new UnlinkActivitiesParameters();

    final User user = new User();

    user.setNow("now");

    user.setLogin("login");

    user.setCompany("company");

    user.setAuthString("authString");

    req.setUser(user);

    req.setFromActivityId("fromActivityId");

    req.setToActivityId("toActivityId");

    req.setLinkType("linkType"); // aka "link template"

    out.println(port.unlinkActivities(req));
  }

}

How to Link Activities in the Oracle Field Service Cloud with the Activity Management API

import static java.lang.System.out;

import toa.activity.Activity_Service;
import toa.activity.ApiPortType;
import toa.activity.LinkActivitiesParameters;
import toa.activity.User;

public final class OfscSample {

  public static void main(final String[] args) {
    final Activity_Service service = new Activity_Service();

    final ApiPortType port = service.getActivity();

    final LinkActivitiesParameters req = new LinkActivitiesParameters();

    final User user = new User();

    user.setNow("now");

    user.setLogin("login");

    user.setCompany("company");

    user.setAuthString("authString");

    req.setUser(user);

    req.setFromActivityId("fromActivityId");

    req.setToActivityId("toActivityId");

    req.setLinkType("linkType"); // aka "link template"

    out.println(port.linkActivities(req));
  }

}

How to Get the Links of an Activity in the Oracle Field Service Cloud with the Activity Management API

import static java.lang.System.out;

import toa.activity.Activity_Service;
import toa.activity.ApiPortType;
import toa.activity.GetActivityLinksParameters;
import toa.activity.User;

public final class OfscSample {

  public static void main(final String[] args) {
    final Activity_Service service = new Activity_Service();

    final ApiPortType port = service.getActivity();

    final GetActivityLinksParameters req = new GetActivityLinksParameters();

    final User user = new User();

    user.setNow("now");

    user.setLogin("login");

    user.setCompany("company");

    user.setAuthString("authString");

    req.setUser(user);

    req.setActivityId("activityId");

    out.println(port.getActivityLinks(req));
  }

}

How to Get the Required Inventory of an Activity in the Oracle Field Service Cloud with the Activity Management API

import static java.lang.System.out;

import toa.activity.Activity_Service;
import toa.activity.ApiPortType;
import toa.activity.GetRequiredInventoriesParameters;
import toa.activity.User;

public final class OfscSample {

  public static void main(final String[] args) {
    final Activity_Service service = new Activity_Service();

    final ApiPortType port = service.getActivity();

    final GetRequiredInventoriesParameters req = new GetRequiredInventoriesParameters();

    final User user = new User();

    user.setNow("now");

    user.setLogin("login");

    user.setCompany("company");

    user.setAuthString("authString");

    req.setUser(user);

    req.setActivityId("activityId");

    out.println(port.getRequiredInventories(req));
  }

}

How to Set the Required Inventory of an Activity in the Oracle Field Service Cloud with the Activity Management API

import static java.lang.System.out;

import toa.activity.Activity_Service;
import toa.activity.ApiPortType;
import toa.activity.RequiredInventory;
import toa.activity.SetRequiredInventoriesParameters;
import toa.activity.User;

public final class OfscSample {

  public static void main(final String[] args) {
    final Activity_Service service = new Activity_Service();

    final ApiPortType port = service.getActivity();

    final SetRequiredInventoriesParameters req = new SetRequiredInventoriesParameters();

    final User user = new User();

    user.setNow("now");

    user.setLogin("login");

    user.setCompany("company");

    user.setAuthString("authString");

    req.setUser(user);

    req.setActivityId("activityId");

    final RequiredInventory requiredInventory = new RequiredInventory();

    requiredInventory.setType("type");

    requiredInventory.setQuantity("quantity");

    req.getRequiredInventory().add(requiredInventory);

    out.println(port.setRequiredInventories(req));
  }

}