Private Method Details |
&brew |
|
private object [unknown] &brew( int $procDefId, int $destId, string $spec, [ integer $mode, integer $wfs ] )
|
| |
Static method
Start a new WorkflowProc
|
| Parameter |
|
| int |
$procDefId |
|
|
id of the procdef / id of the proc |
|
|
| int |
$destId |
|
|
: the id of the dest branch |
|
|
| string |
$spec |
|
|
: guid or path |
|
|
|
|
| integer |
$wfs |
= >>0<< |
|
the WorkflowSession (optional) omit if you want to use the default WorkflowSession |
|
| Returns |
object [unknown] $wfProc |
|
&readById |
|
private object [unknown] &readById( int $id, [ integer $vcs ] )
|
| |
Static method
Construct a WorkflowProc from the DB by id
|
| Parameter |
|
|
|
| integer |
$vcs |
= >>0<< |
|
(optional) omit if you want to use the default WorkflowSession |
|
| Returns |
object [unknown] $wfProc |
|
getMissingDeps |
|
private array getMissingDeps( )
|
| |
Get objects (list of guids) that 1) the objects affected by this proc depend on and 2) are not present on the destination branch
|
| Returns |
array $guids |
|
getCurrentStep |
|
private void getCurrentStep( )
|
| |
Returns the id of the current step
return int $id
|
| Returns |
void |
|
getCollectionId |
|
private void getCollectionId( )
|
| |
Returns the id of the MgdCollection that is affected by $this
return int $id
|
| Returns |
void |
|
getProcDefId |
|
private void getProcDefId( )
|
| |
Returns the id of the ProcDef (blueprint) for this WorkflowProc
return int $id
|
| Returns |
void |
|
getSrc |
|
private void getSrc( )
|
| |
Returns the id of the source branch
return int $id
|
| Returns |
void |
|
getDest |
|
private void getDest( )
|
| |
Returns the id of the destination branch
return int $id
|
| Returns |
void |
|
getStatus |
|
private void getStatus( )
|
| |
Get the current status as stored in the DB
return int $status
|
| Returns |
void |
|
_setStatus |
|
private bool _setStatus( int $status )
|
| |
Set the status
|
| Parameter |
|
|
| Returns |
bool $ret false if failed |
|
hasApprovePerms |
|
private int hasApprovePerms( [ integer $stepDefObj ] )
|
| |
Checks if the current user may call next() or previous() when the WorkflowProc is at the step specified.
|
| Parameter |
|
| integer |
$stepDefObj |
= >>0<< |
|
(optional) |
|
| Returns |
int $ok |
|
hasUnPublishPerms |
|
private int hasUnPublishPerms( )
|
| |
Checks if the current user may unpublish this process. This is equivalent to the permission to do the last approve step
|
| Returns |
int $ok |
|
approveNext |
|
private int approveNext( [ boolean $force ] )
|
| |
Go to next step, if it's the last step, set status to WF_TO_BE_PUBLISHED
|
| Parameter |
|
| boolean |
$force |
= >>false<< |
|
(optional, default false) if status change should be forced if dependencies are not resolved on the dest branch |
|
| Returns |
int $ok |
|
approvePrevious |
|
private int approvePrevious( )
|
| |
Go back to the previous step
|
| Returns |
int $ok |
|
cancel |
|
private int cancel( )
|
| |
Cancel the workflow process
|
| Returns |
int $ok |
|
undo |
|
private int undo( )
|
| |
Undo / unpublish
|
| Returns |
int $ok |
|
resolveDeps |
|
private int resolveDeps( )
|
| |
Starts the WorkflowProcs necessary to resolve dependencies or suggests to start them if the current user doesn't have permission
|
| Returns |
int $ok |
|
_publish |
|
private int _publish( [ boolean $force ] )
|
| |
Do the publish (internal)
|
| Parameter |
|
| boolean |
$force |
= >>false<< |
|
if it should be forced if dependencies are not resolved on the dest branch |
|
| Returns |
int $ok |
|
_unpublish |
|
private int _unpublish( )
|
| |
Do the unpublish (internal)
|
| Returns |
int $ok |
|
_prepare_step |
|
private void _prepare_step( $stepDefId )
|
| |
For internal use
|
| Parameter |
|
|
$stepDefId |
|
|
Warning: documentation is missing. |
|
| Returns |
void |
|
&searchNotCurrent |
|
private array &searchNotCurrent( [ integer $vcs ] )
|
| |
Static method
Get the ids of all procs in status WF_TO_BE_PUBLISHED or WF_TO_BE_UNPUBLISHED
|
| Parameter |
|
| integer |
$vcs |
= >>0<< |
|
(optional) omit if you want to use the default VCSession |
|
| Returns |
array $partIds |
|
handleStatus |
|
private void handleStatus( )
|
| |
Do pending actions, based on status
|
| Returns |
void |
|