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

State of work items

how can i validate each state of the work item ?
i have a case like this :
- if 1 work item's state change from 'new' to 'in progress' then it will be checked first whether the predecessor already 'closed' or not.

i see that every work item type (task, rfc ticket, purchase, gate) have a different state id for each state. then it would be inefficient to validate all of the state id.
and i can't find the idea how to use the stategroups.

anyone can help ?

thanks :)

0 votes



4 answers

Permanent link
what are u trying to do?

0 votes


Permanent link
There are only three state groups, New, in progress, closed. But if they are enough for you you can use code like below


IWorkflowInfo workflowInfo= workItemCommon.findWorkflowInfo(dependency, monitor);
if (workflowInfo != null && !workflowInfo.stateGroupContains(IWorkflowInfo.CLOSED_STATES, dependency.getState2()))
unresolvedDependencies.add(dependency);


another option would be to make the operational behavior configurable and have a lookup table that creates a metric on the states that makes sense.

I have seen other behavior e.g. preventing to close a work item if children are not all closed using state groups.

0 votes


Permanent link
what are u trying to do?



i am going to validate if workitem's state changed to 'closed' then i will trigger some method.

0 votes


Permanent link
thanks a lot rschoon. i'll try your code.

There are only three state groups, New, in progress, closed. But if they are enough for you you can use code like below


IWorkflowInfo workflowInfo= workItemCommon.findWorkflowInfo(dependency, monitor);
if (workflowInfo != null && !workflowInfo.stateGroupContains(IWorkflowInfo.CLOSED_STATES, dependency.getState2()))
unresolvedDependencies.add(dependency);


another option would be to make the operational behavior configurable and have a lookup table that creates a metric on the states that makes sense.

I have seen other behavior e.g. preventing to close a work item if children are not all closed using state groups.

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,937

Question asked: Mar 19 '12, 12:27 a.m.

Question was seen: 4,581 times

Last updated: Mar 19 '12, 12:27 a.m.

Confirmation Cancel Confirm