Skip to main content
Nintex Community Menu Bar
Solved

SourceCode.Workflow.Managagement with filter produces an error

  • April 16, 2018
  • 4 replies
  • 15 views
  • Translate

Forum|alt.badge.img+2

Hi,

 

Trying to use the K2 SourceCode.Workflow.Managagement with filter produces an error "error converting nvarchar to int" - any suggestions?

 

Thanks

Steve

Best answer by khanh1

Hi,

Perhaps you can check out the ServerLog.Status table
View original
Did this topic help you find an answer to your question?

4 replies

Forum|alt.badge.img+18
  • 555 replies
  • April 16, 2018

Please attach some detail/line of codes where this is thrown.


From the error so far, perhaps a different method/overload/parameter type was used than what was intended?


https://vijaydk2guy.wordpress.com/2017/09/16/exploring-sourcecode-workflow-management-getworklistitems-method/

Translate

Forum|alt.badge.img+2
  • Author
  • 8 replies
  • April 17, 2018

here's the piece of code I use to GetWorkListItems - filters are commented out since they cause the above mentioned problem.

p.s - I use only 1 filter at a time just for clarification due to the FilterCondition.AND statements at the end.

 

public static WorklistItems GetWorkflowList()
{
SourceCode.Workflow.Management.Criteria.WorklistCriteriaFilter filter = new SourceCode.Workflow.Management.Criteria.WorklistCriteriaFilter();
WorkflowManagementServer wms = GetWFManagementServer();
if (wms.Connection.IsConnected)
{
filter.AddRegularFilter(SourceCode.Workflow.Management.WorklistFields.ProcessFullName,
SourceCode.Workflow.Management.Criteria.Comparison.Equals, "LPE.BrokerUnderwriterLPEBrokerUnderwriter");
//filter.AddRegularFilter(SourceCode.Workflow.Management.WorklistFields.Status,
// SourceCode.Workflow.Management.Criteria.Comparison.Equals, "Available", RegularFilter.FilterCondition.AND);
//filter.AddRegularFilter(SourceCode.Workflow.Management.WorklistFields.Status,
// SourceCode.Workflow.Management.Criteria.Comparison.Equals, "Open", RegularFilter.FilterCondition.AND);
}
WorklistItems wi = wms.GetWorklistItems(filter);
return wi;
}

Translate

Forum|alt.badge.img+2
  • Author
  • 8 replies
  • April 17, 2018

found the problem ... in the filter the Status is an Integer value rather than a string - what table do I look in to find the Status numbers? all I see in the worklist is the string representation of the status such as "Available", "Open" etc..

Translate

Forum|alt.badge.img+16
  • 682 replies
  • Answer
  • April 17, 2018
Hi,

Perhaps you can check out the ServerLog.Status table
Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings