EPMFAQ Forums - Connect with the EPM Community  

Go Back   EPMFAQ Forums - Connect with the EPM Community > Microsoft Project Forums > Project 2007 Development


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-15-2008, 06:19 AM
Junior Member
 
Join Date: Apr 2008
Posts: 3
Thanks: 0
Thanked 1 Time in 1 Post
Default PSI - Add Task with AddPositionType.Middle

Hi,

I'm new to this forum. Ok, in this moment I think everybody is new to this place .

I got a problem with adding tasks to an existing project using PSI. I use the
AddPositionType.Middle and set the "AddAfterTaskUID" to a correct value.
All works fine, if adding only a few task, but, if I try to add more tasks, say about 40, I get the queue error "TaskUnableToInsert".

if tried lots of things, like:

QueueAddToProject in small blocks (after 1,2,5,10,900 tasks added to the update dataset)

QueueAddToProject, then wait for jobdone state.
and other debugging thinks, but none of them works ...

Here is some code:

PHP Code:
 public ProjectDataSet.TaskRow AddNewTask(
            
string taskName,
            
Guid addAfterTaskUid,
            
int taskOutlineLevel,
            
int taskDuration,
            
Task.DurationFormat taskDurationFMT)
        {
            
// - increase and watch change count;
            
IncreaseChangeCount();

            
ProjectDataSet.TaskRow newTask ChangesDataSet.Task.NewTaskRow();
            
newTask.PROJ_UID this.ProjUid;
            
newTask.TASK_UID Guid.NewGuid();
            
newTask.TASK_NAME taskName;
            
newTask.TASK_DUR taskDuration;
            
newTask.TASK_DUR_FMT = (int)taskDurationFMT;//(int)Task.DurationFormat.Day;
            
newTask.TASK_OUTLINE_LEVEL taskOutlineLevel;
            
newTask.TASK_IS_SUMMARY = (taskDuration == 0);

            
// - if no addAfterTask, attach task at last position
            
if (addAfterTaskUid == Guid.Empty)
            {
                
newTask.AddPosition = (short)Task.AddPositionType.Last;
            }
            else
            {
                
//newTask.AddPosition = (short)Task.AddPositionType.Last;
                
newTask.AddPosition = (short)Task.AddPositionType.Middle;
                
newTask.AddAfterTaskUID addAfterTaskUid;
            }
            
ShowMessage((string.Format("Task \"{0}\" added"taskName)));
            
ChangesDataSet.Task.AddTaskRow(newTask);

            return 
newTask;
        } 
PHP Code:
public void PsiUpdateProject()
        {
            try
            {
                
Guid sessionUid PsiGetSessionUid();
                
Guid jobUid Guid.NewGuid();
                
//ServiceFactory.ProjectSvc.QueueUpdateProject(jobUid, session, this.ChangesDataSet, false);
                
ProjectDataSet changesAdded
                    
this.ChangesDataSet.GetChanges(DataRowState.Added) as ProjectDataSet;
                if (
changesAdded != null)
                {
                     
ServiceFactory.ProjectSvc.QueueAddToProject(
                        
jobUid,
                        
sessionUid,
                        
changesAdded,
                        
false);
                     
ShowMessage(string.Format("project \"{0}\" updated add"this.ProjUid));
                     
this.PsiWaitForQueue(this.ServiceFactory.QueueSystemSvcjobUid);
                }
                
changesAdded null;
                
ProjectDataSet changesModified
                    
this.ChangesDataSet.GetChanges(DataRowState.Modified) as ProjectDataSet;
                if (
changesModified != null)
                {                
                    
ServiceFactory.ProjectSvc.QueueUpdateProject(
                        
jobUid,
                        
sessionUid,
                        
changesModified,
                        
false);

                    
ShowMessage(string.Format("project \"{0}\" updated mod"this.ProjUid));
                }
                
changesModified null;
                
ProjectDataSet changesDeleted
                    
this.ChangesDataSet.GetChanges(DataRowState.Deleted) as ProjectDataSet;
                if (
changesDeleted != null)
                {
                    
ServiceFactory.ProjectSvc.QueueUpdateProject(
                        
jobUid,
                        
sessionUid,
                        
changesDeleted,
                        
false);
                    
ShowMessage(string.Format("project \"{0}\" updated del"this.ProjUid));
                }
                
changesDeleted null;
                
this.ChangesDataSet.AcceptChanges();
                
this.ChangeCount 0;

                
//System.Threading.Thread.Sleep(TimeSpan.FromSeconds(4));
                //this.ChangesDataSet.Task.Clear();
            
}
            catch (
Exception ex)
            {
                
ShowMessage("QueueAddToProject failed on project." ex.Message);
            }
        } 
Does anybody have some problems or some answers?








Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored links
  #2 (permalink)  
Old 04-16-2008, 02:48 AM
ssanderlin's Avatar
EPMFAQ Founder/Owner
 
Join Date: Feb 2008
Location: Quakertown, PA
Posts: 171
Thanks: 0
Thanked 17 Times in 17 Posts
Default

Welcome to the Forum!

Can you provide the full detail from the Queue error?
__________________
Stephen Sanderlin
Founder/Owner - EPMFAQ
VP of Technology - MSProjectExperts
Microsoft Project MVP

If you found this message useful, please click the Thanks button in the post!

This electronic message, along with any information, advice, and opinions it contains, are mine alone and are not representative of my employer. All information is provided in "GOOD FAITH" and on an "AS IS" basis only. I provide no presentations or warranties, express or implied, including implied warranties of fitness for a particular purpose, merchantability, title, and noninfringement. I strongly advise you to extensively test any changes, workarounds, or techniques described herein on a development system prior to implementation in a production environment, and you are hereby notified that I bear no responsibility whatsoever for any loss, harm, or otherwise negative outcomes resulting from your actions, whether or not said actions were a result of this electronic message, directly or indirectly.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-16-2008, 03:25 AM
Junior Member
 
Join Date: Apr 2008
Posts: 3
Thanks: 0
Thanked 1 Time in 1 Post
Default

Yes, for sure. Here it is.

I add tasks in blocks of ten with calling "queueAddToProject", then wait for job complete state from the queue system, then I read the project dataset again. After 3 to 4 updates I get this error:

PHP Code:
System.ApplicationException was caught
  Message="Queue request failed \"Failed\" Job ID: 5b7c0d70-60b5-4b9a-895d-bc8253610846.
<?xml version="1.0\" encoding=\"utf-16\"?>
    <errinfo>
        <general>
            <class name=\"Project\">
                <error id=\"7025\" name=\"TaskUnableToInsert\" uid=\"598f8f96-19b6-4cf1-80c6-73ed5137e11e\" />
            </class>
            <class name=\"Queue\">
                <error id=\"26000\" name=\"GeneralQueueJobFailed\" uid=\"7bf06bc4-f28c-49ae-9c8b-9448d47f54bd\" JobUID=\"5b7c0d70-60b5-4b9a-895d-bc8253610846\" ComputerName=\"S01RKM02\" GroupType=\"ProjectUpdate\" MessageType=\"\" MessageId=\"\" Stage=\"\" />
            </class>
        </general>
    </errinfo>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to tlenz For This Useful Post:
reinaiviolo (08-18-2011)
  #4 (permalink)  
Old 04-16-2008, 09:50 AM
ssanderlin's Avatar
EPMFAQ Founder/Owner
 
Join Date: Feb 2008
Location: Quakertown, PA
Posts: 171
Thanks: 0
Thanked 17 Times in 17 Posts
Default

Quote:
Originally Posted by tlenz View Post
Yes, for sure. Here it is.

I add tasks in blocks of ten with calling "queueAddToProject", then wait for job complete state from the queue system, then I read the project dataset again. After 3 to 4 updates I get this error:

PHP Code:
System.ApplicationException was caught
  Message="Queue request failed \"Failed\" Job ID: 5b7c0d70-60b5-4b9a-895d-bc8253610846.
<?xml version="1.0\" encoding=\"utf-16\"?>
    <errinfo>
        <general>
            <class name=\"Project\">
                <error id=\"7025\" name=\"TaskUnableToInsert\" uid=\"598f8f96-19b6-4cf1-80c6-73ed5137e11e\" />
            </class>
            <class name=\"Queue\">
                <error id=\"26000\" name=\"GeneralQueueJobFailed\" uid=\"7bf06bc4-f28c-49ae-9c8b-9448d47f54bd\" JobUID=\"5b7c0d70-60b5-4b9a-895d-bc8253610846\" ComputerName=\"S01RKM02\" GroupType=\"ProjectUpdate\" MessageType=\"\" MessageId=\"\" Stage=\"\" />
            </class>
        </general>
    </errinfo>
Interesting.... Less helpful than I had hoped, though.

What version of Project Server 2007 are you working with?
__________________
Stephen Sanderlin
Founder/Owner - EPMFAQ
VP of Technology - MSProjectExperts
Microsoft Project MVP

If you found this message useful, please click the Thanks button in the post!

This electronic message, along with any information, advice, and opinions it contains, are mine alone and are not representative of my employer. All information is provided in "GOOD FAITH" and on an "AS IS" basis only. I provide no presentations or warranties, express or implied, including implied warranties of fitness for a particular purpose, merchantability, title, and noninfringement. I strongly advise you to extensively test any changes, workarounds, or techniques described herein on a development system prior to implementation in a production environment, and you are hereby notified that I bear no responsibility whatsoever for any loss, harm, or otherwise negative outcomes resulting from your actions, whether or not said actions were a result of this electronic message, directly or indirectly.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-17-2008, 07:01 AM
Junior Member
 
Join Date: Apr 2008
Posts: 3
Thanks: 0
Thanked 1 Time in 1 Post
Default

I solved it!

Install the post service pack 1 hotfix (kb941426) and all goes well ...

thanks to Heiner Eichmann.
__________________
INNEO Solutions
ProjektPortal
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-17-2008, 02:02 PM
ssanderlin's Avatar
EPMFAQ Founder/Owner
 
Join Date: Feb 2008
Location: Quakertown, PA
Posts: 171
Thanks: 0
Thanked 17 Times in 17 Posts
Default

Quote:
Originally Posted by tlenz View Post
I solved it!

Install the post service pack 1 hotfix (kb941426) and all goes well ...

thanks to Heiner Eichmann.
Great -- good to know this is resolved by the rollup.

Thanks for letting us know!
__________________
Stephen Sanderlin
Founder/Owner - EPMFAQ
VP of Technology - MSProjectExperts
Microsoft Project MVP

If you found this message useful, please click the Thanks button in the post!

This electronic message, along with any information, advice, and opinions it contains, are mine alone and are not representative of my employer. All information is provided in "GOOD FAITH" and on an "AS IS" basis only. I provide no presentations or warranties, express or implied, including implied warranties of fitness for a particular purpose, merchantability, title, and noninfringement. I strongly advise you to extensively test any changes, workarounds, or techniques described herein on a development system prior to implementation in a production environment, and you are hereby notified that I bear no responsibility whatsoever for any loss, harm, or otherwise negative outcomes resulting from your actions, whether or not said actions were a result of this electronic message, directly or indirectly.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 06-24-2011, 04:33 AM
Junior Member
 
Join Date: Jun 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Check protection форума

Проверка форума на защиту от спама!
Check the forum for spam protection!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 10-21-2011, 02:10 PM
Junior Member
 
Join Date: Oct 2011
Location: USA
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Joydayoriff
Default Who is Allah?

Good afternoon


audio English only Quran for the first time on the internet



"How did the spread of Islam affect the world?"

Among the reasons for the rapid and peaceful spread of Islam was the simplicity of its doctrine. Islam calls for faith in only One God worthy of worship. It also repeatedly instructs man to use his powers of intelligence and observation.

Within a few years, great civilizations and universities were flourishing, for according to the Prophet (SAW) 'seeking knowledge is an obligation for every Muslim man and woman'. The synthesis of Eastern and Western ideas and of new thought with old, brought about great advances in medicine, mathematics, physics, astronomy, geography, architecture, art, literature, and history. Many crucial systems such as algebra, the Arabic numerals, and also the concept of the zero (vital to the advancement of mathematics), were transmitted to medieval Europe from Islam. Sophisticated instruments which were to make possible the European voyages of discovery were developed, including the astrolabe, the quadrant and good navigational maps.


For more details click her
__________________
Casablanca.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 11-17-2011, 10:33 AM
Junior Member
 
Join Date: Nov 2011
Location: Russia
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to EthengenLat
Default быстрое похуд

быстрое похудение

Diet is very simple and effective! But in this case, you need every day to drink 2 liters of water (without gas).

The first two days:
only yogurt and cottage cheese.

The next three days:
Buckwheat (sunflower can be to your taste).

And the last two days:
Any fruits and vegetables (except those potatoes and bananas)

RESULT: minus 6 kg per week!

Диета для быстрого похудения

1 day - green tea
Day 2 - 4 cups buttermilk
Day 3 - 1 bottle of mineral water
Day 4 - 1 apple
Day 5 - 4 cups milk
Day 6 - green tea
Day 7 - 4 cups milk
Day 8, 2 apples
Day 9-liter kefir
Day 10, 2 cucumber
Day 11: Green Tea
Day 12-liter milk
13den-3 apples
Day 14, mineral water
Heavy but effective, usually takes 8 kg
absolutely absurd diet!

Кефирная диета

Heavy but effective, usually takes 8 kg
absolutely absurd diet!
This love-all
Mdaaa. I think of such a diet is not weight gone, and all health :-( (
on such a diet really just sit through 3, 4 days), then no force))
I think after this is unlikely to be up 2 floor ...

I have the willpower. I would be able to. but I have only 3 kg to lose so I'm on another diet
delusion and not a diet. after it can and will take 8 kg but then they go even faster as soon as something out of the normal food you eat
On the 15th day you can order trupovozku.
but, it's "****ing". it is steep, that you are! I spent all her friend, I'm sorry you do not have pictures of "before / after"!

Упражнения для похудения живота

Fish boiled with vegetables.

Ingredients:
Fish (carp, perch, pike, perch, haarder, cod, whitefish, etc.), head - 1-1.5 kg
Carrots, beets, onions, celery and parsley - 150g on.,
Potatoes - 500-700 gr.,
salt, pepper, Lavrushka.

Method of preparation:
Fish, if you want to unfreeze. To clean. Cut into portions pieces, gut, without cutting the abdomen, remove the gills, wash.
Onion finely chopped. A handful of fry in vegetable oil lightly.
Roots cut into thin slices.

Как похудеть на 10 кг за неделю

Roots cut into thin slices.
In a saucepan put layers of vegetables, fish, vegetables, shifting the fish pieces together with vegetables. The top layer - the remaining vegetables. Shut off husks from onions. This is to give an amber color.
Pour water on your finger above the top layer, add salt and pepper, to boil over medium heat. Cook over very low heat, like jelly. An hour to adjust for salt and pepper. Cook for another 3-4 hours.
The fish is carefully put on the "fish" dish, formed from pieces of fish. In the broth from boiling the potatoes cook slices.

Питьевая диета

Potatoes cooked with vegetables and serve in a separate bowl,
or remove the vegetables, to impose their fish, and cook the potatoes in the broth and serve separately, sprinkle with herbs.
The fish should be cooled, and potatoes - "with fire."
possible without the potatoes)

Как похудеть в ногах
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 01-10-2012, 01:59 AM
Junior Member
 
Join Date: Jan 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by tlenz View Post
Yes, for sure. Here it is.

I add tasks in blocks of ten with calling "queueAddToProject", then wait for job complete state from the queue system, then I read the project dataset again. After 3 to 4 updates I get this error:

PHP Code:
System.ApplicationException was caught
  Message="Queue request failed \"Failed\" Job ID: 5b7c0d70-60b5-4b9a-895d-bc8253610846.
<?xml version="1.0\" encoding=\"utf-16\"?>
    <errinfo>
        <general>
            <class name=\"Project\">
                <error id=\"7025\" name=\"TaskUnableToInsert\" uid=\"598f8f96-19b6-4cf1-80c6-73ed5137e11e\" />
            </class>
            <class name=\"Queue\">
                <error id=\"26000\" name=\"GeneralQueueJobFailed\" uid=\"7bf06bc4-f28c-49ae-9c8b-9448d47f54bd\" JobUID=\"5b7c0d70-60b5-4b9a-895d-bc8253610846\" ComputerName=\"S01RKM02\" GroupType=\"ProjectUpdate\" MessageType=\"\" MessageId=\"\" Stage=\"\" />
            </class>
        </general>
    </errinfo>
hmmm!!! thanks dude.....
__________________
buy computer | buy software
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT -4. The time now is 10:13 PM.


Powered by: vBulletin®
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
Ad Management by RedTyger

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24