This content has been marked as final.
Show 9 replies
-
1. Re: ActorId from within process definition
mennen Feb 20, 2006 10:11 AM (in response to mennen)Also tried this, but still didn't work:
String actorId = executionContext.getJbpmContext().getCurrentJbpmContext().getActorId();
-
2. Re: ActorId from within process definition
mennen Feb 22, 2006 5:42 AM (in response to mennen)I did it!!
Here is how:String actorId = executionContext.getJbpmContext().getActorId(); executionContext.getContextInstance().setVariable("loggedPerson", actorId);
i don't know why it didn't work before though..
Here is my process definition.xml anyways:<?xml version="1.0" encoding="UTF-8"?> <process-definition name="actorIdTests"> <swimlane name="tester"> <assignment expression="user(mennen)"></assignment> </swimlane> <start-state name="start actorId tests"> <task swimlane="tester"> <event type="task-create"> <!--action name ="start_action" class="org.jbpm.mennen.ActorIdAction"/--> <script> <expression> String actorId = executionContext.getJbpmContext().getActorId(); executionContext.getContextInstance().setVariable("loggedPerson", actorId); </expression> </script> </event> <controller> <variable name="loggedPerson" access="read"/> </controller> </task> <transition name="" to="task1"></transition> </start-state> <task-node name="task1"> <task swimlane="tester"> <controller> <variable name="loggedPerson" access="read"/> </controller> </task> <transition name="" to="end1"></transition> </task-node> <end-state name="end1"></end-state> </process-definition>
and my -
3. Re: ActorId from within process definition
mennen Feb 22, 2006 5:42 AM (in response to mennen)just posted it for those who would be looking to do the same thing,
Hope this helps! -
4. Re: ActorId from within process definition
david.trattnig Feb 28, 2006 5:13 AM (in response to mennen)Your start-state contains a task and this works??
<start-state name="start actorId tests"> <task swimlane="tester"> ....
Thought that wouldn't be a valid process-definition.. -
5. Re: ActorId from within process definition
mennen Feb 28, 2006 6:32 AM (in response to mennen)why not?
-
6. Re: ActorId from within process definition
mennen Feb 28, 2006 10:55 AM (in response to mennen)Here is what i found in the Websale example of jbpm 3.1
<start-state name="create new web sale order"> <task swimlane="buyer"> <controller> <variable name="item"/> <variable name="quantity"/> <variable name="address"/> </controller> </task> <transition to="evaluate web order" /> </start-state>
-
7. Re: ActorId from within process definition
mennen Feb 28, 2006 11:04 AM (in response to mennen)I tried to have a start state without a task .. but my process appears on the Webconsole with an empty"start process link"!
Anyone knows why? -
8. Re: ActorId from within process definition
david.trattnig Mar 7, 2006 4:43 AM (in response to mennen)Sorry it's my fault - think it wasn't allowed in older jBpm version...
-
9. Re: ActorId from within process definition
qwerty50989 Oct 31, 2006 9:03 AM (in response to mennen)Does anybody know how to get actorId in bpel process definition?