Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

ezworkflowprocess.php
Go to the documentation of this file.
1 <?php
17 class eZWorkflowProcess extends eZPersistentObject
18 {
22 public $EventState;
23 public $Parameters;
24 public $ParameterList;
25 static function definition()
26 {
27 return array( 'fields' => array( 'id' => array( 'name' => 'ID',
28 'datatype' => 'integer',
29 'default' => 0,
30 'required' => true ),
31 'process_key' => array( 'name' => 'ProcessKey',
32 'datatype' => 'string',
33 'default' => '',
34 'required' => true ),
35 'workflow_id' => array( 'name' => 'WorkflowID',
36 'datatype' => 'integer',
37 'default' => 0,
38 'required' => true,
39 'foreign_class' => 'eZWorkflow',
40 'foreign_attribute' => 'id',
41 'multiplicity' => '1..*' ),
42 'user_id' => array( 'name' => 'UserID',
43 'datatype' => 'integer',
44 'default' => 0,
45 'required' => true,
46 'foreign_class' => 'eZUser',
47 'foreign_attribute' => 'contentobject_id',
48 'multiplicity' => '1..*' ),
49 'content_id' => array( 'name' => 'ContentID',
50 'datatype' => 'integer',
51 'default' => 0,
52 'required' => true ),
53 'content_version' => array( 'name' => 'ContentVersion',
54 'datatype' => 'integer',
55 'default' => 0,
56 'required' => true ),
57 'session_key' => array( 'name' => 'SessionKey',
58 'datatype' => 'string',
59 'default' => '0',
60 'required' => true ),
61 'node_id' => array( 'name' => 'NodeID',
62 'datatype' => 'integer',
63 'default' => 0,
64 'required' => true ),
65 'event_id' => array( 'name' => 'EventID',
66 'datatype' => 'integer',
67 'default' => 0,
68 'required' => true ),
69 'event_position' => array( 'name' => 'EventPosition',
70 'datatype' => 'integer',
71 'default' => 0,
72 'required' => true ),
73 'event_state' => array( 'name' => 'EventState',
74 'datatype' => 'integer',
75 'default' => 0,
76 'required' => true ),
77 'last_event_id' => array( 'name' => 'LastEventID',
78 'datatype' => 'integer',
79 'default' => 0,
80 'required' => true ),
81 'last_event_position' => array( 'name' => 'LastEventPosition',
82 'datatype' => 'integer',
83 'default' => 0,
84 'required' => true ),
85 'last_event_status' => array( 'name' => 'LastEventStatus',
86 'datatype' => 'integer',
87 'default' => 0,
88 'required' => true ),
89 'event_status' => array( 'name' => 'EventStatus',
90 'datatype' => 'integer',
91 'default' => 0,
92 'required' => true ),
93 'created' => array( 'name' => 'Created',
94 'datatype' => 'integer',
95 'default' => 0,
96 'required' => true ),
97 'modified' => array( 'name' => 'Modified',
98 'datatype' => 'integer',
99 'default' => 0,
100 'required' => true ),
101 'activation_date' => array( 'name' => 'ActivationDate',
102 'datatype' => 'integer',
103 'default' => 0,
104 'required' => true ),
105 'status' => array( 'name' => 'Status',
106 'datatype' => 'integer',
107 'default' => 0,
108 'required' => true ),
109 'parameters' => array( 'name' => 'Parameters',
110 'datatype' => 'text',
111 'default' => '',
112 'required' => true ),
113 'memento_key' => array( 'name' => 'MementoKey',
114 'datatype' => 'string',
115 'default' => '',
116 'required' => true,
117 'foreign_class' => 'eZOperationMemento',
118 'foreign_attribute' => 'memento_key',
119 'multiplicity' => '1..*' ) ),
120 'keys' => array( 'id' ),
121 'function_attributes' => array( 'user' => 'user',
122 'content' => 'content',
123 'node' => 'node',
124 'workflow' => 'workflow',
125 'workflow_event' => 'workflowEvent',
126 'last_workflow_event' => 'lastWorkflowEvent',
127 'parameter_list' => 'parameterList' ),
128 "increment_key" => "id",
129 'class_name' => 'eZWorkflowProcess',
130 'sort' => array( 'user_id' => 'asc' ),
131 'name' => 'ezworkflow_process' );
132 }
133
134 static function create( $processKey, $parameters )
135 {
136 $dateTime = time();
137 if ( !isset( $parameters['user_id'] ) )
138 $parameters['user_id'] = 0;
139 $row = array( 'process_key' => $processKey,
140 'workflow_id' => $parameters['workflow_id'],
141 'user_id' => $parameters['user_id'],
142 'content_id' => 0,
143 'content_version' => 0,
144 'node_id' => 0,
145 'session_key' => 0,
146 'event_id' => 0,
147 'event_position' => 0,
148 'last_event_id' => 0,
149 'last_event_position' => 0,
150 'last_event_status' => 0,
151 'event_status' => 0,
152 'created' => $dateTime,
153 'modified' => $dateTime,
154 'parameters' => serialize( $parameters ) );
155 return new eZWorkflowProcess( $row );
156 }
157
158 function reset()
159 {
160 $this->EventID = 0;
161 $this->EventPosition = 0;
162 $this->LastEventID = 0;
163 $this->LastEventPosition = 0;
164 $this->LastEventStatus = 0;
165 $this->ActivationDate = 0;
166 $this->EventStatus = 0;
167 $this->EventState = 0;
168 }
169
170 function advance( $next_event_id = 0, $next_event_pos = 0, $status = 0 )
171 {
172 $this->LastEventID = $this->EventID;
173 $this->LastEventPosition = $this->EventPosition;
174 $this->LastEventStatus = $status;
175 $this->EventID = $next_event_id;
176 $this->EventPosition = $next_event_pos;
177 $this->ActivationDate = 0;
178 }
179
180
181 function run( &$workflow, &$workflowEvent, &$eventLog )
182 {
183 $eventLog = array();
184 eZDebugSetting::writeDebug( 'workflow-process', $workflowEvent, "workflowEvent in process->run beginning" );
185
186 $runCurrentEvent = true;
187 $done = false;
188 $workflowStatus = $this->attribute( 'status' );
189 eZDebugSetting::writeDebug( 'workflow-process', $workflowStatus , 'workflowStatus' );
190 $currentEventStatus = $this->attribute( 'event_status' );
191
192 // just temporary. needs to be removed from parameters
193 if ( $workflowEvent == null )
194 {
195 $workflowEvent = eZWorkflowEvent::fetch( $this->attribute( 'event_id' ) );
196 }
197
198 switch( $currentEventStatus )
199 {
200 case eZWorkflowType::STATUS_DEFERRED_TO_CRON:
201 case eZWorkflowType::STATUS_DEFERRED_TO_CRON_REPEAT:
202 case eZWorkflowType::STATUS_FETCH_TEMPLATE:
203 case eZWorkflowType::STATUS_FETCH_TEMPLATE_REPEAT:
204 case eZWorkflowType::STATUS_REDIRECT:
205 case eZWorkflowType::STATUS_REDIRECT_REPEAT:
206 case eZWorkflowType::STATUS_WORKFLOW_RESET:
207 {
208 if ( $workflowEvent !== null )
209 {
210 $activationDate = 0;
211 if ( $this->hasAttribute( 'activation_date' ) )
212 {
213 $activationDate = $this->attribute( "activation_date" );
214 }
215 eZDebugSetting::writeDebug( 'workflow-process', "Checking activation date" );
216 if ( $activationDate == 0 )
217 {
218 $eventType = $workflowEvent->eventType();
219 $eventLog[] = array( "status" => $currentEventStatus,
220 "status_text" => eZWorkflowType::statusName( $currentEventStatus ),
221 "information" => $eventType->attribute( "information" ),
222 "description" => $workflowEvent->attribute( "description" ),
223 "type_name" => $eventType->attribute( "name" ),
224 "type_group" => $eventType->attribute( "group_name" ) );
225 if ( $currentEventStatus == eZWorkflowType::STATUS_DEFERRED_TO_CRON ||
226 $currentEventStatus == eZWorkflowType::STATUS_FETCH_TEMPLATE ||
227 $currentEventStatus == eZWorkflowType::STATUS_REDIRECT )
228 {
229 $runCurrentEvent = false;
230 }
231 }
232 else if ( time() < $activationDate )
233 {
234 eZDebugSetting::writeDebug( 'workflow-process', "Date failed, not running events" );
235 $eventType = $workflowEvent->eventType();
236 $eventLog[] = array( "status" => $currentEventStatus,
237 "status_text" => eZWorkflowType::statusName( $currentEventStatus ),
238 "information" => $eventType->attribute( "information" ),
239 "description" => $workflowEvent->attribute( "description" ),
240 "type_name" => $eventType->attribute( "name" ),
241 "type_group" => $eventType->attribute( "group_name" ) );
242 $done = true;
243 }
244 else
245 {
246 eZDebugSetting::writeDebug( 'workflow-process', "Date ok, running events" );
247 eZDebugSetting::writeDebug( 'workflow-process', $currentEventStatus, 'WORKFLOW_TYPE_STATUS' );
248 if ( $currentEventStatus == eZWorkflowType::STATUS_DEFERRED_TO_CRON ||
249 $currentEventStatus == eZWorkflowType::STATUS_FETCH_TEMPLATE ||
250 $currentEventStatus == eZWorkflowType::STATUS_REDIRECT )
251 {
252 $runCurrentEvent = false;
253 }
254 }
255 }
256 } break;
257 default:
258 break;
259 }
260
261 while ( !$done )
262 {
263 if ( $runCurrentEvent )
264 {
265 eZDebugSetting::writeDebug( 'workflow-process', "runCurrentEvent is true" );
266 }
267 else
268 {
269 eZDebugSetting::writeDebug( 'workflow-process', "runCurrentEvent is false" );
270 }
271 if ( $workflowEvent != null )
272 {
273 //eZDebugSetting::writeDebug( 'workflow-process', $workflowEvent ,"workflowEvent is not null" );
274 }
275 else
276 {
277 //eZDebugSetting::writeDebug( 'workflow-process', $workflowEvent ,"workflowEvent is null" );
278 }
279 if ( $workflowEvent instanceof eZWorkflowEvent )
280 {
281 eZDebugSetting::writeDebug( 'workflow-process', get_class( $workflowEvent ), "workflowEvent class is ezworkflowevent" );
282 }
283 else if ( $workflowEvent !== null )
284 {
285 eZDebugSetting::writeDebug( 'workflow-process', get_class( $workflowEvent ), "workflowEvent class is not ezworkflowevent" );
286 }
287 eZDebugSetting::writeDebug( 'workflow-process', $done , "in while" );
288 if ( $runCurrentEvent and
289 $workflowEvent !== null and
290 $workflowEvent instanceof eZWorkflowEvent )
291 {
292 $eventType = $workflowEvent->eventType();
293
294 if ( $eventType instanceof eZWorkflowType )
295 {
296 $currentEventStatus = $eventType->execute( $this, $workflowEvent );
297 $this->setAttribute( "event_status", $currentEventStatus );
298
299 $workflowParameters = $this->attribute( 'parameter_list' );
300
301 if ( isset( $workflowParameters['cleanup_list'] ) )
302 {
303 $cleanupList = $workflowParameters['cleanup_list'];
304 }
305 else
306 {
307 unset( $cleanupList );
308 $cleanupList = array();
309 }
310
311 if ( $eventType->needCleanup() )
312 {
313 $cleanupList[] = $workflowEvent->attribute( 'id' );
314 $workflowParameters['cleanup_list'] = $cleanupList;
315 $this->setAttribute( 'parameters', serialize( $workflowParameters ) );
316 }
317
318 eZDebugSetting::writeDebug( 'workflow-process', $currentEventStatus, "currentEventStatus" );
319 switch( $currentEventStatus )
320 {
321 case eZWorkflowType::STATUS_ACCEPTED:
322 {
323 $done = false;
324 $workflowStatus = eZWorkflow::STATUS_DONE;
325 }break;
326 case eZWorkflowType::STATUS_WORKFLOW_DONE:
327 {
328 $done = true;
329 $workflowStatus = eZWorkflow::STATUS_DONE;
330 } break;
331 case eZWorkflowType::STATUS_REJECTED:
332 {
333 $done = true;
334 $workflowStatus = eZWorkflow::STATUS_FAILED;
335 } break;
336 case eZWorkflowType::STATUS_DEFERRED_TO_CRON:
337 case eZWorkflowType::STATUS_DEFERRED_TO_CRON_REPEAT:
338 {
339 if ( $eventType->hasAttribute( "activation_date" ) )
340 {
341 $date = $eventType->attribute( "activation_date" );
342 $this->setAttribute( "activation_date", $date );
343 }
344 $workflowStatus = eZWorkflow::STATUS_DEFERRED_TO_CRON;
345 $done = true;
346 } break;
347 case eZWorkflowType::STATUS_FETCH_TEMPLATE:
348 {
349 $workflowStatus = eZWorkflow::STATUS_FETCH_TEMPLATE;
350 $done = true;
351 } break;
352 case eZWorkflowType::STATUS_FETCH_TEMPLATE_REPEAT:
353 {
354 $workflowStatus = eZWorkflow::STATUS_FETCH_TEMPLATE_REPEAT;
355 $done = true;
356 } break;
357 case eZWorkflowType::STATUS_REDIRECT:
358 case eZWorkflowType::STATUS_REDIRECT_REPEAT:
359 {
360 $workflowStatus = eZWorkflow::STATUS_REDIRECT;
361 $done = true;
362 $this->advance();
363 } break;
364 case eZWorkflowType::STATUS_RUN_SUB_EVENT:
365 {
366 eZDebug::writeWarning( "Run sub event not supported yet", __METHOD__ );
367 } break;
368 case eZWorkflowType::STATUS_WORKFLOW_CANCELLED:
369 {
370 $done = true;
371 $this->advance();
372 $workflowStatus = eZWorkflow::STATUS_CANCELLED;
373 } break;
374 case eZWorkflowType::STATUS_WORKFLOW_RESET:
375 {
376 $done = true;
377 $this->reset();
378 $workflowStatus = eZWorkflow::STATUS_RESET;
379 } break;
380 case eZWorkflowType::STATUS_NONE:
381 {
382 eZDebug::writeWarning( "Workflow executing status is eZWorkflowType::STATUS_NONE", __METHOD__ );
383 } break;
384 default:
385 {
386 eZDebug::writeWarning( "Unknown status '$currentEventStatus'", __METHOD__ );
387 } break;
388 }
389 $eventLog[] = array( "status" => $currentEventStatus,
390 "status_text" => eZWorkflowType::statusName( $currentEventStatus ),
391 "information" => $eventType->attribute( "information" ),
392 "description" => $workflowEvent->attribute( "description" ),
393 "type_name" => $eventType->attribute( "name" ),
394 "type_group" => $eventType->attribute( "group_name" ) );
395 }
396 else
397 {
398 eZDebug::writeError( "Expected an eZWorkFlowType object", __METHOD__ );
399 }
400 }
401 else
402 {
403 eZDebugSetting::writeDebug( 'workflow-process', "Not running current event. Trying next" );
404 }
405 $runCurrentEvent = true;
406 // still not done
407 if ( !$done )
408 {
409 // fetch next event
410 $event_pos = $this->attribute( "event_position" );
411
412 $next_event_pos = $event_pos + 1;
413 $next_event_id = $workflow->fetchEventIndexed( $next_event_pos );
414 if ( $next_event_id !== null )
415 {
416 eZDebugSetting::writeDebug( 'workflow-process', $event_pos , "workflow not done");
417 $this->advance( $next_event_id, $next_event_pos, $currentEventStatus );
418 $workflowEvent = eZWorkflowEvent::fetch( $next_event_id );
419 }
420 else
421 {
422 $done = true;
423 unset( $workflowEvent );
424 eZDebugSetting::writeDebug( 'workflow-process', $event_pos , "workflow done");
425 $workflowStatus = eZWorkflow::STATUS_DONE;
426 $this->advance();
427 }
428 }
429
430 }
431
432 $this->setAttribute( "status", $workflowStatus );
433 $this->setAttribute( "modified", time() );
434 return $workflowStatus;
435 }
436
437 static function fetch( $id, $asObject = true )
438 {
439 return eZPersistentObject::fetchObject( eZWorkflowProcess::definition(),
440 null,
441 array( 'id' => $id ),
442 $asObject );
443 }
444
445 static function fetchList( $conds = null, $asObject = true, $offset = false, $limit = false )
446 {
447 $limitation = array( 'offset' => $offset,
448 'length' => $limit );
449 return eZPersistentObject::fetchObjectList( eZWorkflowProcess::definition(),
450 null, $conds, null, $limitation,
451 $asObject );
452 }
453
454 static function createKey( $parameters, $keys = null )
455 {
456 $string = '';
457 if ( $keys != null )
458 {
459 foreach ( $keys as $key )
460 {
461 $value = $parameters[$key];
462 if ( is_array( $value ) )
463 {
464 $value = serialize( $value );
465 }
466 $string .= $key . $value;
467 }
468 }else
469 {
470 foreach ( array_keys( $parameters ) as $key )
471 {
472 $value = $parameters[$key];
473 if ( is_array( $value ) )
474 {
475 $value = serialize( $value );
476 }
477 $string .= $key . $value;
478 }
479 }
480 return md5( $string );
481 }
482
483
484
485 static function fetchListByKey( $searchKey, $asObject = true )
486 {
487 return eZPersistentObject::fetchObjectList( eZWorkflowProcess::definition(),
488 null,
489 array( 'process_key' => $searchKey ), null, null,
490 $asObject );
491 }
492
493 static function fetchUserList( $userID, $asObject = true )
494 {
495 $conds = array( 'user_id' => $userID );
496 return eZPersistentObject::fetchObjectList( eZWorkflowProcess::definition(),
497 null, $conds, null, null,
498 $asObject );
499 }
500
501 static function fetchForContent( $workflowID, $userID,
502 $contentID, $contentVersion, $nodeID,
503 $asObject = true )
504 {
505 $conds = array( 'workflow_id' => $workflowID,
506 'user_id' => $userID,
507 'content_id' => $contentID,
508 'content_version' => $contentVersion,
509 'node_id' => $nodeID );
510 return eZPersistentObject::fetchObjectList( eZWorkflowProcess::definition(),
511 null, $conds, null, null,
512 $asObject );
513 }
514
515 static function fetchForStatus( $status = eZWorkflow::STATUS_DEFERRED_TO_CRON, $asObject = true )
516 {
517 $conds = array( 'status' => $status );
518
519 $db = eZDB::instance();
520 if ( $db->databaseName() == 'oracle' )
521 $conds['LENGTH(memento_key)'] = array( '!=', 0 );
522 else
523 $conds['memento_key'] = array( '!=', '' );
524
525 return eZPersistentObject::fetchObjectList( eZWorkflowProcess::definition(),
526 null, $conds, null, null,
527 $asObject );
528 }
529
530 static function fetchForSession( $sessionKey, $workflowID, $asObject = true )
531 {
532 $conds = array( 'workflow_id' => $workflowID,
533 'session_key' => $sessionKey );
534 return eZPersistentObject::fetchObjectList( eZWorkflowProcess::definition(),
535 null, $conds, null, null,
536 $asObject );
537 }
538
539 function currentEvent()
540 {
541 }
542
543 function advanceToNext()
544 {
545 }
546
547 function setParameters( $parameterList = null )
548 {
549 if ( $parameterList !== null )
550 {
551 $this->Parameters = $parameterList;
552 unset( $this->ParameterList );
553 }
554 $this->setAttribute( 'parameters', serialize( $this->Parameters ) );
555 return $this->attribute( 'parameter_list' );
556 }
557
558 function user()
559 {
560 if ( isset( $this->UserID ) and $this->UserID )
561 {
562 return eZUser::instance( $this->UserID );
563 }
564 return null;
565 }
566
567 function content()
568 {
569 if ( isset( $this->ContentID ) and $this->ContentID )
570 {
571 return eZContentObject::fetch( $this->ContentID );
572 }
573 return null;
574 }
575
576 function node()
577 {
578 if ( isset( $this->NodeID ) and $this->NodeID )
579 {
580 return eZContentObjectTreeNode::fetch( $this->NodeID );
581 }
582 return null;
583 }
584
585 function workflow()
586 {
587 if ( isset( $this->WorkflowID ) and $this->WorkflowID )
588 {
589 return eZWorkflow::fetch( $this->WorkflowID );
590 }
591 return null;
592 }
593
594 function workflowEvent()
595 {
596 if ( isset( $this->EventID ) and $this->EventID )
597 {
598 return eZWorkflowEvent::fetch( $this->EventID );
599 }
600 return null;
601 }
602
603 function lastWorkflowEvent()
604 {
605 if ( isset( $this->LastEventID ) and $this->LastEventID )
606 {
607 return eZWorkflowEvent::fetch( $this->LastEventID );
608 }
609 return null;
610 }
611
612 function parameterList()
613 {
614 if ( !isset( $this->ParameterList ) )
615 {
616 $this->ParameterList = unserialize( $this->attribute( 'parameters' ) );
617 }
618 return $this->ParameterList;
619 }
620
625 function removeThis()
626 {
627 $workflowParameters = $this->attribute( 'parameter_list' );
628 $cleanupList = array();
629
630 $db = eZDB::instance();
631 $db->begin();
632 if ( isset( $workflowParameters['cleanup_list'] ) && is_array( $workflowParameters['cleanup_list'] ) )
633 {
634 $cleanupList = $workflowParameters['cleanup_list'];
635 foreach ( $cleanupList as $workflowEventID )
636 {
637 $workflowEvent = eZWorkflowEvent::fetch( $workflowEventID );
638 $workflowType = $workflowEvent->eventType();
639 $workflowType->cleanup( $this, eZWorkflowEvent::fetch( $workflowEventID ) );
640 }
641 }
642 eZPersistentObject::removeObject( eZWorkflowProcess::definition(), array( 'id' => $this->attribute( 'id' ) ) );
643 $db->commit();
644 }
645
652 function cleanup()
653 {
654 $db = eZDB::instance();
655 $db->query( "DELETE FROM ezworkflow_process" );
656 }
657
659 public $ID;
660 public $WorkflowID;
661 public $UserID;
662 public $ContentID;
663 public $NodeID;
664 public $EventID;
665 public $EventPosition;
666 public $LastEventID;
667 public $LastEventPosition;
668 public $LastEventStatus;
669 public $EventStatus;
670 public $Created;
671 public $Modified;
672 public $ActivationDate;
673 }
674
675 ?>
eZContentObjectTreeNode\fetch
static fetch( $nodeID=false, $lang=false, $asObject=true, $conditions=false)
Definition: ezcontentobjecttreenode.php:3058
eZContentObject\fetch
static fetch( $id, $asObject=true)
Definition: ezcontentobject.php:885
eZDB\instance
static instance( $databaseImplementation=false, $databaseParameters=false, $forceNewInstance=false)
Definition: ezdb.php:117
eZDebugSetting\writeDebug
static writeDebug( $conditionName, $string, $label="")
Definition: ezdebugsetting.php:127
eZDebug\writeError
static writeError( $string, $label="", $backgroundClass="")
Definition: ezdebug.php:545
eZDebug\writeWarning
static writeWarning( $string, $label="", $backgroundClass="")
Definition: ezdebug.php:502
eZPersistentObject
Definition: ezpersistentobject.php:33
eZPersistentObject\hasAttribute
hasAttribute( $attr)
Definition: ezpersistentobject.php:1309
eZPersistentObject\fetchObject
static fetchObject( $def, $field_filters, $conds, $asObject=true, $grouping=null, $custom_fields=null)
Definition: ezpersistentobject.php:213
eZPersistentObject\removeObject
static removeObject( $def, $conditions=null, $extraConditions=null)
Definition: ezpersistentobject.php:271
eZPersistentObject\setAttribute
setAttribute( $attr, $val)
Definition: ezpersistentobject.php:1374
eZPersistentObject\attribute
attribute( $attr, $noFunction=false)
Definition: ezpersistentobject.php:1329
eZPersistentObject\fetchObjectList
static fetchObjectList( $def, $field_filters=null, $conds=null, $sorts=null, $limit=null, $asObject=true, $grouping=false, $custom_fields=null, $custom_tables=null, $custom_conds=null)
Definition: ezpersistentobject.php:806
eZUser\instance
static instance( $id=false)
Definition: ezuser.php:1163
eZWorkflowEvent
Definition: ezworkflowevent.php:18
eZWorkflowEvent\fetch
static fetch( $id, $asObject=true, $version=0, $field_filters=null)
Definition: ezworkflowevent.php:138
eZWorkflowProcess
Definition: ezworkflowprocess.php:18
eZWorkflowProcess\create
static create( $processKey, $parameters)
Definition: ezworkflowprocess.php:134
eZWorkflowProcess\setParameters
setParameters( $parameterList=null)
Definition: ezworkflowprocess.php:547
eZWorkflowProcess\run
run(&$workflow, &$workflowEvent, &$eventLog)
Definition: ezworkflowprocess.php:181
eZWorkflowProcess\advanceToNext
advanceToNext()
Definition: ezworkflowprocess.php:543
eZWorkflowProcess\$EventPosition
$EventPosition
Definition: ezworkflowprocess.php:665
eZWorkflowProcess\$UserID
$UserID
Definition: ezworkflowprocess.php:661
eZWorkflowProcess\$ContentID
$ContentID
Definition: ezworkflowprocess.php:662
eZWorkflowProcess\$EventID
$EventID
Definition: ezworkflowprocess.php:664
eZWorkflowProcess\fetchForStatus
static fetchForStatus( $status=eZWorkflow::STATUS_DEFERRED_TO_CRON, $asObject=true)
Definition: ezworkflowprocess.php:515
eZWorkflowProcess\currentEvent
currentEvent()
Definition: ezworkflowprocess.php:539
eZWorkflowProcess\content
content()
Definition: ezworkflowprocess.php:567
eZWorkflowProcess\$LastEventStatus
$LastEventStatus
Definition: ezworkflowprocess.php:668
eZWorkflowProcess\advance
advance( $next_event_id=0, $next_event_pos=0, $status=0)
Definition: ezworkflowprocess.php:170
eZWorkflowProcess\$Modified
$Modified
Definition: ezworkflowprocess.php:671
eZWorkflowProcess\cleanup
cleanup()
Definition: ezworkflowprocess.php:652
eZWorkflowProcess\parameterList
parameterList()
Definition: ezworkflowprocess.php:612
eZWorkflowProcess\fetch
static fetch( $id, $asObject=true)
Definition: ezworkflowprocess.php:437
eZWorkflowProcess\$NodeID
$NodeID
Definition: ezworkflowprocess.php:663
eZWorkflowProcess\createKey
static createKey( $parameters, $keys=null)
Definition: ezworkflowprocess.php:454
eZWorkflowProcess\$ActivationDate
$ActivationDate
Definition: ezworkflowprocess.php:672
eZWorkflowProcess\$Created
$Created
Definition: ezworkflowprocess.php:670
eZWorkflowProcess\$EventState
$EventState
Definition: ezworkflowprocess.php:22
eZWorkflowProcess\lastWorkflowEvent
lastWorkflowEvent()
Definition: ezworkflowprocess.php:603
eZWorkflowProcess\removeThis
removeThis()
Definition: ezworkflowprocess.php:625
eZWorkflowProcess\fetchListByKey
static fetchListByKey( $searchKey, $asObject=true)
Definition: ezworkflowprocess.php:485
eZWorkflowProcess\$LastEventID
$LastEventID
Definition: ezworkflowprocess.php:666
eZWorkflowProcess\$ID
$ID
Definition: ezworkflowprocess.php:659
eZWorkflowProcess\$EventStatus
$EventStatus
Definition: ezworkflowprocess.php:669
eZWorkflowProcess\reset
reset()
Definition: ezworkflowprocess.php:158
eZWorkflowProcess\definition
static definition()
Definition: ezworkflowprocess.php:25
eZWorkflowProcess\workflow
workflow()
Definition: ezworkflowprocess.php:585
eZWorkflowProcess\$LastEventPosition
$LastEventPosition
Definition: ezworkflowprocess.php:667
eZWorkflowProcess\fetchList
static fetchList( $conds=null, $asObject=true, $offset=false, $limit=false)
Definition: ezworkflowprocess.php:445
eZWorkflowProcess\workflowEvent
workflowEvent()
Definition: ezworkflowprocess.php:594
eZWorkflowProcess\user
user()
Definition: ezworkflowprocess.php:558
eZWorkflowProcess\fetchForSession
static fetchForSession( $sessionKey, $workflowID, $asObject=true)
Definition: ezworkflowprocess.php:530
eZWorkflowProcess\$WorkflowID
$WorkflowID
Definition: ezworkflowprocess.php:660
eZWorkflowProcess\fetchUserList
static fetchUserList( $userID, $asObject=true)
Definition: ezworkflowprocess.php:493
eZWorkflowProcess\$Parameters
$Parameters
Definition: ezworkflowprocess.php:23
eZWorkflowProcess\fetchForContent
static fetchForContent( $workflowID, $userID, $contentID, $contentVersion, $nodeID, $asObject=true)
Definition: ezworkflowprocess.php:501
eZWorkflowProcess\$ParameterList
$ParameterList
Definition: ezworkflowprocess.php:24
eZWorkflowProcess\node
node()
Definition: ezworkflowprocess.php:576
eZWorkflowType
Definition: ezworkflowtype.php:18
eZWorkflowType\STATUS_DEFERRED_TO_CRON_REPEAT
const STATUS_DEFERRED_TO_CRON_REPEAT
Definition: ezworkflowtype.php:24
eZWorkflowType\STATUS_REDIRECT
const STATUS_REDIRECT
Definition: ezworkflowtype.php:29
eZWorkflowType\STATUS_ACCEPTED
const STATUS_ACCEPTED
Definition: ezworkflowtype.php:21
eZWorkflowType\STATUS_REDIRECT_REPEAT
const STATUS_REDIRECT_REPEAT
Definition: ezworkflowtype.php:31
eZWorkflowType\STATUS_WORKFLOW_DONE
const STATUS_WORKFLOW_DONE
Definition: ezworkflowtype.php:30
eZWorkflowType\STATUS_FETCH_TEMPLATE
const STATUS_FETCH_TEMPLATE
Definition: ezworkflowtype.php:27
eZWorkflowType\STATUS_RUN_SUB_EVENT
const STATUS_RUN_SUB_EVENT
Definition: ezworkflowtype.php:25
eZWorkflowType\STATUS_WORKFLOW_RESET
const STATUS_WORKFLOW_RESET
Definition: ezworkflowtype.php:32
eZWorkflowType\STATUS_FETCH_TEMPLATE_REPEAT
const STATUS_FETCH_TEMPLATE_REPEAT
Definition: ezworkflowtype.php:28
eZWorkflowType\statusName
static statusName( $status)
Definition: ezworkflowtype.php:73
eZWorkflowType\STATUS_REJECTED
const STATUS_REJECTED
Definition: ezworkflowtype.php:22
eZWorkflowType\STATUS_NONE
const STATUS_NONE
Definition: ezworkflowtype.php:20
eZWorkflowType\STATUS_DEFERRED_TO_CRON
const STATUS_DEFERRED_TO_CRON
Definition: ezworkflowtype.php:23
eZWorkflowType\STATUS_WORKFLOW_CANCELLED
const STATUS_WORKFLOW_CANCELLED
Definition: ezworkflowtype.php:26
eZWorkflow\STATUS_CANCELLED
const STATUS_CANCELLED
Definition: ezworkflow.php:24
eZWorkflow\fetch
static fetch( $id, $asObject=true, $version=0)
Definition: ezworkflow.php:302
eZWorkflow\STATUS_DEFERRED_TO_CRON
const STATUS_DEFERRED_TO_CRON
Definition: ezworkflow.php:23
eZWorkflow\STATUS_FAILED
const STATUS_FAILED
Definition: ezworkflow.php:22
eZWorkflow\STATUS_DONE
const STATUS_DONE
Definition: ezworkflow.php:21
eZWorkflow\STATUS_FETCH_TEMPLATE
const STATUS_FETCH_TEMPLATE
Definition: ezworkflow.php:25
eZWorkflow\STATUS_FETCH_TEMPLATE_REPEAT
const STATUS_FETCH_TEMPLATE_REPEAT
Definition: ezworkflow.php:29
eZWorkflow\STATUS_RESET
const STATUS_RESET
Definition: ezworkflow.php:27
eZWorkflow\STATUS_REDIRECT
const STATUS_REDIRECT
Definition: ezworkflow.php:26
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.