Hi all,
I'm stuck here with this topic.
I had defined these 2 NodeTypes, one as "lifecycle policy node"
(cpns:Stateslist) and one as "transition node" (cpns:State):
--------------
[cpns:Stateslist]
> nt:base, mix:referenceable
+ * (cpns:State) = cpns:State
[cpns:State]
> nt:base, mix:referenceable
- jcr:from (string)
- jcr:to (string)
--------------
Then, in the code, I've created them:
--------------
Node Stateslist = root.addNode("Stateslist", "cpns:Stateslist");
Node State1 = Stateslist.addNode("CREATED", "cpns:State");
State1.setProperty("jcr:from", "");
State1.setProperty("jcr:to", "RELEASED");
Node State2 = Stateslist.addNode("RELEASED", "cpns:State");
State2.setProperty("jcr:from", "RELEASED");
State2.setProperty("jcr:to", "");
--------------
and finally, I tried to assign the lifecycle policy to a new Node:
--------------
NodeImpl NodeWL=(NodeImpl)root.addNode("NodeWL");
NodeWL.addMixin("mix:lifecycle");
NodeWL.assignLifecyclePolicy(StatesList, "CREATED");
String[] StatesAllowed=NodeWL.getAllowedLifecycleTransistions();
--------------
but at the end "StatesAllowed" is empty.
Can someone help me to understand what I'm doing wrong
or link me a page where I can find an example or documentation ?
Thanks in advance,
Klaus
--
View this message in context:
http://jackrabbit.510166.n4.nabble.com/jcr-2-mix-lifecycle-tp2216584p3721149.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.