Add my own counter in ReFramework

Hi,

I have this process which will track the # of completed file and # of error file. I am using the ReFramework with Queue. I put this process in PROCESS.XAML but my counter is broken

Assign goodFileCount = 0
Assign badFileCount = 0

If good, goodFileCount = goodFileCount +1
If bad, badFileCount = badFileCount + 1

And then after all transactions are proceeded, I will output this 2 numbers in END PROCESS.

However in this case, for each transaction, it will go through this process again and reset my counter when I put these in PROCESS.XAML…

Each file is a transaction

Question is how can I track the count and not having it to reset my counter… should I put the counters in the INIT? what’s the best approach?

Thanks!

Put these counters in Main.XAML and set default value to zero.

In Process.XAML, Create two IN/OUT arguments for the counters.
In the invoked workflow of process.xaml, import arguments and assign the arguments to the counters created in the Main.XAML.

And again please pass these counters as IN argument in END Process.

Regards,
Karthik Byggari

2 Likes

Hello!

Where in MAIN.XAML though? It didn’t allow me to drag and drop activities in main…
Right, in/out arguments!

In Main.XAML, you have to create two variables for counters.
And in the process.xaml, create two IN/OUT arguments for these two counters.

oh right… I don’t need to drag any activities in MAIN. Got it. Thanks

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.