PUT /ws/rest/service/v2/bp/record
Purpose:
Update a record in a specific BP in a shell based on "project_number" (provided in input JSON options) or from Company level if the project or shell number is not provided.
The input json shall provide various options to be considered for fetching the data.
This V2 service will use the step form to update the BP record. All of the required fields and Validation rules will be run against the step form used in the workflow details.
Form in the End step is a View Form and cannot be updated.
Input:
All parameters should be URL encoded.
Both input & output in JSON format in the body.
Update BP Record Input
{
"options":{
"project_number" : "P-0002",
"bpname":"line6",
"LineItemIdentifier":"upwoLISAS",
"optimizedPickerExecution" : "true",
"workflow_details":{
"WFCurrentStepName":"Step 4",
"WFActionName":"Line 3"
}
},
"data":[
{
"ugenUserIDPK":null,
"_bp_lineitems":[
{
"ugenShellPK":"/AP1",
"uuu_tab_id":"Standard",
"short_desc":"desc3_m11",
"upwoLISAS":"0001",
"uuu_line_item_status":"Active"
}
],
"record_no":"uxli6-0020",
"title":"new title"
}
]
}
Notes:
- Field properties such as Read-only in step form will be honored. The Field mandatory in step form must be present in the Integration Form with direction set as "both" or "input".
- The Field direction provided in the Integration form will be honored.
- Auto-Creation setting is mandatory in Shell or Company BP Setup in Admin mode.
- In input JSON options, the "project_number" specifies the shell in which the records exists, if the "project_number" is not provided, then the records are considered to be from Company Level.
- The "record_no" is mandatory and is part of data.
- The "bpname" is mandatory and is part of options form parameter.
- If a Workflow BP record is already accepted by an assignee, then the Update REST call will fail with error message: Record has already been accepted by Task Assignee.
- The WFCurrentStepName and WFActionName are part of the "workflow_details" and are for Workflow-type BPs. If the values for the WFCurrentStepName and WFActionName are provided, then the record will be updated and sent to the next step of the workflow. If the values for the WFCurrentStepName and WFActionName are not provided, then the record will be updated but will remain in same workflow step.
- The LineItemIdentifier is a part of options form parameter. The LineItemIdentifier value will be the DE name present in the lineItem. The DE name present in the lineItem should be present in the "data" (input record JSON ) with its value.
- The optimizedPickerExecution is a part of the options form parameter. The optimizedPickerExecution controls the pickers 'populate' execution, on the existing line items. The values can be True or False.
When the value is True, the Upper Form, or the Lineitem Form, input JSON is required to send the Datapicker DE tag (with values) to trigger 'populate' on the other DEs that are configured per design. If the input JSON does not contain the Datapicker DE property, the system will not process the Datapicker DE as a part of the update to 'populate' the values from the data picker record to the current record and lineitems that get updated.
When the value is False, or non-existent, the system will continue to process according to the existing behavior.
Steps to add LineItemIdentifier in the BP design:
- Create a custom DE whose Data definition is 'Sys Auto Sequence'.
- Add this DE to the detail form of the BP whose line items needs to be updated.
- Navigate to Company Workspace > Business Processes and open the BP.
- Navigate to the BP-Home > click Open drop-down > Data Elements. A data element configuration screen appears
- Click on Auto Sequence tab and click Add.
- Select the Data element added in the detail form and select the level as 'Per record'.
- Provide the start value and click Create (next to format), add the parameter 'Sys Sequence counter', and click OK.
- Add the DE to Integration > Detail and select "Direction" to "Both" for the DE.
- Complete and deploy the BP.
- In the body of the request add this DE name as Lineitem identifier and send the request.
Delete the Line-Item, using Update Request:
To delete the line-Item using update request, the field "_delete_line_item" should be used (value of which will be comma separated values of LineItemIdentifier DE) as shown in the following example:
Sample: Delete line-item input
{
"options":{
"project_number" : "P-0002",
"bpname":"line6",
"LineItemIdentifier":"upwoLISAS"
},
"data":[
{
"ugenUserIDPK":null,
"_delete_bp_lineitems":"0002,0001,0003",
"record_no":"uxli6-0021",
"title":"title_m112244"
}
]
}
Output:
JSON object containing 'status', 'data', 'message'
A message will be present if status is not 200 .
Status codes are:
1>200 OK, if all update succeeds.
2>3000, if any of records update fails.
Sample: Update BP Record Response
{
"data": [],
"message": [
{
"_record_status": "success",
"record": {
"ugenUserIDPK": null,
"record_no": "uxli6-0021",
"title": "title_m112244"
}
}
],
"status": 200
}
Data Elements in Line Items
If the following Data Elements are present in the Line Items, they will not be updated during UpdateRecordV2 call.
bitemid
budgetid
sovitemid
uuu_cm0_picker
xid
ds_code
fsm_lineitem_id
asm_lineitem_id
uuu_lat
uuu_long
uuu_company_account_name
uuu_company_account_code
uuu_company_acc_codepicker
uuu_activity_picker
uuu_asset_picker
ref_bpo_lineitem
ref_bpo
ref_rfb
refid
uuu_sovlinum
otherCompanyID
uuu_costcode_picker
scheduled_value
uuu_asset_cum_depreciation
uuu_asset_curr_period_dep
uuu_asset_net_book_value
uuu_unit_price
currencyid
due_date
uuu_asset_calc_as_of_date
uuu_from_date
uuu_issue_date
uuu_last_update_date
uuu_rfb_due_date
uuu_to_date
uuu_week_picker
uuu_datasource
uuu_depreciation_mtd
uuu_line_item_status
row_id
uuu_bid_count
uuu_bidders_count
uuu_planning_item_picker
uuu_proj_picker
record_no
uuu_resc_picker
uuu_role_picker
uuu_commit_short_desc
end_date
uuu_creation_date
uuu_asset_name
uuu_commit_breakdown
uuu_asset_code
uuu_asset_navigation_code
uuu_timescale_units
creator_id
wpid
uuu_cost_costattribute
uuu_cost_external_refid
uuu_cost_status
uuu_cost_cost_type
uuu_cost_description
uuu_cost_item
uuu_cost_owner
uuu_cost_code
uuu_dm_create_date
uuu_file_create_date
uuu_file_issue_date
uuu_dm_percent_complete
uuu_file_size
uuu_file_version
uuu_dm_description
uuu_dm_node_path
uuu_dm_node_name
uuu_file_revision_no
uuu_file_title
uuu_dm_create_by
uuu_file_create_by
uuu_fund_fundcategory
uuu_fund_long_desc
uuu_fund_description
uuu_fund_fundname
uuu_fund_code
uuu_description
uuu_resc_nwd_type
uuu_resc_interest
uuu_resc_proficiency
uuu_resc_skill
uuu_role_status
uuu_role_name
uuu_resc_capacity
uuu_user_address
uuu_user_city
uuu_user_country
uuu_user_email
uuu_user_fax
uuu_user_firstname
uuu_user_homephone
uuu_user_lastname
uuu_user_mobilephone
uuu_user_pager
uuu_user_state
uuu_user_timezone
uuu_user_title
uuu_user_workphone
uuu_user_zip
uuu_resc_status
uuu_resc_code
uuu_resc_name
uuu_early_finish
uuu_early_start,uuu_finish
uuu_late_finish
uuu_late_start
uuu_start
uuu_act_pct_complete
uuu_activity_work_hrs
uuu_duration
uuu_fixed_cost
uuu_float
uuu_labor_cost
uuu_non_labor_cost
uuu_total_cost
uuu_activity_id
uuu_flag_complete
uuu_flag_milestone
uuu_activity_resources
uuu_dependency_type
uuu_activity_name
uuu_outline_code
uuu_cost_li_type