Solved

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


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:14682iA2228AA135824DBC.png

 

 

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.


12806i8FA1DDBE7B04D8B3.png
15971iA62C0949765E3F8C.png
10849iB0137C45F30F2C9B.png
15200iE02A164A8E411E64.png
15114i457B75AF84F66C37.png
11368iE6F5A2AC0E008F2B.png

icon

Best answer by nathanbloomfiel 10 July 2020, 15:37

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 

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