Project level snippets

Hi,

It would be good to have a possibility to bind snippets to a project (library) so when it’s used in another project (process) as a dependency, those snippets would popup in the snippets panel without the need to manually link to some external folder.

This way the end user would get a custom activity together with an example on how to use it which would further speed up development and lower the entry level for “Citizen Developers”.

BR,
Filip

Hi @Filip_C,
What about using the Object Repository?

Hi @Pablito

That would cover only “selectors side” of things whereas I was thinking more about custom activities (unless I’m missing something and Object Repository is actually capable of handling XAMLs as well).

Scenario:
Say there was a library for an application X, it would contain a bunch of selectors in the Object Repository + some custom activities. One of those would be say “Logon” activity, which would throw some precise exception types in case of a logon failure (e.g. AccountLockedException, AccountDoesNotExistException etc…)

The goal would be to give the end-users (of that library) a copy-paste experience with as little manual work and external references as possible.
Currently we have to redirect the user to the docs page and then redirect again to a repository with reusable XAMLs (with examples of that custom activity usage).

Hence me asking for the possibility to bind snippets to the projects (mainly libraries). Whenever the user would import such a library, a set of usage examples would be loaded together with the dependency ultimately making it a copy-paste scenario docs serving as a secondary/detailed source of information.

Hope that makes sense
BR,
Filip

I think you should test the Object Repository because it works more or less like you said. You can define whole sequence as a ready-to-use object as well as create libraries where you will include selectors and other useful elements.

Do you have any docs for that?

I checked:

All the above links mention UI elements only and there seems to be no reference to attaching sequences whatsoever.

The Object Repository ensures the management, reusability, and reliability of UI elements by capturing them as objects in a DOM-like repository

source: Studio - About Object Repository

Thanks,
Filip

Sorry I should make it more clear :slight_smile:
What I was having in my mind is that You can work with object using the Object Repository and then use elements from it to build Libraries which are working like sharable projects where you can even use a particular library like a dependency for your projects. So you can share libraries across your projects.

Please check this:

I’m sorry for not being clear about it.

Hey :slight_smile:

Well … that’s exactly what I described above tbh - build a library that contains activities (and now, thanks to the objects repo, selectors too) which is a pretty standard approach.

However, the problem I was trying to address in my original message is the “black-box” effect where, once the library is published, you have no insight into what’s happening inside any specific activity (and what you can expect that activity to return e.g. exceptions-wise)
On top of that, end-users (of that library) must do quite some manual work to plug it into the workflow (mostly revolving around exception handling) and since those users might be non-tech ones, they might not even realise they need to do any additional actions to ensure their workflows run stable.

As of now a “solution” to that “black-box” effect is directing the user to the documentation where each activity is described and appended with a list of possible exceptions etc etc. then, from that documentation the user is redirected to a repository of snippets where (s)he can see the actual examples of usage of those reusable activities.
The problem is that it’s quite a few steps for the end-user to take in order to learn what’s inside that particular activity and what are the possible outcomes, and even more actions to see an actual workflow that showcases it’s (library activity) usage.

  • adding those examples of usage to the library as an additional file is not an option since every xaml file is treated as an activity (black-box)
  • Object Repository doesnt seem to allow anything but selectors

Hence me suggesting that there should be a way to attach raw xaml files to the library → those raw files could be displayed in the snippets section under the name of the library and would serve as the closest activity documentation possible

Example
I built a library acme.application.activities
In that library I’ve put wonderful activity which throws various exceptions
image

Once I’ve published it and imported into a project all I can see (unless I look for the documentation) is this:
image

I wanted to make my end-users’ lives easier so I created an example how they can use my activity (e.g. what exceptions are thrown)
image

I could:

  • attach the screenshot to the documentation which would be poor UX
  • attach the xaml file to the documentation which would be fine but not really maintainable
  • save it into a repository again bad UX
  • save it into a network drive (which is linked to the studio as a source of snippets) but then all of my users would be flooded with snippets that are not relevant to them

So all of the above solutions are not really user friendly

Now, what I’m looking for would a way to distribute snippets together with libraries:
I’d like to be able to attach my “Wonderful Activity.xaml” snippet directly to the acme.application.activities and whenever that library is imported into a project, I’d expect snippets to be displayed in the Snippets or Samples section of the studio

This way, the end users would get a copy-paste experience rather than “wander around until I find some docs”

Hope that makes sense now
Have a good one,
Filip

Ok, now I see your point. Thanks for such long and detailed description with an example. I can’t promise anything but having this let me forward it to our internal tracker :slight_smile:

1 Like

@Filip_C thanks for the detailed feedback. This is an interesting idea and would increase the library adoption as the user could find snippets more easily.

We will look into such capabilities for a future version.

2 Likes