Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
#790233
How to skip Previous Step page on Processmaker?
Attachments
Screen Shot 2017-04-11 at 2.41.46 PM.png
Screen Shot 2017-04-11 at 2.41.46 PM.png (32.3 KiB) Viewed 4134 times
Screen Shot 2017-04-11 at 2.41.46 PM.png
Screen Shot 2017-04-11 at 2.41.46 PM.png (32.3 KiB) Viewed 4134 times
#790242
Hello rayigo,

If you want the hide the screen shown in the Screenshots, you need to create a trigger with the following code:
Code: Select all
PMFDerivateCase(@@APPLICATION, @%INDEX);
G::header("Location: casesListExtJsRedirector");
die();
The task, where you want to hide this trigger, set this trigger to fire Before Assignment.

Hope this helps.

Best Regards,
Zainab Sabunwala
#790252
You can permanently remove the "Previous Step" link, by editing the file workflow/engine/templates/cases/cases_ScreenDerivation.html and changing the code from:
Code: Select all
                  {if $PREVIOUS_PAGE}
                  <td valign='top' class='tableOption' width='33%' align="left">
                  <table cellspacing="0" cellpadding="0" width='100%'>
                    <tr>
                      <td class='tableOption' align="left" width="120"><img src="/images/bulletButtonLeft.gif" width="6" />&nbsp; <a class="tableOption" href='{$PREVIOUS_PAGE}' id="form[DYN_BACKWARD]" name="form[DYN_BACKWARD]" onclick="">{$PREVIOUS_PAGE_LABEL}</a></td>
                      <td class='tableOption'>&nbsp;</td>
                    </tr>
                  </table>
                  </td>
                  {/if}
To:
Code: Select all
                  <!--
                  {if $PREVIOUS_PAGE}
                  <td valign='top' class='tableOption' width='33%' align="left">
                  <table cellspacing="0" cellpadding="0" width='100%'>
                    <tr>
                      <td class='tableOption' align="left" width="120"><img src="/images/bulletButtonLeft.gif" width="6" />&nbsp; <a class="tableOption" href='{$PREVIOUS_PAGE}' id="form[DYN_BACKWARD]" name="form[DYN_BACKWARD]" onclick="">{$PREVIOUS_PAGE_LABEL}</a></td>
                      <td class='tableOption'>&nbsp;</td>
                    </tr>
                  </table>
                  </td>
                  {/if}
                  -->
The problem is that this eliminates the Previous Step link for ALL processes. If you only want to eliminate the link for certain processes, then you need to add code like this to workflow/engine/methods/cases/cases_Step.php. In line 777, change this code:
Code: Select all
        case 'ASSIGN_TASK':
            $oDerivation = new Derivation();
            $oProcess = new Process();
            $aData = $oCase->loadCase( $_SESSION['APPLICATION'] );

            $aFields['PROCESS'] = $oProcess->load( $_SESSION['PROCESS'] );
            $aFields['PREVIOUS_PAGE'] = $aPreviousStep['PAGE'];
Add a array of IDs for processes which should not have the "Previous Step" link displayed:
Code: Select all
        case 'ASSIGN_TASK':
            //set to the IDs of processes which should not display the Previous Step link:
            $aProcessesNoPreviousLink = array(
               '12067430558ded97f8666c8026604805', 
               '20419177758dec3f7bedd17038026045', 
               '34414124958d30cc2853ae9014839646'
            );
            $oDerivation = new Derivation();
            $oProcess = new Process();
            $aData = $oCase->loadCase( $_SESSION['APPLICATION'] );

            $aFields['PROCESS'] = $oProcess->load( $_SESSION['PROCESS'] );
            if (in_array($_SESSION['PROCESS'], $aProcessesNoPreviousLink))
               $aFields['PREVIOUS_PAGE'] = null;
            else
               $aFields['PREVIOUS_PAGE'] = $aPreviousStep['PAGE'];

Betvisa clone scripts are pre-built software solut[…]

A Bet365 Clone Script is essentially a ready-made […]

BC. Game Clone Script is a ready-made software sol[…]

A cryptocurrency exchange script is essentially pr[…]