more workflow bug fixes
This commit is contained in:
parent
9dac1d5178
commit
0ee2d2ad66
4 changed files with 5 additions and 5 deletions
|
|
@ -206,7 +206,7 @@ Saves the results of www_editWorkflow()
|
|||
sub www_editWorkflowSave {
|
||||
my $session = shift;
|
||||
return $session->privilege->insufficient() unless ($session->user->isInGroup("pbgroup000000000000015"));
|
||||
my $workflow = WebGUI::Workflow::Cron->new($session, $session->form->get("workflowId"));
|
||||
my $workflow = WebGUI::Workflow->new($session, $session->form->param("workflowId"));
|
||||
$workflow->set({
|
||||
enabled=>$session->form->get("enabled","yesNo"),
|
||||
isSerial=>$session->form->get("isSerial","yesNo"),
|
||||
|
|
@ -266,7 +266,6 @@ sub www_editWorkflowActivitySave {
|
|||
$activity = $workflow->getActivity($activityId);
|
||||
}
|
||||
$activity->processPropertiesFromFormPost;
|
||||
$workflow->set({enabled=>0});
|
||||
}
|
||||
return www_editWorkflow($session);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ sub execute {
|
|||
my $epoch = $self->session->datetime->time();
|
||||
my $a = $self->session->db->read("select assetId from asset where className='WebGUI::Asset::Wobject::Collaboration'");
|
||||
while (my ($assetId) = $a->array) {
|
||||
my $cs = WebGUI::Asset->new($assetId, "WebGUI::Asset::Wobject::Collaboration");
|
||||
my $cs = WebGUI::Asset->new($self->session, $assetId, "WebGUI::Asset::Wobject::Collaboration");
|
||||
my $archiveDate = $epoch - $cs->get("archiveAfter");
|
||||
my $sql = "select asset.assetId, assetData.revisionDate from Post left join asset on asset.assetId=Post.assetId
|
||||
left join assetData on Post.assetId=assetData.assetId and Post.revisionDate=assetData.revisionDate
|
||||
|
|
@ -80,7 +80,7 @@ sub execute {
|
|||
and Post.threadId=Post.assetId and asset.lineage like ?";
|
||||
my $b = $self->session->db->read($sql,[$archiveDate, $cs->get("lineage").'%']);
|
||||
while (my ($id, $version) = $b->array) {
|
||||
my $thread = WebGUI::Asset->new($id, "WebGUI::Asset::Post::Thread", $version);
|
||||
my $thread = WebGUI::Asset->new($self->session, $id, "WebGUI::Asset::Post::Thread", $version);
|
||||
my $archiveIt = 1;
|
||||
foreach my $post (@{$thread->getPosts}) {
|
||||
$archiveIt = 0 if (defined $post && $post->get("dateUpdated") > $archiveDate);
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ sub execute {
|
|||
my $self = shift;
|
||||
my $size = $self->get("sizeLimit") + 10;
|
||||
my $expiresModifier = 0;
|
||||
my $cache = WebGUI::Cache::FileCache->new;
|
||||
my $cache = WebGUI::Cache::FileCache->new($self->session);
|
||||
while ($size > $self->get("sizeLimit")) {
|
||||
$size = $cache->getNamespaceSize($expiresModifier);
|
||||
$expiresModifier += 60 * 30; # add 30 minutes each pass
|
||||
|
|
|
|||
|
|
@ -220,6 +220,7 @@ sub run {
|
|||
$self->delete;
|
||||
return "done";
|
||||
}
|
||||
$self->session->errorHandler->debug("Running workflow activity ".$activity->getId.", which is a ".(ref $activity).", for instance ".$self->getId.".");
|
||||
my $object = {};
|
||||
my $class = $self->get("className");
|
||||
my $method = $self->get("methodName");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue