Hello.
I am trying to add a lifecycle for an object. Using instructions from the website. I fixed the typos and the "state attribute" declaration. But the controls lifecycle don't show up.
Maybe you need to declare buttons?
Use iTop 3.0.0
<classid="PhysicalDevice"_delta="if_exists"><properties><fields_semantic><state_attribute>status</state_attribute></fields_semantic></properties><fields><fieldid="status"><default_value_delta="redefine">implementation</default_value></field></fields><lifecycle_delta="define"><!-- list of possible stimuli, triggering transition --><stimuli><stimulusid="ev_move2prod"xsi:type="StimulusUserAction"/><stimulusid="ev_obsolete"xsi:type="StimulusUserAction"/><stimulusid="ev_stock"xsi:type="StimulusUserAction"/></stimuli><states><stateid="implementation"><flags/><!-- From each state, define possible transitions --><transitions><!-- Recommended: use stimulus code as transition id --><transitionid="ev_move2prod"><!-- Define the stimulus which will trigger that transition --><stimulus>ev_move2prod</stimulus><!-- define the target state, where the transition will end --><target>production</target><!-- below flags are mandatory but can be empty --><flags/><actions/></transition></transitions></state><stateid="production"><flags/><transitions><transitionid="ev_obsolete"><target>obsolete</target><actions/></transition><transitionid="ev_stock"><target>stock</target><actions/></transition></transitions></state><stateid="obsolete"><flags/><transitions/></state><stateid="stock"><flags/><transitions><!-- The below transition is identical to the one on state implementation --><transitionid="ev_move2prod"><stimulus>ev_move2prod</stimulus><target>production</target><flags/><actions/></transition></transitions></state></states></lifecycle></class>
Sorry, in the documentation I noticed "initial_state_path", although it doesn't seem to be present in datamodel-production.xml ? Is this something deprecated, it seems present in the code though?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In the documentation says "initial_state_path", but it's optional.
I think the documentation is incomplete. It looks like you need to write a php class for the target object type
👍
1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Seems to have figured it out.
The physical device is an abstract class.
I thought (based on the example on the site) that the lifecycle is inherited by subordinate classes. Looks like no.
I defined a lifecycle for a real object and it worked.
👍
1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
Thanks for the feedback Valentin !
We might need to update the wiki : I've just checked the XML reference and indeed there's a lack of details on this subject :/ What do you think @cisou ?
👍
1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello.
I am trying to add a lifecycle for an object. Using instructions from the website. I fixed the typos and the "state attribute" declaration. But the controls lifecycle don't show up.
Maybe you need to declare buttons?
Use iTop 3.0.0
Might be overlooking it, but aren't you missing a specification where you say which the initial state is?
<default_value _delta="redefine">implementation</default_value>
specifies a default value for "status".
Sorry, in the documentation I noticed "initial_state_path", although it doesn't seem to be present in datamodel-production.xml ? Is this something deprecated, it seems present in the code though?
In the documentation says "initial_state_path", but it's optional.
I think the documentation is incomplete. It looks like you need to write a php class for the target object type
Seems to have figured it out.
The physical device is an abstract class.
I thought (based on the example on the site) that the lifecycle is inherited by subordinate classes. Looks like no.
I defined a lifecycle for a real object and it worked.
Hello,
Thanks for the feedback Valentin !
We might need to update the wiki : I've just checked the XML reference and indeed there's a lack of details on this subject :/ What do you think @cisou ?