Update BP Record with Attachment
PUT /ws/rest/service/v2/bp/record/file
Purpose
Update a record with attachments for the following types of BPs:
- Shell-level BPs based on a project_number
- Company-level BPs if the project/shell number is not provided
This REST service uses the Step form to update the BP record. All required fields and validation rules run against the Step form used in the workflow details. The form in the End step is a View Form, and cannot be updated.
Notes:
- Only one record update with attachment is supported in this call.
- For Document-type BPs, new attachments can be added to existing line items only in the Custom Detail Form. If the attachment already exists for a record, it will be ignored and will not get revised.
Prerequisite
To add attachments to line item records, ensure you have selected the Allow Attachments to Line Items checkbox for only Custom Detail Form in uDesigner.
Request Format
All parameters should be URL encoded. Both input & output in JSON format in the body.
Notes:
- If the file exists in a record, that file will be ignored and will not get revised.
- If step form has "add attachment" disabled, files will not get attached.
- If the "_attachment" (outside data list) for zip file is not provided, the record will be updated without attachment.
- Field properties such as Read-only in step form will be retained. The Field mandatory in step form must be present in Integration Form with the direction set as "both" or "input".
- Field direction provided in Integration form will be retained.
- 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 exist; if the "project_number" is not provided, the records are from Company Level.
- The "record_no" is mandatory and is a part of data.
- The "bpname" is mandatory and is a part of options form parameter.
- If a Workflow BP record is already accepted by an assignee, 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 WFCurrentStepName and WFActionName are provided, the record will be updated and sent to next step of the workflow. If the values for WFCurrentStepName and WFActionName are not provided, the record will be updated but it will remain on the same workflow step.
- The LineItemIdentifier is part of options form parameter. The LineItemIdentifier value will be DE name present in the lineItem. That DE should be present in "data" (input record JSON) with its value.
- If data elements are set to auto-populate from Base Commit as well as auto-populate from SOV in the payment business process standard line items, then the values from Base commit takes precedence for auto-population. Also, the auto-populate from Base Commit or Change commit takes precedence in payment line items if 0 or no value is provided via integration.
- The "Enable Step for Integration" option in the Workflow BP setup is not available for the REST integration.
- BP records will be created successfully:
- If a single user with a specific First Name and Last Name exists in a project with a status of Active/On-hold.
- If multiple users exist with identical First Name and Last Name, but only one user's status is Active/On-hold while all other users have an Inactive status.
- BP records will not be created if multiple users exist with identical First Name and Last Name, with a status of Active/On-hold/Inactive.
If files from the Document Manager (DM) need to be attached, the field "_attachment_from_dm" must be used. Within that field, a string of comma separated file IDs for the relevant DM files must be provided to the "dm_file_ids" field. Up to 50 files can be attached from the DM at the record and each line item level. Text Type BPs are not currently supported. Validations performed for attaching files from the DM using file IDs include:
- If you have the appropriate DM permissions.
- If the string provided to field "dm_file_ids" is a string of comma separated file IDs.
- If the file IDs provided are valid.
- Record and line item each have up to 50 files attached from the DM.
- Example input field:
"_attachment_from_dm":{"dm_file_ids":"123,345"}
Behavior of the Due Date (due_date) Field
When you create workflow BP records through a REST service, the system currently sets the Due Date automatically based on the Workflow Settings; the Due Date provided in the input request is ignored.
When you update workflow BP records through a REST service, you cannot change the Due Date.
Response Format
A JSON object is returned in the following format.
{
"data": [],
"message": [],
"status": <REST status code value>
}
A successful response displays a status code 200.
A failed response displays a message with a status code.
Sample Request
{
"options":{
"project_number" : "P-0002",
"bpname":"line6",
"LineItemIdentifier":"upwoLISAS",
"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",
"_attachment_from_dm": {
"dm_file_ids": "115"
}
}
],
"record_no":"uxli6-0020",
"title":"new title",
"_attachment":[
{
"file_name":"file_1.txt",
"title":"file_title1",
"issue_date":"05/06/2018",
"revision_no":"300"
},
{
"file_name":"file_2.txt",
"title":"file_title2",
"issue_date":"05/06/2018",
"revision_no":"200"
}
],
"_attachment_from_dm": {
"dm_file_ids": "114"
}
}
],
"_attachment":
{
"zipped_file_name" : "zip_file_name.zip",
"zipped_file_size": "746089",
"zipped_file_content" :"<base64_encoded string of create.zip file>"
}
}
Adding LineItemIdentifier in the BP Design
To add LineItemIdentifier in the BP design:
- Create a custom DE with DD: Sys Auto Sequence.
- Add this DE to the Detail Form of the BP with the line items that need to be updated.
- Go to the Company Workspace tab and switch to Admin mode.
- In the left Navigator, select uDesigner, and then select Business Processes.
- Open the BP.
- From the toolbar, click Open, and select Data Elements to open the Data Elements Configuration window.
- Click the 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.
- Add the parameter "Sys Sequence counter" and click OK.
- Select Integration, select Detail, and then add the DE.
- Set the "Direction" to "Both" for that DE.
- Complete and deploy the BP.
- In the body of the request, add the 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"
}
]
}
Sample Success Response
{
"data":[
],
"message":[
{
"_record_status":"success",
"record":{
"ugenUserIDPK":null,
"record_no":"uxli6-0021",
"title":"title_m112244"
}
}
],
"status":200
}
Sample Failed Response
If zip_file_size of uploaded zip file is not correct, a status code and message displays in the following format:
{
"data": [],
"message": [ "Uploaded Zip file is invalid" ],
"status": 3003
}
Data Elements in Line Items
If the following Data Elements are present in the Line Items, they will not be updated.
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
Related Topics
Create BP Record with Attachment
Payment Application with Auto-populate from SOV and Commits
Add Assignees to Workflow BP Records
Task Reassignment of Workflow Records
Bulk Reverse Auto-populate Records
Get Schedule of Values (SOVs) For Base Commit Type BPs
Terminate Workflow and Non-Workflow BP Records
Last Published Wednesday, April 9, 2025