I have been trying to get the previous transition to a node.
I did an action with does this: 


  |   Transition t =  executionContext.getTransition();
  |   String transition_name = t.getName();
  |    
  |   // Node n = executionContext.getTransitionSource();
  |    //String nodeName = n.getName();
  |    
  | 
  |   | And i get a null pointer exception.
  |   | 
  |   | Here is my process definition:
  |   | <?xml version="1.0" encoding="UTF-8"?>
  |   |   | 
  |   |   | <process-definition name="transition test">
  |   |   |    <swimlane name="demandeur">
  |   |   |       <assignment expression="user(mennen)"></assignment>
  |   |   |    </swimlane>
  |   |   |    
  |   |   |    
  |   |   |    <start-state name="start transition tests">
  |   |   |       <task swimlane="demandeur">
  |   |   |        <controller>
  |   |   |          <variable name="Date_demande" access="read"/>
  |   |   |          <variable name="transition" access="read"/>
  |   |   |        </controller>
  |   |   |        
  |   |   |       </task>
  |   |   |       <transition name="transition_1" to="task1"> </transition>
  |   |   |    </start-state>
  |   |   |    
  |   |   |    <end-state name="end1"></end-state>
  |   |   |    
  |   |   |    <task-node name="task1"> 
  |   |   |      <task swimlane="demandeur">
  |   |   |        <controller>
  |   |   |          <variable name="Date_demande" access="read"/>
  |   |   |          <variable name="transition" access="read"/>
  |   |   |        </controller>
  |   |   |        
  |   |   |        <event type="task-create">
  |   |   |         <script>
  |   |   |           <expression>
  |   |   |           Date today = new Date();
  |   |   |           
executionContext.getContextInstance().setVariable("Date_demande",today);
  |   |   |           String t =  executionContext.getTransition();
  |   |   |          // String t = 
executionContext.getTransitionSource().getName();
  |   |   |           
executionContext.getContextInstance().setVariable("transition",t);
  |   |   |           </expression>
  |   |   |         </script>
  |   |   |       </event>
  |   |   |        
  |   |   |       </task>
  |   |   |       <transition name="transition_2" to="task2"></transition>
  |   |   |    </task-node>
  |   |   |    
  |   |   |    
  |   |   |    <task-node name="task2">
  |   |   |      <task swimlane="demandeur">
  |   |   |        <controller>
  |   |   |          <variable name="Date_demande" access="read"/>
  |   |   |          <variable name="transition" access="read"/>
  |   |   |        </controller>
  |   |   |        </task>
  |   |   |       <transition name="transition_3" to="end1"></transition>
  |   |   |    </task-node>
  |   |   |    
  |   |   |    
  |   |   | </process-definition>
  |   | 
  |   | Thanks in advance,

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3925077#3925077

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3925077


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to