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("2017-01-01T00:00:00Z");

    user.setLogin("SampleLogin");

    user.setCompany("SampleCompany");

    user.setAuthString("f3a904e1b89e0433f4f9f4a453370f44c3791d632f8ba50757301ba46f11047f");

    req.setUser(user);

    req.setActivityId("1");

    final RequiredInventory requiredInventory = new RequiredInventory();

    requiredInventory.setType("SampleType");

    requiredInventory.setQuantity("1");

    req.getRequiredInventory().add(requiredInventory);

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

}
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s