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 in PMP by Edureka
• 9,320 points
26 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 in PMP by Edureka
• 8,820 points
21 views
0 votes
0 answers

Differences between Agile, Incremental and Waterfall development model?

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

Apr 13 in PMP by Edureka
• 9,320 points
22 views
0 votes
0 answers

What is the difference between Scrum and Agile Development?

What is the difference between Scrum and ...READ MORE

Apr 13 in PMP by Edureka
• 9,320 points
11 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 in PMP by Edureka
• 9,320 points
14 views
0 votes
0 answers

Difference between agile and iterative and incremental development

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

Apr 18 in PMP by Edureka
• 9,320 points
15 views
0 votes
0 answers

difference between agile model and spiral model

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

Apr 20 in PMP by Edureka
• 9,320 points
48 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 in PMP by Edureka
• 9,320 points
13 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,170 points
185 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP