Solved

Data not saving from combined methods / how to record workflow version number?

  • 10 June 2020
  • 2 replies
  • 175 views

Badge +1

Having a few issues recording data for a third-party reporting tool. Essentially I'm trying to piece together a method with

Inputs:

ProcInstID

[A few other manual inputs]

 

Output (to a table):

The above inputs

WorkflowVersion

WorkflowName

WorkflowFolio

 

I'm able to get all of this information into my table except for the workflow version.

 

Here is my current configuration:

 

 

I guess the real question is, 'Is there any method with a 'Read' functionality to return the workflow version number from the ProcInstID?' because it looks like the list is the issue here.







icon

Best answer by NathanBloomfiel 10 July 2020, 15:37

Thanks for your input Samuel. 

 

I've actually been in contact with K2 themselves and been given a little bit of SQL code as we are on-prem. This returns everything we need (after a little customisation).

 

Attached for anyone interested.

View original

2 replies

Hello  @NathanBloomfiel


 


There does not appear to be a way to acomplish what you are trying to do with just a single SmartObject. In order for you to be able to use the Get Process Instance Detail method and only return a value based on Process Instance ID, you need to be able to filter on the results of that method since there is not an input parameter for Process Instance ID. Once you add a filter with a Process Instance ID, only a single result is returned with its coresponding Process Version property. My suggestion would be to set up a workflow that will call that SmartObject method with a filter and then use your SmartObject or stored procedure to store all of the data together in SQL. Hope that this helps! 


 


Thanks, 
Samuel 

Badge +1

Thanks for your input Samuel. 

 

I've actually been in contact with K2 themselves and been given a little bit of SQL code as we are on-prem. This returns everything we need (after a little customisation).

 

Attached for anyone interested.

Reply