Tag Archives: Oracle Field Service Cloud

How to Get Start, End and Home Zone Center Resource Locations in the Oracle Field Service Cloud with the Resource Management API with Java

import static java.lang.System.out;

import toatech.resourcemanagement._1.AuthNodeElement;
import toatech.resourcemanagement._1.GetResourcesLocationsElement;
import toatech.resourcemanagement._1.LocationResourceParams;
import toatech.resourcemanagement._1.LocationResourceParamsList;
import toatech.resourcemanagement._1.ResourceManagementPort;
import toatech.resourcemanagement._1.ResourceManagementService;

public final class OfscSample {

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

    final ResourceManagementPort port = service.getResourceManagementPort();

    final GetResourcesLocationsElement req = new GetResourcesLocationsElement();

    final AuthNodeElement user = new AuthNodeElement();

    user.setNow("2017-01-01T00:00:00Z");

    user.setLogin("SampleLogin");

    user.setCompany("SampleCompany");

    user.setAuthString("f3a904e1b89e0433f4f9f4a453370f44c3791d632f8ba50757301ba46f11047f");

    req.setUser(user);

    final LocationResourceParamsList resources = new LocationResourceParamsList();

    final LocationResourceParams resource = new LocationResourceParams();

    resource.setResourceId("SampleResource");

    resources.getResource().add(resource);

    req.setResources(resources);

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

}
Advertisements

How to Set Start, End and Home Zone Center Resource Locations in the Oracle Field Service Cloud with the Resource Management API with Java

import static java.lang.System.out;

import toatech.resourcemanagement._1.AuthNodeElement;
import toatech.resourcemanagement._1.ResourceLocationElement;
import toatech.resourcemanagement._1.ResourceLocationList;
import toatech.resourcemanagement._1.ResourceManagementPort;
import toatech.resourcemanagement._1.ResourceManagementService;
import toatech.resourcemanagement._1.SetResourcesLocationsElement;
import toatech.resourcemanagement._1.WeekdaysList;

public final class OfscSample {

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

    final ResourceManagementPort port = service.getResourceManagementPort();

    final SetResourcesLocationsElement req = new SetResourcesLocationsElement();

    final AuthNodeElement user = new AuthNodeElement();

    user.setNow("2017-01-01T00:00:00Z");

    user.setLogin("SampleLogin");

    user.setCompany("SampleCompany");

    user.setAuthString("f3a904e1b89e0433f4f9f4a453370f44c3791d632f8ba50757301ba46f11047f");

    req.setUser(user);

    final ResourceLocationList resourceLocations = new ResourceLocationList();

    final ResourceLocationElement resourceLocation = new ResourceLocationElement();

    resourceLocation.setResourceId("SampleResource");

    resourceLocation.setLocationLabel("Sample Location");

    resourceLocation.setType("start"); // or "end", "home_zone_center"

    final WeekdaysList weekdays = new WeekdaysList();

    weekdays.getWd().add("Mon"); // or "Tue", "Wed", "Thu", "Fri", "Sat", "Sun", "all"

    resourceLocation.setWeekdays(weekdays);

    resourceLocations.getResourceLocation().add(resourceLocation);

    req.setResourceLocations(resourceLocations);

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

}

How to Get Resource Locations in the Oracle Field Service Cloud with the Resource Management API with Java

import static java.lang.System.out;

import toatech.resourcemanagement._1.AuthNodeElement;
import toatech.resourcemanagement._1.GetLocationsElement;
import toatech.resourcemanagement._1.LocationResourceParams;
import toatech.resourcemanagement._1.LocationResourceParamsList;
import toatech.resourcemanagement._1.ResourceManagementPort;
import toatech.resourcemanagement._1.ResourceManagementService;

public final class OfscSample {

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

    final ResourceManagementPort port = service.getResourceManagementPort();

    final GetLocationsElement req = new GetLocationsElement();

    final AuthNodeElement user = new AuthNodeElement();

    user.setNow("2017-01-01T00:00:00Z");

    user.setLogin("SampleLogin");

    user.setCompany("SampleCompany");

    user.setAuthString("f3a904e1b89e0433f4f9f4a453370f44c3791d632f8ba50757301ba46f11047f");

    req.setUser(user);

    final LocationResourceParamsList resources = new LocationResourceParamsList();

    final LocationResourceParams resource = new LocationResourceParams();

    resource.setResourceId("SampleResource");

    resources.getResource().add(resource);

    req.setResources(resources);

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

}

How to Delete Resource Locations in the Oracle Field Service Cloud with the Resource Management API with Java

import static java.lang.System.out;

import toatech.resourcemanagement._1.AuthNodeElement;
import toatech.resourcemanagement._1.LocationElement;
import toatech.resourcemanagement._1.LocationList;
import toatech.resourcemanagement._1.ResourceManagementPort;
import toatech.resourcemanagement._1.ResourceManagementService;
import toatech.resourcemanagement._1.SetLocationsElement;
import toatech.resourcemanagement._1.TextPropertiesElement;
import toatech.resourcemanagement._1.TextPropertyElement;

public final class OfscSample {

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

    final ResourceManagementPort port = service.getResourceManagementPort();

    final SetLocationsElement req = new SetLocationsElement();

    final AuthNodeElement user = new AuthNodeElement();

    user.setNow("2017-01-01T00:00:00Z");

    user.setLogin("SampleLogin");

    user.setCompany("SampleCompany");

    user.setAuthString("f3a904e1b89e0433f4f9f4a453370f44c3791d632f8ba50757301ba46f11047f");

    req.setUser(user);

    final LocationList locations = new LocationList();

    final LocationElement location = new LocationElement();

    final TextPropertiesElement properties = new TextPropertiesElement();

    final TextPropertyElement label = new TextPropertyElement();

    label.setName("label");

    label.setValue("Sample Location");

    properties.getProperty().add(label);

    final TextPropertyElement resourceId = new TextPropertyElement();

    resourceId.setName("resource_id");

    resourceId.setValue("SampleResource");

    properties.getProperty().add(resourceId);

    location.setProperties(properties);

    locations.getLocation().add(location);

    req.setLocations(locations);

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

}

How to Create/Update Resource Locations in the Oracle Field Service Cloud with the Resource Management API with Java

import static java.lang.System.out;

import toatech.resourcemanagement._1.AuthNodeElement;
import toatech.resourcemanagement._1.LocationElement;
import toatech.resourcemanagement._1.LocationList;
import toatech.resourcemanagement._1.ResourceManagementPort;
import toatech.resourcemanagement._1.ResourceManagementService;
import toatech.resourcemanagement._1.SetLocationsElement;
import toatech.resourcemanagement._1.TextPropertiesElement;
import toatech.resourcemanagement._1.TextPropertyElement;

public final class OfscSample {

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

    final ResourceManagementPort port = service.getResourceManagementPort();

    final SetLocationsElement req = new SetLocationsElement();

    final AuthNodeElement user = new AuthNodeElement();

    user.setNow("2017-01-01T00:00:00Z");

    user.setLogin("SampleLogin");

    user.setCompany("SampleCompany");

    user.setAuthString("f3a904e1b89e0433f4f9f4a453370f44c3791d632f8ba50757301ba46f11047f");

    req.setUser(user);

    final LocationList locations = new LocationList();

    final LocationElement location = new LocationElement();

    final TextPropertiesElement properties = new TextPropertiesElement();

    final TextPropertyElement label = new TextPropertyElement();

    label.setName("label");

    label.setValue("Sample Location");

    properties.getProperty().add(label);

    final TextPropertyElement resourceId = new TextPropertyElement();

    resourceId.setName("resource_id");

    resourceId.setValue("SampleResource");

    properties.getProperty().add(resourceId);

    location.setProperties(properties);

    locations.getLocation().add(location);

    req.setLocations(locations);

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

}

How to Get Resource Work Skills in the Oracle Field Service Cloud with the Resource Management API with Java

import static java.lang.System.out;

import toatech.resourcemanagement._1.AuthNodeElement;
import toatech.resourcemanagement._1.GetResourcesParamsElement;
import toatech.resourcemanagement._1.GetResourcesParamsList;
import toatech.resourcemanagement._1.GetResourcesSkillsElement;
import toatech.resourcemanagement._1.ResourceManagementPort;
import toatech.resourcemanagement._1.ResourceManagementService;

public final class OfscSample {

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

    final ResourceManagementPort port = service.getResourceManagementPort();

    final GetResourcesSkillsElement req = new GetResourcesSkillsElement();

    final AuthNodeElement user = new AuthNodeElement();

    user.setNow("2017-01-01T00:00:00Z");

    user.setLogin("SampleLogin");

    user.setCompany("SampleCompany");

    user.setAuthString("f3a904e1b89e0433f4f9f4a453370f44c3791d632f8ba50757301ba46f11047f");

    req.setUser(user);

    final GetResourcesParamsList resources = new GetResourcesParamsList();

    final GetResourcesParamsElement resource = new GetResourcesParamsElement();

    resource.setResourceId("SampleResource");

    resources.getResource().add(resource);

    req.setResources(resources);

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

}

How to Set Resource Work Skills in the Oracle Field Service Cloud with the Resource Management API with java

import static java.lang.System.out;

import toatech.resourcemanagement._1.AuthNodeElement;
import toatech.resourcemanagement._1.ResourceManagementPort;
import toatech.resourcemanagement._1.ResourceManagementService;
import toatech.resourcemanagement._1.SetResourcesSkillsElement;
import toatech.resourcemanagement._1.SkillElement;
import toatech.resourcemanagement._1.SkillList;
import toatech.resourcemanagement._1.TextPropertiesElement;
import toatech.resourcemanagement._1.TextPropertyElement;

public final class OfscSample {

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

    final ResourceManagementPort port = service.getResourceManagementPort();

    final SetResourcesSkillsElement req = new SetResourcesSkillsElement();

    final AuthNodeElement user = new AuthNodeElement();

    user.setNow("2017-01-01T00:00:00Z");

    user.setLogin("SampleLogin");

    user.setCompany("SampleCompany");

    user.setAuthString("f3a904e1b89e0433f4f9f4a453370f44c3791d632f8ba50757301ba46f11047f");

    req.setUser(user);

    final SkillList skills = new SkillList();

    final SkillElement skill = new SkillElement();

    final TextPropertiesElement props = new TextPropertiesElement();

    final TextPropertyElement resourceId = new TextPropertyElement();

    resourceId.setName("resource_id");

    resourceId.setValue("SampleResource");

    props.getProperty().add(resourceId);

    final TextPropertyElement skill2 = new TextPropertyElement();

    skill2.setName("skill");

    skill2.setValue("SampleWorkSkill");

    props.getProperty().add(skill2);

    final TextPropertyElement ratio = new TextPropertyElement();

    ratio.setName("ratio");

    ratio.setValue("1");

    props.getProperty().add(ratio);

    skill.setProperties(props);

    skills.getSkill().add(skill);

    req.setSkills(skills);

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

}

How to Get Resource Work Zones in the Oracle Field Service Cloud with the Resource Management API with Java

import static java.lang.System.out;

import toatech.resourcemanagement._1.AuthNodeElement;
import toatech.resourcemanagement._1.GetResourcesParamsElement;
import toatech.resourcemanagement._1.GetResourcesParamsList;
import toatech.resourcemanagement._1.GetResourcesZonesElement;
import toatech.resourcemanagement._1.ResourceManagementPort;
import toatech.resourcemanagement._1.ResourceManagementService;

public final class OfscSample {

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

    final ResourceManagementPort port = service.getResourceManagementPort();

    final GetResourcesZonesElement req = new GetResourcesZonesElement();

    final AuthNodeElement user = new AuthNodeElement();

    user.setNow("2017-01-01T00:00:00Z");

    user.setLogin("SampleLogin");

    user.setCompany("SampleCompany");

    user.setAuthString("f3a904e1b89e0433f4f9f4a453370f44c3791d632f8ba50757301ba46f11047f");

    req.setUser(user);

    final GetResourcesParamsList resources = new GetResourcesParamsList();

    final GetResourcesParamsElement resource = new GetResourcesParamsElement();

    resource.setDate("2017-01-01");

    resource.setResourceId("SampleResource");

    resources.getResource().add(resource);

    req.setResources(resources);

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

}

How to Set Resource Work Zones in the Oracle Field Service Cloud with the Resource Management API with Java

import static java.lang.System.out;

import toatech.resourcemanagement._1.AuthNodeElement;
import toatech.resourcemanagement._1.ResourceManagementPort;
import toatech.resourcemanagement._1.ResourceManagementService;
import toatech.resourcemanagement._1.SetResourcesZonesElement;
import toatech.resourcemanagement._1.TextPropertiesElement;
import toatech.resourcemanagement._1.TextPropertyElement;
import toatech.resourcemanagement._1.ZoneElement;
import toatech.resourcemanagement._1.ZoneList;

public final class OfscSample {

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

    final ResourceManagementPort port = service.getResourceManagementPort();

    final SetResourcesZonesElement req = new SetResourcesZonesElement();

    final AuthNodeElement user = new AuthNodeElement();

    user.setNow("2017-01-01T00:00:00Z");

    user.setLogin("SampleLogin");

    user.setCompany("SampleCompany");

    user.setAuthString("f3a904e1b89e0433f4f9f4a453370f44c3791d632f8ba50757301ba46f11047f");

    req.setUser(user);

    final ZoneList zones = new ZoneList();

    final ZoneElement zone = new ZoneElement();

    final TextPropertiesElement props = new TextPropertiesElement();

    final TextPropertyElement date = new TextPropertyElement();

    date.setName("date");

    date.setValue("2017-01-01");

    props.getProperty().add(date);

    final TextPropertyElement resourceId = new TextPropertyElement();

    resourceId.setName("resource_id");

    resourceId.setValue("1");

    props.getProperty().add(resourceId);

    final TextPropertyElement zone2 = new TextPropertyElement();

    zone2.setName("zone");

    zone2.setValue("Sample Work Zone");

    props.getProperty().add(zone2);

    final TextPropertyElement ratio = new TextPropertyElement();

    ratio.setName("ratio");

    ratio.setValue("1");

    props.getProperty().add(ratio);

    zone.setProperties(props);

    zones.getZone().add(zone);

    req.setZones(zones);

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

}

How to Get Resource Calendars in the Oracle Field Service Cloud with the Resource Management API with Java

import static java.lang.System.out;

import toatech.resourcemanagement._1.AuthNodeElement;
import toatech.resourcemanagement._1.GetResourcesCalendarsElement;
import toatech.resourcemanagement._1.GetResourcesParamsElement;
import toatech.resourcemanagement._1.GetResourcesParamsList;
import toatech.resourcemanagement._1.ResourceManagementPort;
import toatech.resourcemanagement._1.ResourceManagementService;

public final class OfscSample {

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

    final ResourceManagementPort port = service.getResourceManagementPort();

    final GetResourcesCalendarsElement req = new GetResourcesCalendarsElement();

    final AuthNodeElement user = new AuthNodeElement();

    user.setNow("2017-01-01T00:00:00Z");

    user.setLogin("SampleLogin");

    user.setCompany("SampleCompany");

    user.setAuthString("f3a904e1b89e0433f4f9f4a453370f44c3791d632f8ba50757301ba46f11047f");

    req.setUser(user);

    final GetResourcesParamsList resources = new GetResourcesParamsList();

    final GetResourcesParamsElement resource = new GetResourcesParamsElement();

    resource.setDate("2017-01-01");

    resource.setResourceId("SampleResource");

    resources.getResource().add(resource);

    req.setResources(resources);

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

}