Agile PLM API create relationship between items Invalid Parameter

0 votes

I'm developing an scala application using Agile PLM API. Everything works so far, adding attachments, adding BOM items, creating items and so on.

But when creating Relationships in the Relationship Table, I always get this error:

com.agile.api.APIException: Invalid parameter.
  at com.agile.api.pc.Session.createError(Session.java:2039)
  at com.agile.api.pc.APIObject.createError(APIObject.java:76)
  at com.agile.api.pc.TableRelationships.convertCreateParamMapToVOCells(TableRelationships.java:92)
  at com.agile.api.pc.TablePC.doCreateServerRowWithParam(TablePC.java:58)
  at com.agile.api.pc.Table.createTableRow(Table.java:267)
  at com.agile.api.pc.Table.createRow(Table.java:231)

The Agile API requires a hashmap with attributes and values as parameter to create the relationship. So this is my code:

val cells: java.utils.Map[_, _] = Map(
    Attrs.Items.Relationships.CriteriaMet -> null,
    Attrs.Items.Relationships.TypeImage -> 666, // id of item type as Integer
    Attrs.Items.Relationships.Name -> "foo", // name as String
    Attrs.Items.Relationships.Description -> "bar", // the description as String
    Attrs.Items.Relationships.CurrentStatus -> "Production", // lifecyclephase 'Production' as a String
    Attrs.Items.Relationships.Rule -> null,
    Attrs.Items.Relationships.Type -> 600 // id of item type as Integer
) 

relationshipTable.createRow(cells)

The relationshipTable instance is of type ITable and this kind of Map is working for adding BOM items and attachments, so I think this is not the issue here.

I simply queried the cells of existing relationships manually and compared their key with my constants used in this map and they are the same. I really don't know what the invalid parameter is. Is there an attribute missing? Is the type of an parameter wrong? There is no indication what's wrong.

Apr 13, 2022 in PMP by Edureka
• 13,690 points
582 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In PMP

0 votes
1 answer

Differences between Agile, Incremental and Waterfall development model?

In the software business, the Waterfall and ...READ MORE

answered Apr 13, 2022 in PMP by gaurav
• 23,260 points
1,487 views
0 votes
0 answers

Differences between Agile, Incremental and Waterfall development model?

What is the key difference between agile ...READ MORE

Apr 13, 2022 in PMP by Edureka
• 13,690 points
423 views
0 votes
1 answer

What is the difference between Scrum and Agile Development?

Agile is a broad philosophy of software ...READ MORE

answered Jun 27, 2023 in PMP by Khan Sarfaraz
• 700 points
454 views
0 votes
0 answers

What is the difference between testing and UAT in agile scrum process?

I have been a QE for 4 ...READ MORE

Apr 18, 2022 in PMP by Edureka
• 13,690 points
502 views
0 votes
0 answers

Difference between agile and iterative and incremental development

What are the difference between Agile and ...READ MORE

Apr 18, 2022 in PMP by Edureka
• 13,690 points
427 views
0 votes
0 answers

difference between agile model and spiral model

Can anyone explain me the differences between ...READ MORE

Apr 20, 2022 in PMP by Edureka
• 13,690 points
889 views
0 votes
0 answers

What is the difference between a User Story and a Feature in Agile terminology?

I guess a feature could be something ...READ MORE

Apr 20, 2022 in PMP by Edureka
• 13,690 points
415 views
0 votes
0 answers

What’s the biggest difference between Agile and Waterfall?

What’s the biggest difference between Agile and ...READ MORE

3 days ago in PMP by Hoor
• 1,420 points
22 views
0 votes
1 answer
0 votes
1 answer

What is Agile Project Management?

Agile methodology is an incremental and iterative ...READ MORE

answered Jul 24, 2020 in PMP by Sirajul
• 59,230 points
706 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP