Hi i have a source linked with a seize block,which contains 3 resources (see image)
I want the resource "motrice" be the first to be released, so i used two release blocks. (see image)
the problem is that the release1 block does not free the resource and i do not know why.
As you can see from the last two images, after the agent go trough the release1 block, the resource "motrice" is still linked to the agent.What is the error?Thanks
I created similar model with two options:
one with pickup before seizing the resources;
one with pickup after seizing the resources.
As you can see from the below screenshots, it does release "motrice" in both cases. It might be due to the pickup/dropoff or the resource is seized somewhere else, not related to these blocks that you have mentioned.
Related
I've been trying to find a way to destroy a resource after the task it has been seized for has been completed, but I could not do it.
I'm following the Nurse-Ultrasound example in the AnyLogic Help, so for example I have a moving resource (worker) which seizes another resource (portable, say a box or something like that), and when the worker is done with the task I want the box to be destroyed (possibly when the worker is released). Note that I don't want the worker to go back to the box initial position.
I add a picture of what I've done, the whole resourceTaskEnd thing it's not working though.
Picture
Don't know if I understand... but try this on the "on release" action of the resourcePool:
self.set_capacity(self.capacity-1);
and in the resourcePool properties, destroy units when capacity decreases...
In AEM CQ , I am using asset manager api to write content(images uploaded from) in dam. This triggers out of the box Dam Update Asset workflow. I require to read renditions and asset properties that would be written available once the workflow is completed.
My question is how to wait until the workflow is completed for reading the asset properties instead of thread.sleep.
I tried with a recursive function call to iterate while the asset property is present. This gave null pointer exception. But when I put a thread.sleep of 50 ms inside the iteration it works for me.
Another approach I tried to get the workflow object inside the service to read workflow status but found that it takes few milliseconds for the ootb workflow to start after the content is written. Here also had to give thread.sleep.
One more attempt to use a event handler to listen workflow events. We are able to enter the event type as workflow completed. How to notify the service or jsp that the workflow is completed and we can read the asset properties and renditions?
It would be great if someone can share their suggestions feedback on the approach. Thank you.
You have the wrong approach to solve this problem. In my eyes you have exactly 2 reasonable solutions on this.
Create workflow process/step and extend the Dam Update Asset Workflow with your custom step.
OR
Create JCR observation listener and listen for Event.PROPERTY_ADDED for example or use the higher sling APIs and create event handler with the appropriate topic and than execute your business logic as soon the property you look for is added or changed.
Why not to use Thread.sleep() or other similar solution:
you don't know when the workflow is executed exactly. it may be
delayed if many asssets are uploaded or just get stuck
you cannot assure that your thread will be able to execute it's
logic. the instance may be stopped for example
creating a new tread for every resource uploaded may be expensive task. you also waste resources when you create an infinite loop and put those threads to sleep, than wake them and check again and again ... and so on until eventually the thread is able to do it's job
Simplified problem (in Swift but I think also in Objective-C): I've got two nodes where actions have started. The information about the initial runtime of the action is not available (got lost). I'd like to be informed after both actions have been performed.
After performing additional actions will be assigned according to the current state (which is not available in advance).
Any simple solution known?
I have a question regarding workflow in Kanban. Can I have two activities in my name in the "in progress" column? For example, I started the activity 'A' but not concluded and will continue at another time, then I get the activity 'B.' Makes sense to have activities A and B in the "in progress," but I'm doing only one.
I am a certified Kanban Coaching Professional, and this would be my advice:
Sure you can. Kanban itself won't say whether you can or not, it depends on how you use Kanban. The WIP limits might prevent you from starting another task, in which case you should do some or any of the following:
Discuss the issue with the team, perhaps it is ok to raise the WIP limit (or even temporarily breach it)? Perhaps you can solve the impediments together and continue working on the original task.
Perhaps you can "swarm" or help someone else with something else on the board. I usually like to start from the right-hand-side of the board and see if I can help some other item move closer to done.
You can also treat this as "slack" time, and work on improving the process, learning a new skill, or checking emails, or some of the other tasks that everyone has to do that are not directly related to the value stream. "Preparing for working on the item" is what a lot of people consider doing, but is usually just cheating against the WIP limits.
I'm getting the exception:
org.eclipse.core.internal.resources.ResourceException: The resource tree is locked for modifications.
After some searching I found out, that this comes from the fact that I am trying to add markers to a file. I'm doing this, when I am notified of a file change. So when my modification code is called the workspace is still in the middle of the notifying process and does not allow modifications to the resource tree.
How can I save markers so that I can add them to the file later or what would be another way to delay this changes?
You can't modify the resource tree from a resource delta event handler (imagine the potential for complete chaos if you could). The most common approach that I know of is to schedule a Job and make the modifications within the run() method of the Job. This means you need to remember the modifications that you want to make so that they can be done within the Job. It also means you can't make too many assumptions about the state of the resource tree because theoretically some other Job might run before yours that makes changes to the tree.
Change IResourceChangeEvent.PRE_BUILD will solve this problem.. Worked for me