On April 27, 2024, our Sign-in and Create Account options will be unavailable from 9am-12pm ET. During this maintenance window, developer account access and free trial registration will be unavailable.

Submits with conflicts still succeed

Is it possible to catch the condition of workflows that submit files in conflict with staging?
According to the workflow documentation (v5.0.1) the submit task still succeeds if files are not submitted due to conflicts with staging. It appears that there is no notification for this condition. Does anyone have a solution to this?

Comments

  • In my experience, if a submittask results in a conflict for any file, the submittask is stuck in a "Resolve Conflict" state. I agree that it would be nice if there were a way to configure this state so that a notification was sent if this condition occurred. The submittask will not complete until you resolve the conflict(s). I think the documentation you refer to is speaking of the state of the submit task itself rather then the submission of the files. There is a difference, although it isn't worded very well and I see how that can be confusing. Regardless, your workflow will not move on to the successor task of the submittask until all conflicts have been resolved. Hope that helps. Email me if you'd like more info.

    Dave Smith
    davidh.smith@nike.com

    <font color='red'>Dave Smith</font>
    DavidH.Smith@nike.com
  • In our worflow, the submit task immediately follows a CGI task. We monitor the task from the CGI doning the callback. Submit and update tasks have an attention attribute that is set when a conflict or error occurs. You can check the attributte using the command line tool iwgetwfobj


    $wftask->CallBack(0)

    #
    # Monitor submit task for completion or errors
    #
    print "Submitting files . ";

    my $submittask;
    foreach my $task (@{$wfjob->GetTasks()})
    {
    $submittask = $task if($task->GetName() eq "Submit")
    }

    #
    # Set up a signal handler in case this is a long loop.
    # Apache should send a PIPE signal if the browser moves to a new page (or is stopped).
    #
    use sigtrap 'handler' => sub {print "signal received\n";exit;}, 'normal-signals';

    for(; $submittask->GetState() !~ /^(inactivated|done)$/i and not $conflict; )
    {

    print " . ";

    #
    # TeamSite task library doesn't have getAttention method, so we
    # have to access the xml directly
    #
    $conflict = TRUE if( $submittask->{xml}[1][0]{attention} ne '' );

    if(DEBUG)
    {
    print "\n state = ", $submittask->GetState(), "\n",
    "\n attention = ", $submittask->{xml}[1][0]{attention}, "\n";
    }

    # Sleep for 500 milliseconds
    select(undef, undef, undef, 0.500);

    #
    # Requery workflow system. Die if there's an error (like someone deleted the job)
    #
    $submittask->Refresh();
    my $error = $submittask->GetError();
    die "Unable to refresh task. Job $WFJOB_ID may be invalid." if $error;
    }



    Then if there's a conflict we go to the conflict resolution screen using the url


    /iw-bin/iw_cgi_wrapper.cgi/iwconflicts.cgi?session=notused&task_id=$submitTaskID
    <P>
    ==

    Terry Luedtke
    National Library of Medicine
    terry_luedtke@nlm.nih.gov