"Your role requires that you specify a WorkflowConfiguration for this operation." error when creating assets in folders with web services

Craig's Avatar

Craig

31 Jan, 2011 09:02 PM

I was able to run my entire web services script just fine on our development install of v6.7.5, creating many levels of folders and many assets, and no workflows, as an Administrator. Now, when I run my web services script on the production install of v6.7.5 I get errors that say “Your role requires that you specify a WorkflowConfiguration for this operation.” and I know it has less rights on the production system, but does have “Bypass workflow:” enabled. When I try to create an asset other than a folder inside a folder that is inside the Base Folder. The folders inside the Base Folder get created fine, and top-level files get created. What permissions on a role would need to be changed to enable that to work? If I knew what permissions I needed to change, that would be great. It also doesn’t seem to help that I made an almost-blank workflow in the site on the production system.

Thanks!
Craig

  1. 2 Posted by Craig on 02 Feb, 2011 07:56 PM

    Craig's Avatar

    Here is the asset array for the indexblock I'm getting the error on. This code works just fine when the user has the global Administrator role:

    $asset = array('indexBlock' => array(

    'name' => 'current-page',
    'parentFolderPath' => '_internal/blocks',//'_internal/blocks'
    'siteName' => $remotesitename,
    'metadata' => array(
        'author' => '',
        'displayName' => '',
        //'endDate' => '',
        'keywords' => '',
        'metaDescription' => '',
        //'reviewDate' => '',
        //'startDate' => '',
        'summary' => '',
        'teaser' => '',
        'title' => '',
        'dynamicFields' => ''),
    'metadataSetPath' => 'Default',
    'expirationFolderId' => '',
    'expirationFolderPath' => '',
    'indexBlockType' => 'folder',
    'indexedFolderPath' => '',
    'indexedContentTypeId' => '',
    'indexedContentTypePath' => '',
    'maxRenderedAssets' => '0',
    'depthOfIndex' => '0',
    'includePageContent' => '1',
    'includeCurrentPageXML' => '1',
    'renderCurrentPageAndHierarchy' => '',
    'includeChildrenInHierarchy' => '',
    'indexPages' => '1',
    'indexBlocks' => '',
    'indexLinks' => '',
    'indexFiles' => '',
    'indexRegularContent' => '1',
    'indexSystemMetadata' => '1',
    'indexUserMetadata' => '1',
    'indexAccessRights' => '',
    'indexUserInfo' => '',
    'indexWorkflowInfo' => '',
    'appendCallingPageData' => '1',
    'sortMethod' => 'folder-order',
    'sortOrder' => 'descending'));
    

    echo "
    starting current-page index create...";
    createAsset($asset);

    createAsset() is a wrapper function I made for all associative arrays to be sent through to the system with.

  2. Support Staff 3 Posted by Bradley Wagner on 02 Feb, 2011 08:22 PM

    Bradley Wagner's Avatar

    And you verified that you're able to successfully create an index block in the _internal/blocks folder on the $remotesitename site without workflow using the web interface and that user, correct?

  3. 4 Posted by Craig on 02 Feb, 2011 08:26 PM

    Craig's Avatar

    Yes, just made another one to make sure. Workflow isn't even an option as we don't have any in that system at this point.

    Edit - I was able to re-create the same thing on our development install, with user using web interface being able to make the assets, but the user using web services gets that same error in the same place with the new role and such set up. The development install is where I changed the user's global role from Global Role up to Administrator finally allowing the script to work.

    Thanks again, and sorry to be a pain.

  4. Support Staff 5 Posted by Bradley Wagner on 02 Feb, 2011 10:50 PM

    Bradley Wagner's Avatar

    Sorry to run through this but are you positive that you're attempting to create this asset in the exact same site. Is there any possibility that the $remotesitename is NULL or has the wrong value?

    A good way to verify this would be to use the parentFolderId instead of path and ensure the id matches that of the folder in the site you're looking at in the user interface.

  5. 6 Posted by Thompson, Craig J on 02 Feb, 2011 11:23 PM

    Thompson, Craig J's Avatar

    No problem. The site is correct, I sent the $remotesitename variable to the screen during that step this time. I also did go in and used the parentFolderId that I got from the web interface, and still get the same error.

    Thanks.

    ----- Original Message -----
    From: "Bradley" <[email blocked]>
    To: [email blocked]
    Sent: Wednesday, February 2, 2011 4:50:42 PM GMT -06:00 US/Canada Central
    Subject: Re: "Your role requires that you specify a WorkflowConfiguration for this operation." error when creating assets in folders with web services [Web Services]

  6. Support Staff 7 Posted by Bradley Wagner on 03 Feb, 2011 01:18 AM

    Bradley Wagner's Avatar

    All right, a couple of ideas:

    1. Can you try creating the block in the web UI and then use your script to "edit" the block instead of creating it?

    2. Can you describe the settings (or attach a screenshot) on the Workflows tab for the _internal/blocks folder?

    3. Can you describe the workflow settings (or attach a screenshot) of the Asset Factory you're using when creating the block in the web interface?

    4. Can you attach a screenshot of the Site Role abilities that the user has in the Site where you're attempting to do this?

    Thanks!

  7. 8 Posted by Thompson, Craig J on 03 Feb, 2011 06:02 PM

    Thompson, Craig J's Avatar

    1. I'll try that here soon

    but first, here are the screenshots:

    2. This is probably what you're expecting - the blocks_workflows.png

    3. I'm just using the New -> Default -> Block in the web interface.

    4. more of what you're probably expecting - site_role_webuser_pt1 and 2

    Here was the thing I was trying to say about the global roles with some screenshots:
    webuser_roles_scriptfail - right now, giving me these errors
    webuser_roles_scriptsuccess - the change i made with all other settings staying the same in the prod environment, and it works just fine this way
    myuser_roles_scriptsuccess - my settings during testing when the script worked great

    Thanks,
    Craig

    ----- Original Message -----
    From: "Bradley" <[email blocked]>
    To: [email blocked]
    Sent: Wednesday, February 2, 2011 7:18:51 PM GMT -06:00 US/Canada Central
    Subject: Re: "Your role requires that you specify a WorkflowConfiguration for this operation." error when creating assets in folders with web services [Web Services]

  8. Support Staff 9 Posted by Bradley Wagner on 03 Feb, 2011 06:09 PM

    Bradley Wagner's Avatar

    Hey Craig would you be able to provide us access to your system as an admin user and your web wervices user so we could test this out.

    I have a feeling it has to do with the combination of the workflow settings of the Asset Factory you're using in the web interface (New > Default > Block is an actual Asset Factory on your ims.tamu.edu site) and the Site role of the web services user on that Site.

    If so, we can split this issue into a private discussion. I'd like to loop back around resolve this issue in this public discussion so that others may benefit from it in the future.

  9. 10 Posted by Craig on 03 Feb, 2011 06:27 PM

    Craig's Avatar

    I'm checking on that now. For what it's worth, having the script try and edit the asset instead, still gave me the same error.

  10. Support Staff 11 Posted by Bradley Wagner on 03 Feb, 2011 07:08 PM

    Bradley Wagner's Avatar

    Craig, after thinking about this more, I tracked down the issue and filed a bug: http://issues.hannonhill.com/browse/CSI-136

    Basically, the system is not checking the Site Role of the user in this case but is instead relying on the Global Role as you discovered. The short-term workaround is to use an escalated Global Role that allows the user to create/edit assets without workflow.

    We're sorry about that. Thanks for helping us track down the problem!

  11. Tim closed this discussion on 12 Jun, 2012 01:22 PM.

Comments are currently closed for this discussion. You can start a new one.