Hi
I created simple life cycle and it looks like this
created --> in progress --> completed
how can i change the status from created to in progress ?
best regards
Hi Ahmed,
If you want to change the LifeCycle state of a specific item, you can use the "promote" button or menu option. It is also possible to promote items via the workflow, but manual promotions are the most straightforward.
Eli
Eli Donahue
Aras Labs Software Engineer
Hi , Thank you for your answer .
but how can i do it manual .
i created method with this code :
var innovator = new Innovator();
var t5id = getFieldByName("text0").getElementsByTagName("input")[0].value;
var t5date = getFieldByName("text1").getElementsByTagName("input")[0].value;
var t5name = getFieldByName("text2").getElementsByTagName("input")[0].value;
var t5comment = getFieldByName("text3").getElementsByTagName("input")[0].value;
var t5button = getFieldByName("Update").getElementsByTagName("input")[0].value;
var partItem = innovator.newItem("result4","update");
var id = document.thisItem.getProperty("id");
partItem.setID(id);
partItem.setProperty("t4id", t5id);
partItem.setProperty("t4date", t5date);
partItem.setProperty("t4name", t5name);
partItem.setProperty("t4comment", t5comment);
partItem.apply();
-------------------------------------------------------------------
I want, if the button is pressed, the status should be changed
Hi Ahmed,
You can promote an item in code using the promote() method. Just pass a parameter with the name of the state you want to promote the item to. This will send a request to the server to promote the item and return the response. Note that the promote method does not update the context item itself.
Eli
Eli Donahue
Aras Labs Software Engineer
Note that this is replacing partItem with the result received from the server, so any previous changes to that item that were not applied to the server may be overwritten in memory.
Eli
Eli Donahue
Aras Labs Software Engineer
Hi ahmed,
You can do this by modifying the Workflow Map. When you select a workflow activity in the map, you can configure the promotion you want to occur under the Promotions tab. In order to promote your item to the "in progress" state, you'll want to add a new promotion event and configure the columns as shown below.
Event - You'll likely want to choose 'On Activate' which will occur when the workflow gets to your chosen activity
ItemType - The ItemType you have attached your life cycle to
Life Cycle - The Life Cycle Map you have created
From State - The Created state of your Life Cycle
To State - The In Progress state of your Life Cycle
Role - The Identity that will be performing this promotion (Aras PLM is the standard Role for these kinds of automatic promotions)
Chris
Christopher Gillis
Aras Labs Software Engineer