As mentioned previously in this document, there are multiple fields that need to be set with a value in order to Add the object. These include all of the required fields listed in the AddXXXMessages.java file. You need to view the Message file to make sure that you are setting all the correct fields to the required value. The following is an example of how to add a Project:
ProjectBean project = new ProjectBean();
project.setName("Project Name");
// All of these fields must be set to some value, but NULL or empty
project.setCategoryID(_intNull);
project.setScheduleID(_intNull);
project.setTemplateID(_intNull);
// The planned start date is required.
project.setPlannedStartDate(new GregorianCalendar());
Additionally, there are many fields in @task that require a Enumerated String value. These include fields that are dropdowns. In this example the value of status is set directly by passing in "CUR".
// This field is also required and must use one of the values listed
// in the provided Javadoc documentation.
project.setCompletionType("MAN");
project.setUpdateType("AUTO");
// Create the project and store its ID.
LOG.info("Creating a project");