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

Home » RADICORE development » Bug Reports » Typo in workitem(timeout).php
Re: Typo in workitem(timeout).php [message #2490 is a reply to message #2489] Sun, 11 April 2010 01:29 Go to previous messageGo to previous message
ljkbrost is currently offline  ljkbrost
Messages: 59
Registered: April 2006
Member
I was having a horrible time testing this change. I kept getting errors about incomplete arcs and I constantly changed the workflow trying to get it to work and had no luck.

Stepping through the code, I found that fireTimedEvent(...) was being called with an incomplete wf_workitem record. The transition_id was not being copied into the wf_workitem record. I traced the problem back to the following code inside wf_workitem.class.inc:

    function _cm_pre_getData ($where, $where_array, $fieldarray=null)
    // perform custom processing before database record(s) are retrieved.
    // (WHERE is supplied in two formats - string and array)
    // $fieldarray may contain full details of the current record in the parent
    // class, not just its primary key.
    {
        global $dbprefix;

        // only do this if sql_select is empty
        if (empty($this->sql_select)) {
            // include columns from foreign table
            $this->sql_select = 'user_id, role_id, wf_workitem.workflow_id, case_id, workitem_id, wf_workitem.task_id, transition_trigger, workitem_status, enabled_date, cancelled_date, finished_date, deadline, context, workflow_name, task_desc, rdcaccount_id
';
            $this->sql_from   = 'wf_workitem '
                              . 'LEFT JOIN wf_workflow ON (wf_workflow.workflow_id=wf_workitem.workflow_id) '
                              . 'LEFT JOIN ' . $dbprefix . 'menu.mnu_task ON (mnu_task.task_id=wf_workitem.task_id) ';
        } // if

        return $where;

    } // _cm_pre_getData




The sql_select is missing 'transition_id'. When I add it to the sql_select things work again.

Can you please make another patch with this fix and the updated library include file? I want to reset my development instance, apply your patch, and re-test for the time granularity change.

Thanks,


Kyle Brost
----

[Updated on: Sun, 11 April 2010 01:30]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: workflow security issue.
Next Topic: FAQ - Error
Goto Forum:
  


Current Time: Sat Jun 29 10:05:05 EDT 2024

Total time taken to generate the page: 0.01022 seconds