Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Having issue in a Participant on a "new"

I'm seeing an interesting thing in my Server-side participant.

I have one where I want to see if it is a "new" create. 

I get the data and the OldState.
        if (data instanceof ISaveParameter) {
            saveParameter = (ISaveParameter) data;
            IAuditable testAuditable = saveParameter.getOldState();

Then I assumed that since I am creating the work item (initializing), then the OldState should be null.  However, I get basically the same data (not the same object, but the same data values) for getOldState() and getNewState().

Is there something I'm doing wrong?  How can I tell quickly/easily if this is a brand new work item that is being created?  Again, I had thought the OldState would show me that.

Susan

0 votes

Comments

one of my plugins uses ((IWorkItem)newState).isNewItem() for detecting New.



One answer

Permanent link
oops ... nevermind .. it does work!  I forgot that I have another participant running which modifies things... I needed to make a minor change to it and move it down in the ordering.

Susan

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,941

Question asked: Jun 10 '14, 12:37 p.m.

Question was seen: 3,343 times

Last updated: Jun 10 '14, 1:41 p.m.

Confirmation Cancel Confirm