cancel
Showing results for 
Search instead for 
Did you mean: 

WV REST API - Association Class object creation not working

Tim_van_der_Poe
Confirmed Champ
Confirmed Champ

Hi All,

 

We've allready logged a ticket with Hyland support over a month ago and still don't have any answers as someone left our tickets on the side. Currently it's picked up again fortunately but maybe someone else allready had this issue fixed. 

 

When creating a new object via the POST Class Objects in a normal class this works great. However if we need to create an object in an association class we can't do this. There is no mention in the documentation of which classes are supported and also no mention on what to add there. So maybe someone else has done this allready. This needs to be there for creating new users in our Contract Management solution from Hyland. It's a security attribute table which needs to be populated. 

 

What works is creating an empty line in the class with no values (seen on database level). However adding attributes based on normal values or keys doesn't work at all. So now we can create empty rows and then manually add values in the database but this also isn't supported. So maybe someone knows how this works. 

 

Best Regards, Tim

10 REPLIES 10

Jacob_Dahlke6
Star Contributor
Star Contributor

EDIT: After testing myself, it appears to be broken

 

 

There is no mention in the documentation of which classes are supported and also no mention on what to add there.

 

I'm not sure what you mean by this statement, but I think the general Workview documentation would answer this. It would have to be configured as an association class.

When creating an association class object, whether in workflow or the unity API you generally need to pass two object id's of the two objects you are trying to associate. Those objects would need to be in the class of the objects configured for the associated class.

However, in the rest API you would pass the object key of those two objects:

{	"attributeValues": {		"1004": "MTIsNCwxMDAxNCwxMDAy",		"1014": "STzsNCixMDAbNCwxBNAx"	},	"activateObject": true}

The above would relate to the two related attributes that make up an associated class and the object keys would represent the object ids. 
06a139a53d19490d932c0dcac59b4824

 

Associated classes generally look like this in Studio:
ad5904fdeaf6412e8cfc1770ac5f9431

 

Thanks for letting me know. I've just got the same answer from the supportdesk.  I did try this before but maybe I did it wrong and will try this again.

Tim_van_der_Poe
Confirmed Champ
Confirmed Champ

Hi @Jacob Dahlke ,

I've tested it but it doesn't seem to work for me. So I get the following message error when doing this:

{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.4",
    "title": "The requested resource cannot be found",
    "status": 404,
    "detail": "Requested Class with provided attributes was not found: 1043"
}
 
The message looks like:
 
0f3927df41624362a97a237369788a8b
 
In Studio it's configured like this:
 
5ca0ae16b0c947c9804097e2e64812c8
So then I get the keys for the objects in class 1017 and 1042:
 
0e7c7e57c4144655891515ef87c34c24
In Postman it looks like:
 
49f4b9471b004b21a3549981db03bd6f
 
And for the other attribute:
 
d129ee301a894bc89c2ed7f57374dbd3
 
Then I take the keys from the result queries:
 
a4e8025e0491427cb2f3efc00aaea586
And this I'll input in to the query to insert the object in the association class:
 
 
But it just keeps failing. So any other idea what can be the issue?

What version are you on? That does look like it could be a bug, notably the 1043 in the error message. I've seen a few places in the rest Api where the class id is incremented by 1, but nothing breaking like this.

 

This is going to sound dumb, but have you tested to see if you could create the Associated object with 1 of the values? Maybe then you could retrieve it and update it with the second value. Obviously, that's not preferred, but I'm curious in terms of a workaround if that might work. 

 

I'm going to test v23 at some point today to see if I can confirm the same thing you see. Very interesting.