so the initial problem is that I have 2 products, one individual and one standard. After the separate products got produced, they will send out, but in the logistics department, there is only 1 worker. So how do I prioritize the individual product? The worker should always send out the individual good before the standard product.
I'm stuck because I have no idea how to queue, either agent comparison or priority-based, but how does the block knows which product is which?
Thx
Easiest approach:
add a parameter "myPriority" to your product agent type (integer)
when creating a individualized one, set it to 10. Else to 1
in your queue, set it up as below. This will ensure the queue always moves higher-prio agents to the front. Make sure your queue block expects agents of your Product type
Also check example models and the help :)
Related
Multiple employees work together to complete a task. If the first employee can complete 70% of the task in his working time, the remaining 30% needs to be assigned to the second employee. How to use streamapi to define constraint rules and calculate the start time and end time of its task.
Would it be possible to have two separate tasks instead, where the second one depends on the first one (and thus, it cannot start before the first task completes)?
The dependency between the two tasks can be implemented as a hard constraint.
The first question is how to design the models you use for this. I assume you have a Set<Task> tasks that has a total required time to be completed by Set<Employee> employees? Then you may create List<TaskAssignment> that can aggregate a Set of employees to complete the task were each assigned employee can contribute by different parts. Depending on the complexity of how and when employees can work on a task can make it more challenging though but should be straightforward.
I am using total count of devices as the "server attributes" at customer entity level that is in turn being used for Dashboard widgets like in "Doughnut charts". Hence to get the total count information, I have put a rule chain in place that handles "Device" Addition / Assignment event to increment the "totalDeviceCount" attribute at customer level. But when the device is getting deleted / UnAssigned , I am unable to get access to the Customer entity using "Enrichment" node as the relation is already removed at the trigger of this event. With this I have the challenge of maintaining the right count information for the widgets.
Has anyone come across similar requirement? How to handle this scenario?
Has anyone come across similar requirement? How to handle this scenario?
What you could do is to count your devices periodically, instead of tracking each individual addition/removal.
This you can achieve using the Aggregate Latest Node, where you can indicate a period (say, each minute), the entity or devices you want to count, and to which variable name you want to save it.
This node outputs a POST_TELEMETRY_REQUEST. If you are ok with that then just route that node to Save Timeseries. If you want an attribute, route that node to a Script Transformation Node and change the msgType to POST_ATTRIBUTE_REQUEST.
In my Company we are using Team Foundation Server 2012 and Agile as Project Template. We are still learning how the Board and the Backlog show Tasks within User Stories and I realized that "Orphan" Tasks are not shown in these cases...
I made an query to solve the problem about the "Orphan" tasks but I realized that the same issue is happening when a User Story and a Task have, for some reason (maybe someone assign it to a User Story after creating it), a different iteration path... the tasks are not shown in the Backlog or Board.
Is there an automatic way to make tasks having the same iteration path as their parents? How can I make a query to show tasks whose User Stories have a different iteration path as them?
Thanks a lot in advance!
Well. After more researching I have realized about two thing:
- It is not needed to do this in order to show the Tasks in the Board/Backlog because, if the User Story contains tasks that are defined in different iterations, the User Story will be shown in the different iterations, repeated, but only with the tasks belonging to the iteration.
- If someone still wants to create the query, maybe to reunite User Stories, the solution is creating a new Query of the type Work Items and Direct Links and change the following parameters:
* In Filters for top level work item Add a new clause And Iteration Path = IterationA
* In Filters for linked work items Add a new clause And Iteration Path <> IterationA
* In Filter options Types of links select Return selected link types and check Child and Parent.
Unfortunately there is no way, so far I know, to do it automatically for all iterations so you have to do a Query of this type for all iterations.
I am looking for advice to handle following situation.
I have report which shows list of products; each product has a number of times it has been viewed and also the number of times the order has been requested.
Looking in to DB I feel its not good. There are three tables participating :
product
product_view
order_item
The following SELECT query is executed
select product_title,
(select count(views) from product_view pv where p.pid=pv.pid) as product_view ,
(select count(placed) from order_item o where p.pid=o.pid) as product_request_count
From product p
order by product_title
Limit 0,10
This query returns 10 records successfully; However, it is very time consuming to load. Also when the user uses the export functionality approximately 2,000,000 records would be returned however I get a memory exhaust error.
I am not able to find the most suitable solution for this in ZF2[PHP+MySql]
Can someone suggest some good strategy to deal?
How about using background processes? It doesn't have to be purely ZF2.
And once the background process is done, the system will notify to user via email that the export is done. :)
You can:
call set_time_limit(0) to inter the execution time limitation.
loop through the whole result set in lumps of, say, 1000 records, and output to the user the result sequentially.
I have a controller and its sole function is to increase a count in a model (i.e. foo_count) and load a view.
Lets assume I have 2 web instances running. If 10 concurrent users were to hit this page/controller at the same time. Will my count be 10?
Will there be a race condition of some sort? Since they are concurrent hits, both web requests will load a copy of model Foobar, with foo_count equals to 0 via FoobarController.
This means they were both operating on their own copy of Foobar that wasn't aware of the change the other web instance was doing. Which also means, the count will unlikely be 10.
What are some ways to resolve this?
You should use built-in records locking to avoid race conditions.