Getting values from the activity dynamically multiple times

I have a scenario where I need to log the CPU usage and memory details for every completion of test case. For this flow, no framework or data sheets are used.

Scenario:
I have created workflow called “checkup” to record the usage(memory&CPU) and add it to a collection as CPU_values and Memory_values collection variables
I have 10 different test cases as 10 different work flows. i need to invoke the “checkup” workflow in each test case. after completion of each test case, the values count in the collection(CPU_values and Memory_values) should be incremented by 1.
End of all the test cases, I will print both the collection values into excel sheet.

I have implemented accordingly, but getting an error which i am unable to get a solution Kindly help on thisMain.xaml (16.8 KB) CPU_memory_usage.xaml (6 KB)

I’m not sure what errors you are getting, but I see one potential problem with your Arguments.

In your CPU_memory_usage.xaml, the arguments are IN/OUT, but in your Main Invokes, they are OUT.

1 Like

I am getting reference not set to instance of an object nullpointer error.

Or else, please let me know if you have a better solution for the scenario i explained above

Thanks a lot for the quick reply @ClaytonM

Issue is resolved…initially, I set the arguments with OUT, but, with IN/OUT its working perfectly…This IN/OUT is really a confusing topic
:stuck_out_tongue:

Awesome :grin:

I can comment on this, to hopefully simplify your thoughts toward arguments.
—Use IN if the value comes from another workflow and will not need to be returned back
—Use OUT if the value originates in the workflow and to return it back
—Use IN/OUT if the value comes from another workflow and will also need to be returned back, usually used to continually update the value throughout the process

EDIT: Also, the Invoke arguments should match the direction that it is in the workflow otherwise you will get failures potentially.

Regards.

Thanks @ClaytonM…this is easily understood now :smiley: