21
Points
Questions
0
Answers
2
-
Hi Brett,
If you want to get the attribute details you need to :
1. Load the affected item table in SDK
2. Iterate the Table
3. For each iteration you can fetch details of each attachment row.For example: Suppose you have loaded your current PSR object as
IServiceRequest psrObj = (IServiceRequest) agileSession.getObject(ServiceRequestConstants.CLASS_PRODUCT_SERVICE_REQUEST_BASE_CLASS, arg1);
Now load the attachement table as:
ITable attachmentTab=psrObj.getTable(ServiceRequestConstants.TABLE_AFFECTEDITEMS);
Now iterate the table to get the table rows, for each iteration you can extract the details as per your requirement:
Iterator itr=attachmentTab.getTableIterator();
while (itr.hasNext()) {
IRow row=(IRow) itr.next();
String fileName= row.getValue(ServiceRequestConstants.ATT_ATTACHMENTS_FILE_NAME).toString();
String fileType= row.getValue(ServiceRequestConstants.ATT_ATTACHMENTS_FILE_TYPE).toString();
String checkInUser=row.getValue(ServiceRequestConstants.ATT_ATTACHMENTS_CHECKIN_USER).toString();…… and so on
}- 1621 views
- 2 answers
- 0 votes
-
1. Use groovy script to get Parent and Child attributes and create a Script Px event handler.
2. Check your condition in Script px code and if it fails use AgileDSLException to prevent it from moving to next state.
For ex: throw new AgileDSLException (“Your Message that you want to show as a banner in agile screen when user tries to move the ECO to Submit from Pending”);3. Use Event type ‘Change Status’ event.
4. In event subscriber set the error handling rule to ‘Stop‘ and execution mode must be in ‘Pre‘ state.
- 1860 views
- 4 answers
- 0 votes