parameters: (worklist_metadata, worklist_result, portal_url)
return_statement: return action_list
docstring: For each worklist generate action_list as expected by portal_actions.
docstring_summary: For each worklist generate action_list as expected by portal_actions.
docstring_tokens: For each worklist generate action_list as expected by portal_actions .
function: def generateActionList(worklist_metadata, worklist_result, portal_url):
    """
      For each worklist generate action_list as expected by portal_actions.
    """
    action_list = []
    append = action_list.append
  
    for key, metadata in worklist_metadata.iteritems():
      document_count = worklist_result.get(key, 0)
      if document_count:
        format_data = metadata['format_data']
        format_data._push({'count': document_count})
        append({'name': metadata['worklist_title'] % format_data,
                'url': (portal_url if not metadata['action_box_url'] else #in DCWorkflow: metadata['action_box_url] = 'None' (string)
                        '%s/%s' % (portal_url,
                                   metadata['action_box_url'] % format_data)
                       ),
                'worklist_id': metadata['worklist_id'],
                'workflow_title': metadata['workflow_title'],
                'workflow_id': metadata['workflow_id'],
                'count': format_data['count'],
                'permissions': (),  # Predetermined.
                'category': metadata['action_box_category']})
    return action_list
function_tokens: def generateActionList ( worklist_metadata , worklist_result , portal_url ) : action_list = [ ] append = action_list . append for key , metadata in worklist_metadata . iteritems ( ) : document_count = worklist_result . get ( key , 0 ) if document_count : format_data = metadata [ 'format_data' ] format_data . _push ( { 'count' : document_count } ) append ( { 'name' : metadata [ 'worklist_title' ] % format_data , 'url' : ( portal_url if not metadata [ 'action_box_url' ] else #in DCWorkflow: metadata['action_box_url] = 'None' (string) '%s/%s' % ( portal_url , metadata [ 'action_box_url' ] % format_data ) ) , 'worklist_id' : metadata [ 'worklist_id' ] , 'workflow_title' : metadata [ 'workflow_title' ] , 'workflow_id' : metadata [ 'workflow_id' ] , 'count' : format_data [ 'count' ] , 'permissions' : ( ) , # Predetermined. 'category' : metadata [ 'action_box_category' ] } ) return action_list