CMDBuild Forum

Getting Auth Class not Authorized in Workflow

Hi,

I'm testing some script that i've written based on your API and when I execute it as part of a workflow, I get the following exception:

Target exception: javax.xml.ws.soap.SOAPFaultException: AUTH_CLASS_NOT_AUTHORIZED contacts

I have a process with attributes pertaining to first name, last name, title and email address as read only string types. I also have a reference type attribute which references my contacts class, I want users to select a contact from the drop down and the script to auto-populate the read only fields with the relevant details retrieved from the related class 'contacts'.

Here is how I've tried to populate the first name field 'fName',

fName = cmdb.queryClass("contacts").with("Id", contact.Id).fetch().firstName;

Also I'm well aware I should have the class specified with a capital C in the database, but unfortunately it's specified with a lowercase c.

Thanks,
Jamie

 

 

Hi Jamie,
 
it seems that the user/group that you are using has no permissions for the class "contacts". Can you check the permissions in the Administration module?
 
Best regards.
 
Davide
 
Previously Jamie wrote:

Hi,

I'm testing some script that i've written based on your API and when I execute it as part of a workflow, I get the following exception:

Target exception: javax.xml.ws.soap.SOAPFaultException: AUTH_CLASS_NOT_AUTHORIZED contacts

I have a process with attributes pertaining to first name, last name, title and email address as read only string types. I also have a reference type attribute which references my contacts class, I want users to select a contact from the drop down and the script to auto-populate the read only fields with the relevant details retrieved from the related class 'contacts'.

Here is how I've tried to populate the first name field 'fName',

fName = cmdb.queryClass("contacts").with("Id", contact.Id).fetch().firstName;

Also I'm well aware I should have the class specified with a capital C in the database, but unfortunately it's specified with a lowercase c.

Thanks,
Jamie