Loading...

Workflow Troubleshooting

Unable to Execute Interactive Workflows

Symptom

The interactive workflow job goes to a pending state with the following message:

Interactive session is not available

Resolution

If the Workflow requires user input or displays an information message during execution, make sure to enable interactive session for the Workflow.

  1. From the Workflow window, go to the Workflow Properties pane.
  2. Set the Start Interactive Session property to True in the Value column.
  3. Save and deploy the workflow.

Workflow SQL queries that include SELECT statements are not returning the expected values

Symptom

Your Workflow SQL query includes a SELECT statement and an INSERT or UPDATE statement and the query does not evaluate statements after the INSERT or UPDATE statement.

Resolution

Add a SET NOCOUNT ON statement to the beginning of the query to perform queries that include a SELECT statement and an INSERT or UPDATE statement.

Example

/* ---------- */
SET NOCOUNT ON
-- Resultset 1 SELECT 'test 1'
DECLARE @tblTest TABLE ( colTest nvarchar(255) )
-- Resultset 2 SELECT 'test 2'
INSERT INTO @tblTest VALUES ('resultTest')
-- Resultset 3 SELECT 'test 3'
-- Resultset 4 SELECT * from @tblTest
/* ---------- */

Troubleshooting Workflows using logs

If a Workflow does not execute exactly as planned, look for issues is in the [WorkflowEngine.LOG]. This log file contains an event record of Workflow Engine deployments and Workflow executions. Using this log you can easily view all activity inputs and outputs and determine the problem in your Workflow.

By default, every activity that executes starts with a line containing “starting activity [ACTIVITY NAME]” and ends with a line “completing activity [ACTIVITY NAME]”. In between, there are “inputs” tags containing all relative data that the activity received and “outputs” tag containing all data that the workflow generated for the activity.

Along with the default logging provided by the Workflow Engine you can also add customized log messages using the logger.info(); java statement. For example:

logger.info (“The value of variable x is: [“ + xpath:{/workflow/ExecuteScript_1/commandOutput} + “]”);

All logger.info() messages are displayed in the WorkflowEngine.LOG along with the default messages. These customized messages appear in a line beginning with “Interpreter : YOUR MESSAGE”.  For example:

52792   837379    12/12 13:22:55   809367   Interpreter : The value of variable x is: [xyz]

In addition, the customized logger.info() messages are also displayed in the WorkflowCustom.LOG file. 

The WorkflowCustom.LOG file maintains a streamlined log of customized messages you choose to view. For example:

52792   837379    12/12 13:22:55   809367   Workflow Name : The value of variable x is: [xyz]

Last modified: 3/8/2018 5:28:04 PM