3 Working with Engineering Work Orders

This chapter provides information about the Engineering Work Order (EWO) APIs.

Creating a Work Order (createWorkOrder)

This API supports creation of an Engineering Work Order based on the input data provided. This API also supports creation of an Engineering Work Order with user data.

EJB API Call

WorkOrderManagerRemote.createWorkOrder (User user, WorkOrder workOrder)

Container Object

com.metasolv.value.order.WorkOrder

Return Object Type from API

com.mslv.ejb.EJBReturn

To obtain the API output, use the following methods in the return object:

  • getReturnObject(): Returns the successfully created work order.

  • getMessages(): Returns a list of error messages in the form of a vector.

Input Parameters for the API

Table 3-1 shows the input parameters for the API.

Table 3-1 Input Parameters for the API

Input Parameter Parameter Information

user

Data Type: com.mslv.ejb.User

Description: Contains user information.

This parameter is mandatory.

workOrder

Data Type: com.metasolv.value.order.WorkOrder

Description: Contains information to create an Engineering Work Order.

This parameter is mandatory.


Many of these Java objects are not instantiated directly. Instead, you create these objects using the factory objects like GenericFactory. Sample code creating objects using the factory methods is shown in Example 3-1.

Table 3-2 lists the input parameters that you set in the WorkOrder container object. Each parameter in the table indicates whether it is optional or mandatory in the container object for this API.

Table 3-2 WorkOrder Input Parameters

Input Parameter Parameter Information

documentNumber

Data Type: int

Description: Document number of the order. For new orders the business logic generates this parameter. This value should be zero for a create.

This parameter is optional.

description

Data Type: String

Description: Description provided for the order.

This parameter is optional.

dueDate

Data Type: java.util.Calendar

Description: Due date of the order. If this is provided then it cannot be in the past.

This parameter is optional. If this parameters is not provided this field will be set to the current date.

projectKey

Data Type: com.metasolv.value.EntityKey

Description: Project ID of the order.

This parameter is optional.

referenceId

Data Type: String

Description: Reference ID of the order.

This parameter is optional.

responsiblePerson

Data Type: String

Description: Responsible person name of the order.

This parameter is optional.

status

Data Type: com.metasolv.value.WorkOrderStatus

Description: Status of the order.

This parameter is mandatory.

orderNumber

Data Type: String

Description: The order number. If this parameter is populated, it must be unique, for example, no other EWOs exist with the same work order number. Also, the length must not exceed 17 characters. If this parameter is not input, it is automatically generated by the application.

This parameter is optional.

isAutoWorkOrder

Note: This parameter is obsolete.

Data Type: boolean

Description: This parameter is obsolete and must be set to false.

This parameter is optional.


Sample Data for Input Parameters

Example 3-1 is an example of the data values you must set for the input parameters to create an Engineering Work Order.

Example 3-1 Data Values for Input Parameters

protected static ValueFactory valueFact;
private ValidValueAccessManager validValueAccessManager;

// create the value factory                      
valueFact = GenericFactory.makeValueFactory();

// create the valid value access manager
validValueAccessManager = GenericFactory.makeValidValueAccessManager(userContext);

// create the work order object using the value factory.
WorkOrder wo = (WorkOrder)valueFact.makeInstance(WorkOrder.class);

// specify the order number
wo.setOrderNumber("RS EWO API12");

// specify the due date
wo.setDueDate(Calendar.getInstance());

// specify the description
wo.setDescription("RS API Created EWO12");

// specify the responsible person
wo.setResponsiblePerson("RSMITH");
 
// specify the reference id
wo.setReferenceId("Ref Id");

// create the status object
WorkOrderStatus woStatus = validValueAccessManager.getValue(WorkOrderStatus.TYPE,WorkOrderStatus.IN_PROGRESS);

// specify the status
wo.setStatus(woStatus);
 
// creating the project key object using the value factory and 
// setting the values in it.
ProjectKey proKey = (ProjectKey) valueFact.makeInstance(ProjectKey.class);
proKey.setDocumentNumber(638178);

Updating a Work Order (updateWorkOrder)

This API supports updating of an existing Engineering Work Order based on the input data provided.

EJB API Call

WorkOrderManagerRemote.updateWorkOrder (User user, WorkOrder workOrder)

Container Object

com.metasolv.value.order.WorkOrder

Return Object Type from API

com.mslv.ejb.EJBReturn

To obtain the API output, use the following methods in the return object:

  • getReturnObject(): Returns the successfully updated work order.

  • getMessages(): Returns a list of error messages in the form of a vector.

Input Parameters for the API

Table 3-3 shows the input parameters for the API.

Table 3-3 Input Parameters for the API

Input Parameter Parameter Information

user

Data Type: com.mslv.ejb.User

Description: Contains user information.

This parameter is mandatory.

workOrder

Data Type: com.metasolv.value.order.WorkOrder

Description: Contains information to create an Engineering Work Order.

This parameter is mandatory.


Table 3-4 lists the input parameters that you set in the WorkOrder container object. Each parameter in the table indicates whether it is optional or mandatory in the container object.

Table 3-4 Input Parameters

Input Parameter Parameter Information

documentNumber

Data Type: int

Description: Document number of the order. This parameter must be provided when updating an existing order.

This parameter is mandatory.

description

Data Type: String

Description: Description provided for the order.

This parameter is optional.

dueDate

Data Type: java.util.Calendar

Description: Due date of the order. If this is provided then it cannot be in the past.

This parameter is optional. If this parameter is not provided, this field will be set to the current date.

supplementType

Data Type: com.metasolv.value.order. WorkOrderSupplementType

Description: The type of the order supplement.

This parameter is optional.

projectKey

Note: This parameter is obsolete.

Data Type: com.metasolv.value.EntityKey

Description: Project ID of the order.

This parameter is optional.

referenceId

Data Type: String

Description: Reference ID of the order.

This parameter is optional.

responsiblePerson

Data Type: String

Description: Responsible person name of the order.

This parameter is optional.

status

Data Type: com.metasolv.value.WorkOrderStatus

Description: Status of the order.

This parameter is optional.

orderNumber

Data Type: String

Description: The order number. If this parameter is populated, it must be unique, for example, no other EWOs exist with the same work order number. Also, the length must not exceed 17 characters.

This parameter is optional.

isAutoWorkOrder

Note: This parameter is obsolete.

Data Type: boolean

Description: This parameter is obsolete and must be set to false.

This parameter is optional.


Sample Data for Input Parameters

Example 3-2 is an example of the data values you must set for the input parameters to update an Engineering Work Order.

Example 3-2 Data Values for Input Parameters

protected static ValueFactory valueFact;
private ValidValueAccessManager validValueAccessManager;
 
// create the value factory
valueFact = GenericFactory.makeValueFactory();
 
// create the valid value access manager
validValueAccessManager = GenericFactory.makeValidValueAccessManager(userContext);
 
// Create the work order object using the value factory.
WorkOrder wo = (WorkOrder) valueFact.makeInstance(WorkOrder.class);
 
// Specify the document number to which we need to update the order
wo.setDocumentNumber(408979);
 
// Specify the order number
wo.setOrderNumber("RS EWO API12");
 
// Specify the due date
wo.setDueDate(Calendar.getInstance());
 
// Specify the description
wo.setDescription("RS API Created EWO12");
 
// Specify the responsible person
wo.setResponsiblePerson("RSMITH");
 
// Specify the reference id
wo.setReferenceId("Ref Id");
 
// Create the supplement type
WorkOrderSupplementType wost = validValueAccessManager.getValue(WorkOrderSupplementType.TYPE, "2");
 
// Specify the supplement type
wo.setSupplementType(wost);

Creating a Work Order Note (createWorkOrderNote)

This API supports the creation of an Engineering Work Order note based on the input data provided.

EJB API Call

WorkOrderManagerRemote.createWorkOrderNote (User user, OrderNote orderNote)

Container Object

com.metasolv.value.order.OrderNote

Return Object Type from API

com.mslv.ejb.EJBReturn

To obtain the API output, use the following methods in the return object:

  • getReturnObject(): Returns the successfully created work order note.

  • getMessages(): Returns a list of error messages in the form of a vector.

Input Parameters for the API

Table 3-5 shows the input parameters for the API.

Table 3-5 Input Parameters for the API

Input Parameter Parameter Information

user

Data Type: com.mslv.ejb.User

Description: Contains user information.

This parameter is mandatory.

orderNote

Data Type: com.metasolv.value.order.OrderNote

Description: Contains information to create an Engineering Work Order Note.

This parameter is mandatory.


Table 3-6 lists the object you need to set within the OrderNote container object.

Table 3-6 Containers To Set Within the OrderNote Container Object

Input Parameter Data Type

orderKey

com.metasolv.value.EntityKey


Table 3-7 lists the input parameters you set in the OrderNote container object. Each parameter in the table indicates whether it is optional or mandatory in the container object for this API.

Table 3-7 Input Parameters for the API

Input Parameter Parameter Information

note

Data Type: String

Description: Note information.

This parameter is mandatory.

dateEntered

Data Type: java.util.Calendar

Description: Date of the note entered.

This parameter is optional. If this parameter is not provided, this field will be set to the current date.

orderKey

Data Type: com.metasolv.value.EntityKey

Description: Order key for the note.

This parameter is mandatory.

noteNumber

Data Type: String

Description: A numerical string reference of the note. You use this when more than one note is associated with the same entity.

This parameter is optional.

systemGeneratedInd

Data Type: String

Description: System indicator of the note. This is for internal use only.

This parameter is internal.

userId

Data Type: String

Description: Userid who created the note.

This parameter is optional.


Sample Data for Input Parameters

Example 3-3 is an example of the data you must set for the input parameters to create an Engineering Work Order note.

Example 3-3 Data Values for Input Parameters

protected static ValueFactory valueFact;
private ValidValueAccessManager validValueAccessManager;

// create the value factory
valueFact = GenericFactory.makeValueFactory();

// create the valid value access manager
validValueAccessManager =
   GenericFactory.makeValidValueAccessManager(userContext);

// create the order key object using the value factory and setting the
// information on it.
OrderKey orderKey = (OrderKey)valueFactory.makeInstance(OrderKey.class);
orderKey.setDocumentNumber(9533773);

// create the order note object using the value factory and setting the
// information on it.
OrderNote orderNote = (OrderNote) valueFact.makeInstance(OrderNote.class);
orderNote.setNote("Test EWO Notes");
orderNote.setNoteNumber("1");
orderNote.setOrderKey(orderKey);
orderNote.setUserId("ASAP");

Updating a Work Order Notes (updateWorkOrderNote)

This API supports updating an Engineering Work Order note based on the input data provided.

EJB API Call

WorkOrderManagerRemote.updateWorkOrderNote (User user, OrderNote orderNote)

Container Object

com.metasolv.value.order.OrderNote

Return Object Type from API

com.mslv.ejb.EJBReturn

To obtain the API output, use the following methods in the return object:

  • getReturnObject(): Returns the successfully updated work order note.

  • getMessages(): Returns a list of error messages in the form of a vector.

Input Parameters for the API

Table 3-8 shows the input parameters for the API.

Table 3-8 Input Parameters for the API

Input Parameter Parameter Information

user

Data Type: com.mslv.ejb.User

Description: Contains user information.

This parameter is mandatory.

orderNote

Data Type: com.metasolv.value.order.OrderNote

Description: Contains information to update an Engineering Work Order Note.

This parameter is mandatory.


Table 3-9 lists the input parameters you set in the OrderNote container object. Each parameter in the table indicates whether it is optional or mandatory in the container object for this API.

Table 3-9 OrderNote Input Parameters

Input Parameter Parameter Information

noteId

Data Type: int

Description: Note ID for the update.

This parameter is mandatory.

note

Data Type: String

Description: Note information.

This parameter is mandatory.

dateEntered

Data Type: java.util.Calendar

Description: Date of the note entered.

This parameter is set by the business logic and if provided is ignored. This is for internal use only.

orderKey

Data Type: com.metasolv.value.EntityKey

Description: Order key of the note.

This parameter is not needed as input because the noteId is used to retrieve the note. This is for internal use only.

noteNumber

Data Type: String

Description: A string reference of the note.

This parameter is optional.

systemGeneratedInd

Data Type: String

Description: System indicator of the note. This is for internal use only.

This parameter is internal.

userId

Data Type: String

Description: Userid who updated the note.

This parameter is optional.


Sample Data for Input Parameters

Example 3-4 is an example of the data you must set for the input parameters to update an Engineering Work Order note.

Example 3-4 Data Values for Input Parameters

protected static ValueFactory valueFact;
// create the value factory
valueFact = GenericFactory.makeValueFactory();
// create the order note object using the value factory and setting the
// information on it.
OrderNote orderNote = (OrderNote) valueFact.makeInstance(OrderNote.class);
orderNote.setNoteId(40124);
orderNote.setNote("Test EWO Notes");

Associating a Connection to a Work Order (associateConnectionToWorkOrder)

This API supports association of a connection to an Engineering Work Order based on the input data provided.

EJB API Call

WorkOrderManagerRemote.associateConnectionToWorkOrder (
   User user, 
   AssociateConnectionToWorkOrderPolicy policy)

Container Object

com.metasolv.value.order.AssociateConnectionToWorkOrderPolicy

Return Object Type from API

com.mslv.ejb.EJBReturn

To obtain the API output, use the following methods in the return object:

  • getReturnObject(): Returns the successfully processed connections.

  • getMessages(): Returns a list of error messages in the form of a vector.

Input Parameters for the API

Table 3-10 shows the input parameters for the API.

Table 3-10 Input Parameters for the API

Input Parameter Parameter Information

user

Data Type: com.mslv.ejb.User

Description: Contains user information.

This parameter is mandatory.

policy

Data Type: com.metasolv.value.order.AssociateConnectionToWorkOrderPolicy

Description: Contains information to associate a connection to an Engineering Work Order.

This parameter is mandatory.


Table 3-11 lists the input parameters you set in the AssociateConnectionToWorkOrderPolicy container object. Each parameter in the table indicates whether it is optional or mandatory in the container object.

Table 3-11 AssociateConnectionToWorkOrderPolicy Input Parameters

Input Parameter Parameter Information

activityCd

Data Type: com.metasolv.value.order.AssociateConnectionToWorkOrderActivityCd

Description: Activity code for the connection on the work order. This is an enumeration with the following values:

  • NEW

  • CHANGE

  • DISCONNECT

  • CANCELED

This parameter is mandatory.

connectionKey

Data Type: com.metasolv.value.resource.entity.connection.ConnectionKey

Description: Key of the connection to be added to the work order. This field is used in the validation to ensure the connection is not already associated to the order.

This parameter is mandatory.

workOrderKey

Data Type: com.metasolv.value.order.WorkOrderKey

Description: Key of the work order to which connection must be added. The order must not be completed or cancelled.

This parameter is mandatory.

mpoSupported

Data Type: boolean

Description: Sets multiple pending order supported indicator.

This parameter is optional.

validateOnly

Data Type: boolean

Description: Sets validate only indicator. When this is true, only the validation logic runs for the connections and no associations are persisted. This validates the following:

  • The connectionKey is populated

  • The connection is not already on the work order

  • The activity code is provided

  • There are no assignments if it is a disconnect order

If the multiple pending order supported parameter is set, then the connection cannot be on any other open work order.

This parameter is optional.

implementationContext

Data Type: com.metasolv.value.ImplementationContext

Description: Sets the implementation context.

This parameter is optional.


Sample Data for Input Parameters

Example 3-5 is an example of the data you set for the input parameters to associate a connection to an existing Engineering Work Order.

Example 3-5 Data Values for Input Parameters

protected static ValueFactory valueFact;
private ValidValueAccessManager validValueAccessManager;

// create the value factory 
valueFact = GenericFactory.makeValueFactory();

// create the valid value access manager
validValueAccessManager = GenericFactory.makeValidValueAccessManager(userContext);

// creating the AssociateConnectionToWorkOrderPolicy object using the value factory.
AssociateConnectionToWorkOrderPolicy assocConnToWoPolicy = (
   AssociateConnectionToWorkOrderPolicy)valueFact.makeInstance(
   AssociateConnectionToWorkOrderPolicy.class);

// creating the work order object using the value factory and 
// setting order number in and setting it to the policy.
WorkOrderKey woKey = (WorkOrderKey)valueFact.makeInstance(WorkOrderKey.class);
woKey.setDocumentNumber(408792);
assocConnToWoPolicy.setWorkOrderKey(woKey);

// creating the connection object using the value factory and 
// setting order number in and setting it to the policy.
ConnectionKey connKey = (ConnectionKey)valueFact.makeInstance(ConnectionKey.class);
connKey.setConnectionId(2047281);
assocConnToWoPolicy.setConnectionKey(connKey);

// specify the MOP supported or not
assocConnToWoPolicy.setMpoSupported(true);

// creating the connection activity code and assigning the same to the policy.
AssociateConnectionToWorkOrderActivityCd assocConnToWoActCd = 
   validValueAccessManager.getValue(
      AssociateConnectionToWorkOrderActivityCd.TYPE, 
      AssociateConnectionToWorkOrderActivityCd.NEW);

assocConnToWoPolicy.setActivityCd(assocConnToWoActCd);

Associating Equipment to a Work Order (associateEquipmentToWorkOrder)

This API supports association of equipment to an Engineering Work Order based on the input data provided.

EJB API Call

WorkOrderManagerRemote.associateEquipmentToWorkOrder (
   User user, 
   AssociateEquipmentToWorkOrderPolicy policy)

Container Object

com.metasolv.value.order.AssociateEquipmentToWorkOrderPolicy

Return Object Type from API

com.mslv.ejb.EJBReturn

To obtain the API output, use the following methods in the return object:

  • getReturnObject(): Returns the array list of successfully associated equipment.

  • getMessages(): Returns a list of error messages in the form of a vector.

Input Parameters for the API

Table 3-12 shows the input parameters for the API.

Table 3-12 Input Parameters for the API

Input Parameter Parameter Information

user

Data Type: com.mslv.ejb.User

Description: Contains user information.

This parameter is mandatory.

policy

Data Type: com.metasolv.value.order.AssociateEquipmentToWorkOrderPolicy

Description: Contains information to associate equipment to an Engineering Work Order.

This parameter is mandatory.


Table 3-13 lists the objects you need to set within the AssociateEquipmentToWorkOrderPolicy container object.

Table 3-13 Containers To Set Within the AssociateEquipmentToWorkOrderPolicy Container Object

Input Parameter Data Type

workOrderKey

com.metasolv.value.EntityKey

equipmentKey

com.metasolv.value.EntityKey

parentEquipmentKey

com.metasolv.value.EntityKey

childEquipmentKey

com.metasolv.value.EntityKey

activityCd

com.metasolv.value.order.AssociateConnectionToWorkOrderActivityCd

implementationContext

com.metasolv.value.ImplementationContext


Table 3-14 lists the input parameters you set in the AssociateEquipmentToWorkOrderPolicy container object. Each parameter in the table indicates whether it is optional or mandatory in the container object.

Table 3-14 AssociateEquipmentToWorkOrderPolicy Input Parameters

Input Parameter Parameter Information

activityCd

Data Type: com.metasolv.value.order.AssociateConnectionToWorkOrderActivityCd

Description: Activity code for the equipment on the work order.

This parameter is mandatory.

equipmentKey

Data Type: com.metasolv.value.EntityKey

Description: Key of the equipment to be added to the work order.

This parameter is mandatory.

parentEquipmentKey

Data Type: com.metasolv.value.EntityKey

Description: Key of the equipment to be added to the work order.

This parameter is optional.

childEquipmentKey

Data Type: com.metasolv.value.EntityKey

Description: Key of the equipment to be added to the work order.

This parameter is optional.

workOrderKey

Data Type: com.metasolv.value.EntityKey

Description: Key of the work order to which equipment must be added.

This parameter is mandatory.

mpoSupported

Data Type: boolean

Description: Sets multiple pending order supported indicator.

This parameter is optional.

validateOnly

Data Type: boolean

Description: Sets validate only indicator. When this is true, only the validation logic runs and no associations are persisted. This validates the following:

  • The work order key is valid

  • The work order is not complete or cancelled

  • The parent and child equipment keys are valid, and the parent equipment key is not in a ”Spare” status

  • The child equipment keys are only populated when the caller does a copy operation (Refer to the Javadoc for more information)

  • The activity code is populated and valid

This parameter is optional.

implementationContext

Data Type: com.metasolv.value.ImplementationContext

Description: Sets the implementation context.

This parameter is optional.


Sample Data for Input Parameters

Example 3-6 is an example of the data you set for the input parameters to associate equipment to an existing Engineering Work Order.

Example 3-6 Data Values for Input Parameters

protected static ValueFactory valueFact;
private ValidValueAccessManager validValueAccessManager;

// create the value factory 
valueFact = GenericFactory.makeValueFactory();

// create the valid value access manager
validValueAccessManager = GenericFactory.makeValidValueAccessManager(userContext);
 
// Creating the AssociateEquipmentToWorkOrderPolicy object using the value factory.
AssociateEquipmentToWorkOrderPolicy assocEquipToWoPolicy = (
   AssociateEquipmentToWorkOrderPolicy)valueFact.makeInstance(
      AssociateEquipmentToWorkOrderPolicy.class);

// Creating the work order object using the value factory and 
// setting order number in and setting it to the policy.
WorkOrderKey woKey = (WorkOrderKey)valueFact.makeInstance(WorkOrderKey.class);
woKey.setDocumentNumber(408792);
assocEquipToWoPolicy.setWorkOrderKey(woKey);
 
// Creating the equipment object using the value factory and 
// setting order number in and setting it to the policy.
EquipmentKey equipKey = (EquipmentKey)valueFact.makeInstance(EquipmentKey.class);
equipKey.setEquipmentId(331534);
assocEquipToWoPolicy.setEquipmentKey(equipKey);
 
// Creating the equipment activity code and assigning the same to the policy.
AssociateEquipmentToWorkOrderActivityCd assocEquipToWoActCd = 
   validValueAccessManager.getValue(
      AssociateEquipmentToWorkOrderActivityCd.TYPE, 
      AssociateEquipmentToWorkOrderActivityCd.NEW_INSTALL);
assocEquipToWoPolicy.setActivityCd(assocEquipToWoActCd);

Adding a Task to a Work Order (addTask)

This API supports assign a task to an Engineering Work Order based on the input data provided.

EJB API Call

WorkManagerRemote.addTask (
   Task task, 
   TaskKey taskKey, 
   AddTaskPolicy policy, 
   User user)

Container Object

com.metasolv.value.work.Task

com.metasolv.value.work.TaskKey

com.metasolv.value.work.AddTaskPolicy

Return Object Type from API

com.mslv.ejb.EJBReturn

To obtain the API output, use the following methods in the return object:

  • getReturnObject(): Returns the array list of successfully processed connections.

  • getMessages(): Returns a list of error messages in the form of a vector.

Input Parameters for the API

Table 3-15 shows the input parameters for the API.

Table 3-15 Input Parameters for the API

Input Parameter Parameter Information

task

Data Type: com.metasolv.value.work.Task

Description: Contains information of a task to associate an Engineering Work Order.

This parameter is mandatory.

taskKey

Data Type: com.metasolv.value.work.TaskKey

Description: Contains information of a task key to associate an Engineering Work Order.

This parameter is mandatory.

policy

Data Type: com.metasolv.value.work.AddTaskPolicy

Description: Contains information of the task policy to associate to an Engineering Work Order.

This parameter is mandatory.

user

Data Type: com.mslv.ejb.User

Description: Contains user information.

This parameter is mandatory.


Table 3-16 lists the input parameters you set in the AddTaskPolicy container object. Each parameter in the table indicates whether it is optional or mandatory in the container object.

Table 3-16 AddTaskPolicy Input Parameters

Input Parameter Parameter Information

addTaskPosition

Data Type: com.metasolv.value.work.AddTaskPosition

Description: Contains the information of task position.

This parameter is mandatory.

returnWorkPlan

Data Type: boolean

Description: Work plan required or not as part of the return object.

This parameter is mandatory.

returnWorkPlanDefinition

Data Type: boolean

Description: Work plan definition required or not as part of the return object.

This parameter is optional.

returnTaskList

Data Type: boolean

Description: Task list required or not as part of the return object.

This parameter is optional.

processRulesAndBehaviors

Data Type: boolean

Description: Flag to determine if rules and behaviors is processed or not.

This parameter is optional.


Table 3-17 lists the object you need to set within the TaskKey container object.

Table 3-17 TaskKey Input Parameters

Input Parameter Parameter Information

orderKey

Data Type: com.metasolv.value.order.OrderKey

Description: Sets the order value.

This parameter is mandatory.

taskId

Data Type: int

Description: Contains the value of the task ID which is the identifier for the task.

This parameter is mandatory.


Table 3-18 lists the objects you must set within the Task container object.

Table 3-18 Containers To Set Within the Task Container Object

Input Parameter Data Type

orderKey

com.metasolv.value.order.OrderKey

taskStatus

com.metasolv.value.work.TaskStatus

taskCriticalDateIndicator

com.metasolv.value.YesNoIndicator

autoCompInd

com.metasolv.value.YesNoIndicator

rejectStatus

com.metasolv.value.YesNoIndicator

queueStatus

com.metasolv.value.work.QueueStatus

smartTaskInd

com.metasolv.value.YesNoIndicator


Table 3-19 lists the input parameters you set in the Task container object. Each parameter in the table indicates whether it is optional or mandatory in the container object.

Table 3-19 Task Input Parameters

Input Parameter Parameter Information

orderKey

Data Type: com.metasolv.value.order.OrderKey

Description: Contains the order number.

This parameter is mandatory.

taskId

Data Type: int

Description: Contains the value of the task ID which is the identifier for the task.

This parameter is mandatory.

taskType

Data Type: String

Description: Contains the task type.

This parameter is optional.

taskStatus

Data Type: com.metasolv.value.work.TaskStatus

Description: Contains the task status.

This parameter is optional.

scheduledCompletionDate

Data Type: java.util.Calendar

Description: Contains the scheduled completion date.

This parameter is optional.

actualReleaseDate

Data Type: java.util.Calendar

Description: Contains the actual release date.

This parameter is optional.

revisedCompletionDate

Data Type: java.util.Calendar

Description: Contains the revised completion date.

This parameter is optional.

estimatedCompletionDate

Data Type: java.util.Calendar

Description: Contains the estimated completion date.

This parameter is optional.

workQueueId

Data Type: String

Description: Contains the work queue name.

This parameter is optional.

actualCompletionDate

Data Type: java.util.Calendar

Description: Contains the actual completion date.

This parameter is optional.

taskCriticalDateIndicator

Data Type: boolean

Description: Contains the task critical date indicator.

This parameter is optional.

taskStatusDate

Data Type: java.util.Calendar

Description: Contains the task status date.

This parameter is optional.

firstJeopardyId

Data Type: int

Description: Contains the first jeopardy id.

This parameter is optional.

autoCompInd

Data Type: com.metasolv.value.YesNoIndicator

Description: Contains auto completion indicator.

This parameter is optional.

rejectStatus

Data Type: com.metasolv.value.YesNoIndicator

Description: Reflects the task reject status.

This parameter is optional.

taskPriority

Data Type: int

Description: Contains the priority of the task.

This parameter is optional.

circuitDesignId

Data Type: int

Description: Contains the circuit design ID assigned to the task.

This parameter is optional.

workQueuePriority

Data Type: int

Description: Contains the work queue priority.

This parameter is optional.

assignedFromWorkQueue

Data Type: String

Description: Indicates whether this task is assigned from the work queue or not.

This parameter is optional.

assignedFromDate

Data Type: java.util.Calendar

Description: Contains the assigned from date.

This parameter is optional.

queueStatus

Data Type: com.metasolv.value.work.QueueStatus

Description: Contains the queue status.

This parameter is optional.

billingStatus

Data Type: char

Description: Contains the billing status.

This parameter is optional.

scheduledReleaseDate

Data Type: java.util.Calendar

Description: Contains the scheduled release date.

This parameter is optional.

sortPriority

Data Type: String

Description: Contains the sort priority.

This parameter is optional.

requiredInd

Data Type: char

Description: Contains the indicator that informs you whether this task is required or not.

This parameter is optional.

systemGenInd

Data Type: char

Description: Contains the indicator that informs you whether this task is system generated or not.

This parameter is optional.

reqPlanId

Data Type: int

Description: Contains the requested plan id.

This parameter is optional.

taskOpenInd

Data Type: char

Description: Contains the indicator that informs you whether this task is opened or not.

This parameter is optional.

jobId

Data Type: int

Description: Contains the job identifier.

This parameter is optional.

sequence

Data Type: int

Description: Contains the task sequence.

This parameter is optional.

taskPrompt

Data Type: char

Description: Contains the task prompt.

This parameter is optional.

assignDtCd

Data Type: char

Description: Contains the assigned date code.

This parameter is optional.

servItemId

Data Type: int

Description: Contains the service item id assigned to the task.

This parameter is optional.

completionDays

Data Type: int

Description: Contains the days taken for the task completion.

This parameter is optional.

completionHours

Data Type: int

Description: Contains the hours taken for the task completion.

This parameter is optional.

completionMinutes

Data Type: int

Description: Contains the minutes taken for the task completion.

This parameter is optional.

potentiallyLateDays

Data Type: int

Description: Contains the number of days that a task is potentially late.

This parameter is optional.

potentialLateHours

Data Type: int

Description: Contains the number of hours that a task is potentially late.

This parameter is optional.

potentialLateMinutes

Data Type: int

Description: Contains the number of minutes that a task is potentially late.

This parameter is optional.

closeOfBusinessInd

Data Type: char

Description: Contains the close of day business indicator.

This parameter is optional.

latePromptInd

Data Type: char

Description: Contains the late prompt indicator.

This parameter is optional.

systemTaskInd

Data Type: char

Description: Indicates whether this task is a system task or not.

This parameter is optional.

taskLabel

Data Type: String

Description: Contains the label of the task.

This parameter is optional.

executionPoint

Data Type: char

Description: Contains the execution point of the task.

This parameter is optional.

dispositionDays

Data Type: int

Description: Contains the number of disposition days.

This parameter is optional.

prevWorkQueueId

Data Type: String

Description: Contains the previous work queue identifier name.

This parameter is optional.

taskOpenedInd

Data Type: char

Description: Indicates whether the task is opened or not.

This parameter is optional.

orderedFacilityIndicator

Data Type: char

Description: Contains the ordered facility indicator.

This parameter is optional.

taskTypeDescription

Data Type: String

Description: Contains the task type description.

This parameter is optional.

transactionOrigin

Data Type: String

Description: Contains the transaction origin.

This parameter is optional.

customerViewable

Data Type: char

Description: Indicates whether this task is viewable by the customer or not.

This parameter is optional.

relatedArea

Data Type: String

Description: Contains the related area of this task.

This parameter is optional.

appointmentTask

Data Type: char

Description: Indicates whether this task is an appointment or not.

This parameter is optional.

graceDays

Data Type: int

Description: Contains the grace days for this task.

This parameter is optional.

exeFileNm

Data Type: String

Description: Contains the executable file name for this task.

This parameter is optional.

graceMinutes

Data Type: int

Description: Contains the number of grace minutes for this task.

This parameter is optional.

graceHours

Data Type: int

Description: Contains the number of grace hours for this task.

This parameter is optional.

smartTaskInd

Data Type: com.metasolv.value.YesNoIndicator

Description: Indicates whether this task is a smart task or not.

This parameter is optional.

validationRequired

Data Type: boolean

Description: Indicates whether any validations are performed for this task or not.

This parameter is optional.

windowNm

Data Type: String

Description: Contains the window name for this task.

This parameter is optional.

combinSmartSysInd

Data Type: char

Description: Indicates whether the smart task and the system task can be combined or not.

This parameter is optional.

toolNm

Data Type: String

Description: Contains the tool name for this task.

This parameter is optional.

hasAccess

Note: This parameter is not used in the web service operation.

Data Type: boolean

Description: Indicates whether this task has access or not.

This parameter is optional.


Sample Data for Input Parameters

Example 3-7 is an example of the data you set for the input parameters to associate a task to a existing Engineering Work Order.

Example 3-7 Data Values for Input Parameters

protected static ValueFactory valueFact;
private ValidValueAccessManager validValueAccessManager;

// Create the value factory
valueFact = GenericFactory.makeValueFactory();

// Create the valid value access manager
validValueAccessManager =
   GenericFactory.makeValidValueAccessManager(userContext);

// Creating the WorkPlanAssignmentPolicy object using the value factory and
// setting the values in it.
WorkPlanAssignmentPolicy workPlanAssignPolicy = (WorkPlanAssignmentPolicy)
   valueFactory.makeInstance(WorkPlanAssignmentPolicy.class);
workPlanAssignPolicy.setReturnTaskList(true);
workPlanAssignPolicy.setReturnWorkPlan(true);
workPlanAssignPolicy.setReturnWorkPlanDefinition(true);
workPlanAssignPolicy.setProcessRulesAndBehaviors(true);

// Creating the work WorkPlanDefinitionKey object using the 
// value factory and setting the values in it.
WorkPlanDefinitionKey workPlanDefKey= (WorkPlanDefinitionKey)
   valueFactory.makeInstance(WorkPlanDefinitionKey.class);
workPlanDefKey.setWorkPlanDefinitionId(28917);

// Creating the order key object using the value factory and setting the
// values in it.
OrderKey orderKey = (OrderKey)valueFactory.makeInstance(OrderKey.class);
orderKey.setDocumentNumber(14549413);

// Creating the task object and setting the values in it.
Task taskToInsert= (Task) valueFactory.makeInstance(Task.class);
taskToInsert.setCompletionDays(1);
taskToInsert.setTaskType("APP");
taskToInsert.setWorkQueueId("ISR_CORD");
// Creating the task key object and setting the values in it.
TaskKey taskKey= (TaskKey) valueFactory.makeInstance(TaskKey.class);
taskKey.setTaskId(54868178);
taskKey.setOrderKey(orderKey);

// Creating the add task policy object and setting the values in it.
AddTaskPolicy taskPolicy= (AddTaskPolicy)
   valueFactory.makeInstance(AddTaskPolicy.class);
taskPolicy.setReturnTaskList(true);
taskPolicy.setReturnWorkPlan(true);
taskPolicy.setReturnWorkPlanDefinition(true);
taskPolicy.setAddTaskPosition(validValueAccessManager.getValue(
   AddTaskPosition.TYPE , 5));

Supplementing a Work Order (processDDChangeSupplement)

This API supports process supplementing of an Engineering Work Order based on the input data provided.

EJB API Call

WorkOrderManagerRemote.processDDChangeSupplement (
   User user, 
   WorkOrder workOrder,
   String suppNote)

Container Object

com.metasolv.value.order.WorkOrder

Return Object Type from API

com.mslv.ejb.EJBReturn

To obtain the API output, use the following methods in the return object:

  • getReturnObject(): Returns the processed work order.

  • getMessages(): Returns a list of error messages in the form of a vector.

Input Parameters for the API

Table 3-20 shows the input parameters for the API.

Table 3-20 Input Parameters for the API

Input Parameter Parameter Information

user

Data Type: com.mslv.ejb.User

Description: Contains user information.

This parameter is mandatory.

workOrder

Data Type: com.metasolv.value.order.WorkOrder

Description: Contains information to supplement an Engineering Work Order.

This parameter is mandatory.

suppNote

Data Type: String

Description: Contains the supplement note information.

This parameter is mandatory.


Table 3-21 lists the input parameters you set in the WorkOrder container object. Each parameter in the table indicates whether it is optional or mandatory in the container object.

Table 3-21 WorkOrder Input Parameters

Input Parameter Parameter Information

documentNumber

Data Type: int

Description: Document number of the order. This field must be provided only when updating an existing order. For new orders this is going to be created automatically.

This parameter is mandatory.

description

Data Type: String

Description: Description provided for the order.

This parameter is optional.

dueDate

Data Type: java.util.Calendar

Description: Due date of the order. If this is provided then it cannot be in the past.

This parameter is optional. If this parameter is not provided, this field will be set to the current date.

projectKey

Note: This parameter is obsolete.

Data Type: com.metasolv.value.EntityKey

Description: Project ID of the order.

This parameter is optional.

referenceId

Data Type: String

Description: Reference ID of the order.

This parameter is optional.

responsiblePerson

Data Type: String

Description: Responsible person name of the order.

This parameter is optional.

status

Data Type: com.metasolv.value.WorkOrderStatus

Description: Status of the order.

This parameter is mandatory.

supplementType

Data Type: com.metasolv.value.order.WorkOrderSupplementType

Description: Supplement type of the order. This field must be provided only when updating an existing order by supplementing it. This should not be set for the new orders.

This parameter is optional.

orderNumber

Data Type: String

Description: The order number. If this parameter is populated, it must be unique, for example, no other EWOs exist with the same work order number. Also, the length must not exceed 17 characters.

This parameter is optional.

isAutoWorkOrder

Note: This parameter is obsolete.

Data Type: boolean

Description: This parameter is obsolete and must be set to false.

This parameter is optional.


Sample Data for Input Parameters

Example 3-8 is an example of the data you set for the input parameters to process supplement an existing Engineering Work Order.

Example 3-8 Data Values for Input Parameters

protected static ValueFactory valueFact;
private ValidValueAccessManager validValueAccessManager;
 
// create the value factory
valueFact = GenericFactory.makeValueFactory();
 
// create the valid value access manager
validValueAccessManager = GenericFactory.makeValidValueAccessManager(userContext);
 
// create the work order object using the value factory.
WorkOrder wo = (WorkOrder)valueFact.makeInstance(WorkOrder.class);
 
// setting the document number.
wo.setDocumentNumber(638178);
 
// create the status object using the value factory and 
// setting the values in it.
WorkOrderStatus woStatus = validValueAccessManager.getValue(
   WorkOrderStatus.TYPE,WorkOrderStatus.IN_PROGRESS);
wo.setStatus(woStatus);
 
// create the supplement type object using the value factory and 
// setting the values in it.
WorkOrderSupplementType wost =
   validValueAccessManager.getValue(WorkOrderSupplementType.TYPE, "2");
wo.setSupplementType(wost);