- Added a realtime workflow option for content publishing.

- Added switches to auto request commit operations and skip adding comments.
This commit is contained in:
JT Smith 2007-05-30 16:07:43 +00:00
parent c09b2cae1b
commit 3259da6750
403 changed files with 350 additions and 50605 deletions

View file

@ -15,6 +15,7 @@ package WebGUI::VersionTag;
=cut
use strict;
use Carp qw(carp);
use WebGUI::Asset;
use WebGUI::Workflow::Instance;
@ -383,7 +384,8 @@ sub new {
=head2 requestCommit ( )
Locks the version tag and then kicks off the approval/commit workflow for it.
Locks the version tag and then kicks off the approval/commit workflow for it. A carp is thrown if workflow is
realtime and fails.
=cut
@ -399,6 +401,19 @@ sub requestCommit {
$self->{_data}{committedBy} = $self->session->user->userId;
$self->{_data}{workflowInstanceId} = $instance->getId;
$self->session->db->setRow("assetVersionTag","tagId",$self->{_data});
# deal with realtime
if ($instance->getWorkflow->isRealtime) {
my $status = $instance->runAll;
if ($status eq "done") {
$instance->delete;
} else {
my $errorMessage = "Realtime workflow instance ".$instance->getId." returned status ".$status." where
'done' was expected";
$self->session->errorHandler->warn($errorMessage);
carp $errorMessage;
}
}
}