Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE development » Workflow » Pending workflow task on Home Page
Re: Pending workflow task on Home Page [message #2441 is a reply to message #2439] Fri, 05 February 2010 12:41 Go to previous messageGo to previous message
AJM is currently offline  AJM
Messages: 2352
Registered: April 2006
Location: Surrey, UK
Senior Member
This is tricky, but can be done. It comes in two parts:

(1) I have modified 'menu.xsl' so that if it finds a column called 'link_text' it will use this instead of constructing the default '<task_desc> where <context>'.

(2) By default the output will not contain a column called 'link_text', but by customising the '_cm_post_getData()' method in the 'wf_workitem_role' and/or 'wf_workitem_user' classes you can construct whatever text you like.

Here is a example of the custom code which I used in the 'wf_workitem_role' class:

// insert custom text into LINK_TEXT
foreach ($rows as $rownum => $rowdata) {
    switch ($rowdata['task_id']) {
    case 'x_person_addr(add)':
        ini_set('include_path', ini_get('include_path') .PATH_SEPARATOR .'../xample');
        $dbobject =& singleton::getInstance('x_person');
        $data = $dbobject->getData($rowdata['context']);
        if (!empty($data)) {
            $data = $data[0];
            $link_text = $rowdata['task_desc'] .' for ' .$data['first_name'] .' ' .$data['last_name'];
            $rowdata['link_text'] = $link_text;
        } // if
     default:
        break;
    } // switch
    $rows[$rownum] = $rowdata;
} // foreach

As you can see it is not that simple. I have to identify the database table from which I need to extract the extra data, create a table instance, then read the data.

Be aware that this is a modification to the standard class, so any changes you make may be overwritten if you reload the standard files.


 
Read Message
Read Message
Read Message
Previous Topic: State Machine vs Sequential WF
Next Topic: Explicit OR-Split
Goto Forum:
  


Current Time: Mon Jul 22 15:37:38 EDT 2024

Total time taken to generate the page: 0.02824 seconds