Questions and discussion about using ProcessMaker 2: user interface, running cases and functionality
Forum rules: Please search to see if a question has already been asked before posting. Please don't ask the same question in multiple forums.
By amform
#787802
I need some help.
I upgrade PM version 1.6xx to 2.0, all the work is there(flows,triggers,JS,etc) except some modification that were made in the advance search to redirect to some ASP files that were useful for tracking.
So essentially what we did was:
http://server.company.com/sysworkflow/e ... cases/main -> Advanced Search
I supposed to call /opt/processmaker/workflow/engine/methods/cases/cases_advancedSearch.php
Which we customized to redirect it to another server

# more /opt/processmaker/workflow/engine/methods/cases/cases_advancedSearch.php
<?php
header('Location: http://server2.company.com/ProcessMaker/archive.asp');
exit;
?>

But it does not work( worked in PM1.6xx).. how do we get this working in 2.0?
Thanks for the help
User avatar
By amosbatto
#787808
I see that file is no longer used in PM 2.0.
In the file workflow/engine/methods/cases/casesListExtJs.php in line 28, change from:
Code: Select all
    case 'search':
    case 'participated-history':
To:
Code: Select all
    case 'search':
        header('Location: http://server2.company.com/ProcessMaker/archive.asp' );
        die;
    case 'participated-history':
By amform
#787813
I tried to search in the directory for the example you show, and I found this:
[root@server cases]# pwd
/opt/processmaker/workflow/engine/methods/cases
[root@server cases]# grep -i participated-history *
[root@server cases]#

The closest area in the file to his lines are:
:
switch ($action) {
case 'draft' :
$config = getDraft();
break;
case 'simple_search':
case 'search' :
$config = getSearch();
break;
case 'participated' :
case 'sent' :
$config = getParticipated();
break;
case 'unassigned' :
is this a wrong file? or are we looking the wrong string.
Thanks
Regards
User avatar
By amosbatto
#787815
I'm looking at the code from version 3.2, so I'm guessing that some changes have happened in the code.

Try this:
Code: Select all
case 'search' :
header('Location: http://server2.company.com/ProcessMaker/archive.asp' );
die;
$config = getSearch();
break;
By amform
#788282
Hi amosbatto,
I upgraded to 2.5 from 2.0, but the optimizations didn't stay, in this case what file and in what line should I add the custom?
Thanks for your help.
Regards
By amform
#788317
hi amosbatto,
Unfortunately the code is different again, this is what I found when I search the string 'search':

Line 221
function getStatusArray ($action, $userUid)
{
global $oAppCache;
$status = array ();
$status[] = array ('',G::LoadTranslation( 'ID_ALL_STATUS' ));
//get the list based in the action provided
switch ($action) {
case 'sent':
$cStatus = $oAppCache->getSentListProcessCriteria( $userUid ); // a little slow
break;
case 'simple_search':
case 'search':
$cStatus = new Criteria( 'workflow' );
$cStatus->clearSelectColumns();
$cStatus->setDistinct();
$cStatus->addSelectColumn( ApplicationPeer::APP_STATUS );
$oDataset = ApplicationPeer::doSelectRS( $cStatus );
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
$oDataset->next();
while ($aRow = $oDataset->getRow()) {
$status[] = array ($aRow['APP_STATUS'],G::LoadTranslation( 'ID_CASES_STATUS_' . $aRow['APP_STATUS'] )
); //here we can have a translation for the status ( the second param)
$oDataset->next();
}

Line 136
function getUserArray ($action, $userUid)
{
global $oAppCache;
$status = array ();

$users[] = array ("",G::LoadTranslation( "ID_ALL_USERS" ));
$users[] = array ("CURRENT_USER",G::LoadTranslation( "ID_CURRENT_USER" ));

//now get users, just for the Search action
switch ($action) {
case 'search_simple':
case 'search':
$cUsers = new Criteria( 'workflow' );
$cUsers->clearSelectColumns();
$cUsers->addSelectColumn( UsersPeer::USR_UID );
$cUsers->addSelectColumn( UsersPeer::USR_FIRSTNAME );
$cUsers->addSelectColumn( UsersPeer::USR_LASTNAME );
$oDataset = UsersPeer::doSelectRS( $cUsers );
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
$oDataset->next();
while ($aRow = $oDataset->getRow()) {
$users[] = array ($aRow['USR_UID'],$aRow['USR_LASTNAME'] . ' ' . $aRow['USR_FIRSTNAME']);
$oDataset->next();
}
break;
default:
return $users;
break;
}
return $users;
}

of the two functions where I should make the change?
Thanks for your help.
User avatar
By amosbatto
#793330
Dashabig wrote:I am looking for someone to make me a modification in admin of the avs script. From admin on users I have since I can modify the date of the premium users
You can write to the wf_{workspace}.USERS.DUE_DATE field in the database to change the Due Date of users. You can create a plugin to change user profiles and add a new option in the Admin sidebar.

If you are looking for a programmer to help you, then it is better to create a new post with a subject line that states clearly that you want to hire someone. There are many internet services to find PHP programmers, so you should post your announcement in those places as well.

Hello. For rental housing, there are software solu[…]

Experience heightened pleasure with Cenforce 100 M[…]

Get an instant solution to move emails to MBOX for[…]

Most Demanding OST to PST Converter

The most demanding OST to PST Converter is TrijaT[…]