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

State change of an asset using API

I am trying to change the state of assets using API i.e. I want them to move from Submitted to Appproved, is there any standard RAM API available that would do this activity in a single go.

0 votes



9 answers

Permanent link
To find the available actions for a given state use..


//Get the available lifecycle actions
RAMAction[] actions = newAsset.getAvailableActions();


To invoke an action on an asset use


//Set the lifecycle action
newAsset.setAction(action);
session.put(newAsset, new NullProgressMonitor());


For more code example refer to the help system...

http://publib.boulder.ibm.com/infocenter/ramhelp/v7r5m0/topic/com.ibm.ram.doc/topics/t_using_api.html

I am trying to change the state of assets using API i.e. I want them to move from Submitted to Appproved, is there any standard RAM API available that would do this activity in a single go.

0 votes


Permanent link
Thanks, but this was not my question, this would allow me different actions on the asset like UPDATE, DELETE etc. but thats not what I need, in RAM when an asset is submitted it remains in the submitted state and I want to change the state to Approved. How can I achieve that?



To find the available actions for a given state use..


//Get the available lifecycle actions
RAMAction[] actions = newAsset.getAvailableActions();


To invoke an action on an asset use


















//Set the lifecycle action
newAsset.setAction(action);
session.put(newAsset, new NullProgressMonitor());


For more code example refer to the help system...

http://publib.boulder.ibm.com/infocenter/ramhelp/v7r5m0/topic/com.ibm.ram.doc/topics/t_using_api.html

I am trying to change the state of assets using API i.e. I want them to move from Submitted to Appproved, is there any standard RAM API available that would do this activity in a single go.

0 votes


Permanent link
Also it seems the RAMStateHistory API is available in RAM 7.5 and up, but I am using RAM 7.2 so is there any ready way so that I can update the status of an asset through API?


To find the available actions for a given state use..


//Get the available lifecycle actions
RAMAction[] actions = newAsset.getAvailableActions();


To invoke an action on an asset use


//Set the lifecycle action
newAsset.setAction(action);
session.put(newAsset, new NullProgressMonitor());


For more code example refer to the help system...

http://publib.boulder.ibm.com/infocenter/ramhelp/v7r5m0/topic/com.ibm.ram.doc/topics/t_using_api.html

I am trying to change the state of assets using API i.e. I want them to move from Submitted to Appproved, is there any standard RAM API available that would do this activity in a single go.

0 votes


Permanent link
The StateHistory API was added in 7.2.0.2. So if you go upto that fix pack you can use the API.


Also it seems the RAMStateHistory API is available in RAM 7.5 and up, but I am using RAM 7.2 so is there any ready way so that I can update the status of an asset through API?


To find the available actions for a given state use..


//Get the available lifecycle actions
RAMAction[] actions = newAsset.getAvailableActions();


To invoke an action on an asset use


//Set the lifecycle action
newAsset.setAction(action);
session.put(newAsset, new NullProgressMonitor());


For more code example refer to the help system...

http://publib.boulder.ibm.com/infocenter/ramhelp/v7r5m0/topic/com.ibm.ram.doc/topics/t_using_api.html

I am trying to change the state of assets using API i.e. I want them to move from Submitted to Appproved, is there any standard RAM API available that would do this activity in a single go.

0 votes


Permanent link
Doing an action is how you change the state. For example the default
simple lifecycle uses the "Publish" action to go from Submitted to Approved.

To invoke an action on an asset use


//Set the lifecycle action
newAsset.setAction(action);
session.put(newAsset, new NullProgressMonitor());



--
Rich Kulp
Rational Asset Manager developer

0 votes


Permanent link
Thanks Rich,
I am using RAM 7.2.0.1 and the options that come when I try newAsset.setAction are ARCHIVE, CREATE, CREATE_AS_IS, DELETE, RETIRE, UPDATE, UPDATE_AS_IS. I dont see any option of Publish. Is there any thing wrong in what I am trying?



Doing an action is how you change the state. For example the default
simple lifecycle uses the "Publish" action to go from Submitted to Approved.

To invoke an action on an asset use


//Set the lifecycle action
newAsset.setAction(action);
session.put(newAsset, new NullProgressMonitor());



--
Rich Kulp
Rational Asset Manager developer

0 votes


Permanent link
Since the lifecycles are now customizable there are no statics for the actions between lifecycles. We have added API to get the available actions from a RAMAsset. From this you can choose the action that corresponding with publish.

However I beleve this API was added in 7.2.0.2. You should consider moving up.


Thanks Rich,
I am using RAM 7.2.0.1 and the options that come when I try newAsset.setAction are ARCHIVE, CREATE, CREATE_AS_IS, DELETE, RETIRE, UPDATE, UPDATE_AS_IS. I dont see any option of Publish. Is there any thing wrong in what I am trying?



Doing an action is how you change the state. For example the default
simple lifecycle uses the "Publish" action to go from Submitted to Approved.

To invoke an action on an asset use


//Set the lifecycle action
newAsset.setAction(action);
session.put(newAsset, new NullProgressMonitor());



--
Rich Kulp
Rational Asset Manager developer

0 votes


Permanent link
Ok in that case can you please tell me how I can apply the fix packs so that this activity can be carried out.Is there any documentation available to apply the fix packs?

Since the lifecycles are now customizable there are no statics for the actions between lifecycles. We have added API to get the available actions from a RAMAsset. From this you can choose the action that corresponding with publish.

However I beleve this API was added in 7.2.0.2. You should consider moving up.


Thanks Rich,
I am using RAM 7.2.0.1 and the options that come when I try newAsset.setAction are ARCHIVE, CREATE, CREATE_AS_IS, DELETE, RETIRE, UPDATE, UPDATE_AS_IS. I dont see any option of Publish. Is there any thing wrong in what I am trying?



Doing an action is how you change the state. For example the default
simple lifecycle uses the "Publish" action to go from Submitted to Approved.

To invoke an action on an asset use


//Set the lifecycle action
newAsset.setAction(action);
session.put(newAsset, new NullProgressMonitor());



--
Rich Kulp
Rational Asset Manager developer

0 votes


Permanent link
Hi,

You should upgrade to RAM 7.5. That would be much easier than upgrading
to 7.2.0.2 and then applying the testfix. And it would fix your problem.

You can get 7.5 off of jazz.net.

--
Rich Kulp
Rational Asset Manager developer

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

Question asked: Oct 21 '10, 7:05 a.m.

Question was seen: 7,207 times

Last updated: Oct 21 '10, 7:05 a.m.

Confirmation Cancel Confirm