Manually building a collection in BluePrism - collections

I would like to collect status information of my RPA process in a collection, so each time I need to add a new steatus, I should create a new row and make it active, but the Business Object Utility - Collection Manipulation does not support that. How can I do that?

This action is not in the Utility - Collection Manipulation Business Object,
but in the built in Collection Business object
and the action is simply called Add Row.

Related

Symfony axios pass only id or entire object?

I have a Booking entity which has a ManyToOne relationship with my Car entity. I use axios to post my data for creating a Booking. I'm not sure if it's better practice to pass my whole Car object to my create function inside my Controller or to only pass the Car's id to the route of the function (which then fetches the Car from my database thanks to Symfonys param converter). Or is there another way which is considered "best practice"?
It depends on your scenario and the way you want to use.
Whenever you have to create an object / row inside the database then you will have to pass the whole object. assuming that the cars has already been created inside the database and you only have to link the booking object with the car than i will prefer you to bind it using ids rather than placing the whole object.
If you place the whole car object than it will increase the retrieval performance but if someday the information of car is changed than you will have to change the information on every booking object in which you placed the car object but if you just bind it with the Car Id than it will always give user the latest information even if the info of Car has been changed.
I thought that it will reduce the performance of the application if we used Id but that is not the case the DBMS use indexing to manage the search and search through id takes not time. It performance is not an issue and yes if you pass a whole object than it will also consume more data (since a large amount of data will be uploaded).

In symfony what event can I use to add parameter to every database query?

I can’t find a solid answer for this, I’ve thought about using event listeners but I can’t seem to find a doctrine event to do what I want.
So the system we are building has different user accounts where each user is able to create a record, let’s say they can create a task using a Task entity and they can create a calendar event using a CalendarEvent entity.
Both entities have $createdBy mapped to the User entity.
When we pull data from the database, say a list of tasks, we only want the tasks for the current user but this would mean for every single entity in the system we would have to make sure the user is passed in the database query which easily becomes a mess.
What I want to do is automatically fill the $createdBy during persist and automatically add it as a where parameter during retrieval.
So instead in every repo function we write doing this for example:
$this->findBy([‘createdBy’=>$user]);
The createdBy part should be added automatically ; perhaps with some doctrine event?

meteor dynamic schema usage

I plan to build a dynamic schema and create an autoform from that schema. In the template where the form will be displayed I plan on doing this in
template.formPage.onCreated(function(){//do stuff});
What I am curious about though is getting the form onto the page:
Can I just use the usual AutoForm helper to generate the form directly in the template ie quickForm or would I need to create a new template helper to pass details from the newly created schema to the template?
Bit confused about what's supposed to happen where.
To be more concise: the user can create a document called exercise for example: this would have a name field, a description field etc and they could also decide what the measurable units are, these are stored as sub documents, each sub document has 3 fields: name, value, unit. I created a schema and sub schema and this works fine.
The issue is that when a user is doing a workout they should be able to select an exercise from the collection of exercises (all of which are created by the admin) and from that data create a form (read schema) to upload a document to the workout collection.
The measurable values in the exercise document will describe what form fields are required in the workout form depending on what exercise is being performed.
Essentially the exercise collection is a collection of schemas.

POST Complex objects to controller

I am working on an enterprise scale project where I have a self referencing table called categories as below. Also in my current model I am using following table associations to fetch data. ( using EF6).
I have M-M mapping tables in DB for above M-M relationships.
In my controller GET action result returns the model which has Ilist(all parent categories). Then when the user is selecting items (in view) I am using Ajax to retrieve Ilist for next subset of categories (by passing to controller by Id - return Json result) and dynamically show next to the parent select list as below. ( and I have up to 4 subsets)
As the user is selecting categories, I am using Ajax call to load related categories and create selectlist or dropdownlist dynamically as below:
My question is Since all these data is loaded through Ajax, how can I bind them to my parent model. How can I capture user selected data into one parent model when user is posting the from to controller.
I know I can use Ajax and use Json to capture & transfer to contoller , But I need to use modelview , Can I use partiview to overcome this ?
Please advise the available options..
The key is making sure the name values match the object hierarchy accepted by the post operation. This is certainly doable; it's difficult because several AJAX operations build the UI, but one operation processes it, so you have to ensure the data expressions match the object being posted back.
You can use Html.NameFor() as a workaround to ensuring the naming paths work OK. Collections can make this difficult.

Complex data structure in ViewModel layer of the MVVM

I have large collection of MyFile objects which are linked in all kind of ways between each other like spaghetti.
In addition, from this collection I create smaller subcollections of some items that are equal by some criteria.
(for example all files with the extension .txt, all files that belong to certain directory etc...)
Basically I have complex structure of linked lists in my business logic. Now I want to create ViewModel for this
in order to prepare it for View and this is where I hit the wall. I just can't figure out how to prepare this mess
and still keep everything efficient and organized.
First problem is that wrapping each collection in collectionViewModel by enumerating item by item and creating itemViewModel
will create duplicate itemViewModel for each item (since one item can be contained in several collections)
Second problem is how to keep everything updated? If for example an item1 in business logic changes its reference from item2
to item3, then ViewModels should update them accordingly.
I am really tempted to break from the MVVM pattern here even though I dont want it, and put bussines + presentation logic
in one object/class since this spaghetti structure seems a bit too much for my level of understanding of MVVM.
Thanks
Maybe I'm barking up the wrong tree here, but here goes.
You could have a Model which acts as a repository for all your file objects, and that also exposes an ItemAdded and ItemRemoved event, plus a Query method. You can then have a common ViewModel type that represents your view on this model (a ViewModel), but specializes by composing a query. In this way you can have ViewModel+Query (e.g. all files with extension txt) instance for each view you need to represent. The ViewModel would be responsible for executing the query on your Model (by calling the query method) and then turning the results into an observable collection of file items (or what-have-you). You can update your ViewModel in response to Model changes by subscribing to ItemAdded and ItemRemoved events. If on an ItemRemoved event your ViewModel file items collection contains the item, then remove it. If on an ItemAdded event the item matches the query condition for that ViewModel instance, then add it to the collection.
This allows you to have a single Model for all your files, and then a ViewModel(+Query) instance for each type of view you wish to represent. The ItemAdded and ItemRemoved event allow you to update your ViewModel. As the items in the ViewModels are observable collections, your databound views will update themselves.

Resources