Version Differences for Workflows Stuck on the AHP Server

(Added Job Traces & Changed Layout)
Line 1:
  While AnthillPro is a great product for build & deploy automations, there are problems that can occur/present themselves which cause workflows to be stuck in various statuses on the AnthillPro server. Not only is this seen with workflow cases, but it may happen with job traces, and command traces as well. These errors can occur if a persistant did not update within the database correctly, or if the step threw an error in a manner that caused processing to cease, and an "update" event could not be fired. Usually, the only way to resolve this issue is through database manipulation. Some examples of SQL statements that work are listed below with explanations.    While AnthillPro is a great product for build & deploy automations, there are problems that can occur/present themselves which cause workflows to be stuck in various statuses on the AnthillPro server. Not only is this seen with workflow cases, but it may happen with job traces, and command traces as well. These errors can occur if a persistant did not update within the database correctly, or if the step threw an error in a manner that caused processing to cease, and an "update" event could not be fired. Usually, the only way to resolve this issue is through database manipulation. Some examples of SQL statements that work are listed below with explanations. 
       
- = Workflow Case =   + = Components =  
    + == Workflow Cases ==  
  Workflow cases may not update properly if the WorkflowEndEvent does not fire. In that case, the SQL below will update the WorkflowCase.    Workflow cases may not update properly if the WorkflowEndEvent does not fire. In that case, the SQL below will update the WorkflowCase. 
- == SQL to Set All Running Workflows to a Status ==   + === SQL to Set All Running Workflows to a Status ===  
- <pre> UPDATE WORKFLOW_CASE SET STATUS = 'XX' WHERE STATUS = 'YY';</pre>   + <pre>UPDATE WORKFLOW_CASE SET STATUS = 'XX' WHERE STATUS = 'YY';</pre>  
- == SQL to Set Workflows With Certain BuildLife ID ==   + === SQL to Set Workflows With Certain BuildLife ID ===  
  Replace '''ZZ''' with the ID of your Build Life.    Replace '''ZZ''' with the ID of your Build Life. 
- <pre> UPDATE WORKFLOW_CASE SET STATUS = 'XX' WHERE BUILD_LIFE_ID = ZZ;</pre>   + <pre>UPDATE WORKFLOW_CASE SET STATUS = 'XX' WHERE BUILD_LIFE_ID = ZZ;</pre>  
    + == Job Traces ==  
    + Much like Workflow Cases, Job Traces can fail to update if an event to end the job does not fire.  
    + === SQL to Set All Running Jobs to a Status ===  
    + <pre>UPDATE JOB_TRACE SET STATUS = 'XX' WHERE STATUS = 'YY';</pre>