In my workflow I have iterative loop which check the table value until it matches a workflow value using DB Execute.
This stage arise after completing initial and step After values matches it will proceed to next step.this has created by adding delay function.
However my client required to show the list work items which are pending withing content navigator. Is there a way to achieve this.
Try to add users (who want to track status) in F_Trackers system Workflow Group.
Related
I have been working on a project. I always followed this idea. Don't send all the data in one call.
Here is an example,
Suppose there is an API to return all the list of students that can be added to test they need to finish.
So, on UI side every student have one button "add" which will show a pop up if the student is already assigned to take the test. Or it will show a pop up he has already finished the test.
I could join many table and send all the data in one api call while fetchig students. Or
I could send the send the students and then on "add" there is another API to make sure the above mentioned conditioned met.
Which approach is better?
Because If I send all the data in one api call, there might be only few students be assigned the test.
Checking if a student is already assigned or not should happen in the backend, not frontend, and also atomically so as to prevent duplicates - either using a database transaction or a unique constraint.
When the Add button is clicked then in any case a backend call will need to be made (to perform the actual Add). If the add failed, the backend can interpret the "unique constraint violation" database error and return a "student is already assigned" message.
For the rest of the question, the rule is simply: don't fetch more data than is required by the UI.
If the Add button is always shown regardless of whether or not the student is already added, there is no need to retrieve this information beforehand.
But it might be useful to give a visual indication of which students are already added, in that case obviously there's no choice but to retrieve and return this information to the UI.
Fortunately GraphQL is precisely the tool for this job - it makes it possible for the UI to request exactly what information is needed for a given page, without having to code each and every possible query by hand.
In a certain amount of time after the user clicks a button, I need to have some data in the database changed.
For example, there is a sessions table with the is_active(default value 0) field and two buttons. After the first button clicked the field has to be equal 1 for 5 minutes; after clicking the second button field has to be equal 0 immediately.
In the first place, I thought Queues or Task Scheduling might be the solution, but I don't see how make it works
Is that even possible to do by Laravel?
Yes, you can with some help of the database. You can define a schedule that runs once in a moment, and you can push a record to the database when an user clicks a button. Then on the scheduled task, check if there are any tasks need to be run in that moment, or past moments etc. Then delete the task when it's done from the database. Be aware that on the next query, if there are jobs still running, add an extra flag to the table saying that the job has started, and don't run that again.
i am using Spring/Hibernate/ZK. In one tab i get object from DB for editing by user, but second user can open the same tab and the same object for editing . I want to informed second user whit message like "This object is аlready open" and hide buttons for save.Тhus second user can see current data from DB to this object but can`t edint him.Is there a way to check session for this object or another way to do that.
The other answers mostly look at the database, but if all users use the same zk application to access the database, you could keep track of opened objects in the Composer or ViewModel (depending whether you use MVC or MVVM; I'll just call it controller).
Your controller would need a static list of objects that are currently modified. If a user requests to open an object that is not in the list, everything is fine and your controller enables the fields and save button. Otherwise, those are disabled and/or you display a message.
The tricky part is clearing objects from that list. If a user presses the save button, you just remove the object from the list. But what if the user doesn't and just closes the tab or their session just times out? In this case you need a callback, or a mechanism that regularly checks whether the screen is still open.
You could achieve this by adding a zk timer to the tab that pings every now and then and updates the timestamp in your static list (so make it a map). If a new user tries to edit the object, check how old the last timestamp is. If it is old enough (i.e. the previous user saved it or abandoned the screen), allow them to edit it.
Still, you have to think about what to do if a user just keeps the screen open. How long are they allowed to keep the lock on the object? This is an issue in Microsoft Office as well. If multiple users try to open an Excel file from a network location, the first one gets to lock and the others cannot save until that user saves.
You may have additional field which indicates that column is being edited. When first user starts work, the field would be updated. The second user would query object with 'on hold' status and your code would handle this.
Other way - use Hibernate #Version field in your entity. It holds object version which is incremented after every update operation. If second user would save object after first one already saved, it would throw OptimisticLockException which you could handle in your code. More about optimistic and pesimistic locking: Chapter 5. Locking. Related discussions: Hibernate Automatic Versioning and When to use #Version and #Audited in Hibernate?
The best solution is to use Optimistic Concurrency Control with Versioning and when Hibernate throws Concurrency Update issue due to same row is being updated in two transaction then use one of below strategy
First Wins Strategy
Last Wins Strategy
Merge Conflicting Update Strategy
First Wins Strategy is not good solution as it leads to lost update and user will get frustrated that all his work is lost.
By Last Wins Strategy one of user will get error message that you are working on Stale data and start your transaction again . By this way also user can get frustrated due to fact that now again he need to restart operation from beginning but his changes will not lost.
Instead go with Merge conflicting Update Strategy, when Hibernate throws Stale object exception reload screen with new data and user will see updated result and allow him to proceed with latest data. In this user changes will not loss and user will not get error message , just his screen reloads with fresh data and he can decide whether to proceed or not .
You can take example any e-commerce site and you will get one of result of either Last Wins Strategy or Merge Conflicting Update Strategy. Two user can start to by one item but one of user will get message in last screen that item is not stock.
My first question here. I am relatively new to Dynamics CRM and I am looking to do a customization using workflows and I have run into some issues.
I need to trigger an email to a user if I have 5 records with a specific value chosen in an option set within the last 15 days.I thought I might need a static variable kind of field for the entity. I don't really know how to get that in CRM.
While I have been able to use workflows to get the records within the 2 dates and increment the count for that condition, the count maintained is not static and so it is basically useless for my requirements.
Any suggestions to work around this?
One way of doing it is to have a custom workflow.
Whenever a new record for that entity is created, run this custom workflow and get the count and return it via an Output parameter. Check for the output value and if that is more than the threshold as in the requirement, then consider the step for sending an email to the user, otherwise complete the workflow as succeeded.
In Sharepoint designer 2007, I am creating a workflow where I am trying to use 'collect data from a user' for multiple users. In my document library, I have a list name field. That list name field ties to a list which has between 1-15 users in the associated list. I only need to collect data from user for those users in the list that are not null/empty. I would also like to collect data from the users at the same time (parallel).
It appears you can only use parallel within one workflow step. Within one workflow step, it doesn't appear that you can set multiple conditions/actions.
What I need to do is this:
Condition 1: If variable:reviewer1 is not empty
Action 1: Collect Document Review from variable:reviewer1 (output to ...)
Condition 2: If variable:reviewer2 is not empty
Action 2: Collect Document Review from variable:reviewer2 (output to...)
Is there a way to do this that I'm missing?
Thanks!
It'll be tedious, but I'd suggest creating N steps (where N = the number of parallel tasks you want)
Each step will generally do the following:
Check if the current reviewer field is empty (if so, skip to the next step)
Create a new "Task" item in a (task) List
Send an email to the person you assigned the task to
Then you'll need to somehow stop your workflow until all of the tasks have been completed. This part gets a bit trickier, but do some searches on creating a State Machine workflow in SharePoint Designer and you'll be on the right track.
Really though, this sounds like a workflow that's too complex for SPD. Use Visual Studio or some 3rd-party workflow solution if at all possible.