Username Password
Bookmark and Share
View All Tickets
"fatal" error status return from Workflow Activity plugin modules  (#3487)
IssueRequest:  Workflow Activity plugin modules do not have the option to return a "fatal" error status such that spectre can know and not attempt to retry the workflow.

Summary: Mike Schroeder discussed the issue of passing back additional information with JT Smith in an email dated end of October.  We have also come across the issue of needing, or desiring to have an identified "fatal" constant passed back from an errored workflow.  This will tell Spectre NOT to attempt a rerun of the workflow as a fatal error has occurred (an error that will not allow the workflow to run, regardless of an attempt to rerun it).

Outcomes desired:
1) Fix the Spectre::Workflow->workerResponse() so that Spectre can identify a Fatal error and not attempt to execute this again.
2) Documentation request on Extended return information (based on JT and Mike's converstation in October:
We would like to request documentation to assure that extended information is supported, i.e. assurance that future changes to WebGUI::Workflow::Instance->run wouldnt blow up on extended return content.  On the other hand, Spectre::Workflow->workerResponse probably would get tripped up by extended info in the returned content, something that was
not noted in October.)

At the end of this is an "idea" snippet of perl to address the fatal error.  "Idea" refers to code that is untested, and has never been run, but is merely a "suggestion" of where to start, from our perspective.



Details (forward from a colleague):
Results from Workflow: "complete" "done" "error" or "waiting",
in HTTP content as text/plain.

The only ones apparently intended for use in Activities - those exposed
as constants in - are "complete" "error" "waiting".
API doc for WebGUI::Workflow::Instance->run has a more complete list.

POD for WebGUI::Workflow::Instance->run notes that Spectre will
"Try again later" in case of "error", as can be confirmed in
Spectre::Workflow->workerResponse() & suspendInstance().
This does not offhand give us a way to report errors that are
permanent/final/fatal, such that the activity should not be retried.
For now we are making do by returning "done" - as in fact done by
www_runWorkflow in stock WebGUI - and logging the error in webgui.log -
but this does not give meaningful status to dwpush.
Mike proposes to add another status value "fatal", which would report
error and deleteInstance in workerResponse.  (Mike-Randall jabber
2007-12-04.)  Specifically, Mike proposes for *PlainBlack* to add the
"fatal" status value, and for DW not to maintain a fork.

Fatal errors can be either an error from creating a workflow instance,
such as invalid token in createWorkflowInstanceRemotely, or an error
from the specific Workflow activity (e.g. see 3d in 143700.notes.txt).
Details about error occurences can be found in the webgui.log file.

It might be possible to try to append some additional info with "error"
and/or with "fatal", but then it would not strictly conform to the
WebGUI interface for Workflow activities, with a-priori-unknown level
of ongoing risk of incompatibilities.  This was discussed with JT
[a while back, before today's discussion of "fatal"], who
responded favorably about appending details to "error",
but nothing ensued [dwpush presently dumps to log w/o branching].


# Idea scratch code
        } elsif ($state eq "fatal") {
            $self->debug("Got a fatal error response for $instanceId.");
Solution Summary
12/11/2007 6:19 pm

This isn't what we discussed. We discussed handing back additional information from the operation that you call to initiate a workflow via a web service. However, you should in no case be communicating with Spectre or the Workflow engine other than to trigger a new workflow.

In addition, even if this was what we discussed, it would be an RFE not a bug.

RFE denied. 

Ticket Status Closed  
Submitted Byjdrockho 
Date Submitted2007-12-05 
Assigned To unassigned  
Date Assigned2019-08-25 
Assigned By 
Severity Minor (annoying, but not harmful)  
What's the bug in?  
WebGUI / WRE Version 7.4.15/0.81  
Ticket History
© 2019 Plain Black Corporation | All Rights Reserved