i need to include some activities just at the end of the process(using REF), my question is: if i want to do this action in the end stage but only in case of no data, and not in case of init system exception.
Where could i put my activities?
Usually in REFramework will go to End state
- If there is any system exception
- If there is no data like TransactionItem is Nothing
So it works already in that way and we don’t require any changes to be done explicitly
This we can include any activity we want to have at the final stage which REFramework already considers the scenario if there is no data
And for this
As already mentioned you can keep in end state itself
You can use a Boolean variable in init stage which you can set as true when exception occurs in init stage.
So now when control comes to end process, check value of that variable, if true that means it has reached there via init stage exception, thus put the activity you want to do otherwise in else part.
Be sure to consider additional error handling in your end process. Init and Process states have their mechanisms in REF, End Process a bit less.
Lets say you want to add values to an excel in your end process and it fails (file in use?), consider what to do with your data before it is lost… Would be sad if you reported on 1000 transaction items and not being able to mail the report to your client…
If you see here it already works in that case only
If you want to remove the transition which will take to end state if any system exception occurs