source: branches/1.2/workflow/inc/engine/compiler/end_pos.php @ 1349

Revision 1349, 1017 bytes checked in by niltonneto, 15 years ago (diff)

Ticket #561 - Inclusão do módulo Workflow faltante nessa versão.

  • Property svn:executable set to *
Line 
1<?php
2//Code to be executed after the end activity
3// we save name and others only when the instance
4// has been completed
5if ($instance->getActivityCompleted())
6{
7  if(isset($_REQUEST['wf_name']))
8  {
9    $instance->setName($_REQUEST['wf_name']);
10  }
11  if(isset($_REQUEST['wf_priority']))
12  {
13    $instance->setPriority((int)$_REQUEST['wf_priority']);
14  }
15  if(isset($_REQUEST['wf_set_next_user']))
16  {
17    $instance->setNextUser((int)$_REQUEST['wf_set_next_user']);
18  }
19  if(isset($_REQUEST['wf_set_owner']))
20  {
21    $instance->setOwner((int)$_REQUEST['wf_set_owner']);
22  }
23  if(isset($_REQUEST['wf_category']))
24  {
25    $instance->setCategory((int)$_REQUEST['wf_category']);
26  }
27}
28elseif($GLOBALS['workflow']['__leave_activity'])
29{
30  $this->runtime->StartRun();
31  //tests for auto-release (more complex than release) and lock some rows if needed--------------------
32  if ($this->runtime->checkUserRelease())
33  {
34    //release
35    $this->runtime->setActivityUser(false);
36  }
37  $this->runtime->EndStartRun(); 
38}
39
40?>
Note: See TracBrowser for help on using the repository browser.