title: Agile PLM API create relationship between items: Invalid Parameter
body: <p>I'm developing an scala application using Agile PLM API.
  Everything works so far, adding attachments, adding BOM items, creating items and so on.</p>
  <p>But when creating Relationships in the Relationship Table, I always get this error:</p>
  <pre><code>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)
  </code></pre>
  <p>The Agile API requires a hashmap with attributes and values as parameter to create the relationship. So this is my code:</p>
  <pre><code>val cells: java.utils.Map[_, _] = Map(
      Attrs.Items.Relationships.CriteriaMet -&gt; null,
      Attrs.Items.Relationships.TypeImage -&gt; 666, // id of item type as Integer
      Attrs.Items.Relationships.Name -&gt; &quot;foo&quot;, // name as String
      Attrs.Items.Relationships.Description -&gt; &quot;bar&quot;, // the description as String
      Attrs.Items.Relationships.CurrentStatus -&gt; &quot;Production&quot;, // lifecyclephase 'Production' as a String
      Attrs.Items.Relationships.Rule -&gt; null,
      Attrs.Items.Relationships.Type -&gt; 600 // id of item type as Integer
  ) 
  
  relationshipTable.createRow(cells)
  </code></pre>
  <p>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.</p>
  <p>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.</p>