Thursday, April 8, 2010

Implementation of an error control in a Workflow

It’s well known that a workflow requires an error control for a robust process design. The next diagram shows an overview of the proposed error control:


As it’s shown, an error control provided a consistent tool , not only providing a log but also inform user about a problem in real-time by mail.
The following section contains the minimum settings required :

  • Step: Write to log

Using the Business Service EAI File Transport (Method: Send), it’s created a log which includes parameters in order to analyze any trouble detected.



Argument :Type :Value :IN/OUT :
ValueExpression"Step which an error is detected: "+[&Step]+
"Variables: "+[&Error Code] +[…]
IN
AppendToFile LiteraltrueIN
FileNameExpression[&Dir]+"\ErrorWorkflow_N”+ tochar(today(),"DDMMYY")+".log”IN



  • Step: Send a mail


This step send a mail to specific list detailed, using method “SendMessage” from BS “Outbound Communications Manager”.

Input Argument:Type :Value :
CommProfileLiteralUser
MsgHTMLBodyExpression(expression detailed below )
MsgSubjectLiteralWfw Example failed
MsgToListLiteralmail@address.x
ProcessModeLiteralRemote


Where MsgHTMLBody also includes parameters that permit an end-user to detect any trouble:



start tag P Workflow Execution Error

start tag TABLE
start tag TR

start tag TD Step :end tag TD
start tag TD "+[&Step]+"end tag TD
start tag TD Error : end tag TD
start tag TD "+[&Error]+" end tag TD
end tag TR
end tag TABLE


end tag P