How would you improve ReFramework?

Very interesting approach! I will definitely steal some.

Another thing my predecessors changed in the default REF is the following:

They added an extra state, called ‘Return’.

  • Transitions in: BusinessRuleException and Success exiting ‘Process Transaction’ state
  • Executes a cleanup of all open applications, returning them to their starting - logged in state.
  • Cleans temp folders and other clean desk activities if required
  • On success, it transitions into the ‘get transaction data’ state to continue the loop.
  • On Error it kills all applications and transitions back to the Init state as if a SE occured.

Benefit: the application cleanup / reset is separated (as much as possible) from the process. This can prevent false negatives when for example you’re order is saved, you get the proper confirmation, but returning to the main menu fails. As part of the process this would lead to an SE while the required ‘task’ was completed.

An impression:

Scrap it completely and start over with a simpler transactional flowchart. Don’t use state machines, there’s no need for them. Don’t use so many Invoke Workflows. Using an Invoke for a XAML that has just a few activities in it adds needless complexity.

The framework I built internally is much easier to follow.

Agree, the state machine is an oversold flowchart, but its there out of the box, which for some of my clients adds value. IN the end you get a framework to do roughly the same.

Many roads lead to rome :slight_smile:

I’d change/add one thing in your flow. The value of that change would depend on how your flow is triggered, but knowing you you’ll poke through that.

If it is a time triggered performer, opening the applications by default can be a form of waste, if you after opening come to the conclusion there are no work (queue) items available. Checking if the workload is > 0 before opening can save some time there. (We used to automate a few applications with long initializations, 2-factor mail authentication and actual captcha’s we need to solve on login. It paid off not doing that when not needed)

There are many templates there out of the box, including a transactional template. I don’t find much value in REF due to its complexity. It’s supposed to be for much larger, more complex automations but a lot of people are in the habit of using it for everything. I even see people trying to use it to build dispatchers.

Time triggers generally aren’t used for a queue. Anyway, this is done intentionally so a failure to open applications does not fail the queue item. It also provides us constant monitoring of applications, passwords, etc. Even if a job runs on a time trigger and there are no items to process, we are still alerted if there is a login issue.

And what’s not obvious from the screenshot is this template has built-in reopening of applications if there is a system exception. Simply set a variable in your catch and the app(s) will be reopened. That’s why it loops back to Open Applications each time.

But I do see your point and yes, for complex logins it could be a time saver.

I feel like that is an oversimplification.
The State Machine gets its advantages when it comes to transitions between the states.
In a Flowchart model you have to go via a flow decision or a flow switch, and these both only accept a single expression, for example ‘Stop = true’, as a result it can end up with you needing to do a flow decision into another flow decision in order to separate the logic gateways, or end if with a really confusing IF statement that encapsulates the logic, a state machine on the other hand gives you full control over the condition for that state transition, which gives you a ton more flexibility, and you can also do things such as putting the restart in the system exception transition to make it ‘pretty’.

I can agree with the sentiment that the REFramework is over designed, but I think thats a usability issue rather than the state machine, if its well designed you shouldnt even need to look at the state machine.

(btw I really like this debate, I tried to start a similar discussion with the MVP group earlier this year as I wanted to create a push to have UiPath really look at the REFramework and give it some much needed modernizations but wanted that to be a group effort and not just my ideas, unfortunately only Paul really engaged with the topic so nice to see others from the community also sharing ideas, I’ll try to get Professional Services, who I believe managing the UiPath templates / frameworks to check out this thread and take some inspiration from what we are all saying).

1 Like

The current state machine is over complicated though. For example in the REframework not once is the “Exit” part used in a state and this is the same for the “action” parts in transitions. I haven’t dived in the state machine docs from .net itself, but I feel like we are somehow misusing it since we aren’t using all of the features.

We are talking about what is in the REF as default. AFAIK, REF still uses workbook activities, so the app would crash if the Config.xlsx is open.

Suppose :wink: we are a large international group having subsidiaries in almost every country. Most subsidiaries that have common operational functions use similar or same software and procedures. But they are managed separately and the security concept and procedures are vastly different depending on the region. Since our automations are modular (each business function in its own xaml file), these files can be shared. For us, any information going out is considered to be public, even if shared internally within the group because we can no longer control the information. Our security procedure dictates that we can not disclose where and how data is stored. Any disclosure should have failure modes and mitigations pre-approved.

So having the Get Credential Asset right in the module would be considered a disclosure, where as if we have everything in the LoadConfig.xaml and don’t share it, then there’s no issue. The other party who receives the module file is free to use any config method they have implemented - yaml, json or Excel - as long as the parameters in the config object are filled, the module will work.

And I forgot to add another problem with the Excel config. If you want to compare 2 config files, one file needs to be renamed, else Excel will not open the second one. This is not an issue with YAML or JSON files.

I totally understand the different view points around this, but as it happens requirements can be very specific depending on the big picture.

Agreed, I believe I stated as such, but just wanted to counter that State Machines as a concept are ‘overhyped’ just cause the REFramework isnt using them optimally. They have value in my opinion.

Fair. I thought they had actually updated it to use the Modern Excel but I just checked and you are right, they still use Classic, Gross.

I find this to be highly specific, and not standard practice in most organizations. I’ve worked in a ton as I am a contractor and never come across such a requirement. I also think the solution proposed is bogus from a security perspective. If you want to minimize the risk of data leakage then you are doing the opposite by making all this ‘sensitive data’ effectively in a global scope and passed to every single workflow.

I also feel like you ‘sharing’ these workflows is perhaps a weird thing to do also and you should instead use libraries (not saying asset stuff goes in a library btw, but the reusable part is then shared).
Behind all of this though, the ‘security concern’ doesn’t make any sense to me.
Lets say you give me the workflow, how is there any security risk if I see you’ve used an asset called ‘Asset1234’ anymore than me seeing you use a value in a dictionary called dict(“Asset1234”).

Regardless, I don’t think this security concern is widely applied and as such doesn’t belong in the REFramework and just within the rules in your organization.

We have no issues showing the name of something, but we don’t disclose the storage location of the data. In other words, we can not show which location to access to retrieve a particular data. If you perform “get asset” or “get a secure credential” or “make a db connection” from within the module, the storage location of that credential is disclosed.

This is not an issue; our servers are local - disclosure requirements don’t apply.

Places with such a requirement can not have contractors :grinning:

Agreed! And in the insider portal I saw there’s an UX update coming, which might help a bit with making it more readable.

Just wait until you see the ‘Process Orchestration’ canvas they have made!! There is some great stuff in the pipeline for working with more complex business processes and it synergies really nicely with Process Mining.