PunatiSubbarao Super Contributor.
Super Contributor.
811 views

Unable to run the command through Workflow

Hi,

 

I am unable to run the oracle quiery through Customization Workflow Code with normal roles and getting the below mentioned error, the same I can run successfully with TDAdmin role.

 

You do not have the required permissions to create the Command object. Contact your site administrator to make sure that the relevant Command settings are correct.:
====================
    set tdc = TDConnection
    strQuery = "SELECT * FROM BUG WHERE BG_BUG_ID="& refId
==> set Cmd = tdc.Command
    Cmd.CommandText = strQuery
====================

 

Please let us know what are the additions permssions needs to be enabled for the group to avoid this error and run the command.

 

OR

 

Let us know if there is any alternative method for permanent solultion for the project irrespective group.

 

Thanks,
Subbarao
0 Likes
5 Replies
Highlighted
Absent Member.. Trudy Claspill Absent Member..
Absent Member..

Re: Unable to run the command through Workflow

Refer to the Administrator Guide chapter on Configuring Servers and Parameters.  Look for the DISABLE_COMMAND_INTERFACE parameter.

 

Description:

If this parameter is set to “Y” (default), only users belonging to the TDAdmin group can use the OTA Command object

If it is set to “N”, any user can use it.

If it is set to “ALL”, no users can use it.

For more information, refer to the HP ALM Open Test Architecture API Reference.

 

You have to add the DISABLE_COMMAND_INTERFACE parameter to your Site Configuration and set the value to N to allow users with roles other than TDAdmin to execute workflow code that utilizes the Command object.

 

 

[If this post solves or helps solve your issue, mark the thread as solved and give KUDOS to the author for their assistance.]

(Opinions expressed in my postings are mine alone, and do not reflect the opinions of my employer.No warranties express or implied for any solution/suggestion posted.)
Knowledge Partner Knowledge Partner
Knowledge Partner

Re: Unable to run the command through Workflow

You don't need the Command object to get hold of a defect. All you need is this:

Set refBug = tdc.BugFactory.Item(refId)

Then you can use the Field property to get the contents of a certain field, for example:

MsgBox refBug.Field("BG_PROJECT")
Jan Czajkowski

[Please do not contact me off line for receiving support. Use the forum!]
0 Likes
PunatiSubbarao Super Contributor.
Super Contributor.

Re: Unable to run the command through Workflow

Hi Jan,

 

Thanks for the quick response...

 

This is to get and copy the refered defect values to the current defect, so I wanted to confirm is the refered defect id is valid or not.

 

If I run the query I can take count of defects, so I can confirm whether the defect is valid (Exist) or not.

 

But here in your example how we can confirm.

 

Set refBug = tdc.BugFactory.Item(refId)

 

Thanks,

Subbarao

Thanks,
Subbarao
0 Likes
Knowledge Partner Knowledge Partner
Knowledge Partner

Re: Unable to run the command through Workflow

For some reason, returning a non-existing bug ID does not cause an error in our production installation. But you could check it like this for example:

 

  

On Error Resume Next
Set refBug = tdc.BugFactory.Item(refId)
'The following line will cause a suppressed error if the bug does not exist
summary = refBug.Field("BG_SUMMARY")
If Err.Number = 0 Then
     'This went OK, which means the bug exists
End if
On Error Goto 0

 

Jan Czajkowski

[Please do not contact me off line for receiving support. Use the forum!]
0 Likes
raghavendrarao Contributor.
Contributor.

Re: Unable to run the command through Workflow

This worked perfectly, thanks

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.