[jboss-user] [jBPM] - Re: can subprocess get its father process's parameter?

2013-08-09 Thread trash wang
trash wang [https://community.jboss.org/people/wangtrash] created the discussion

Re: can subprocess get its father process's parameter?

To view the discussion, visit: https://community.jboss.org/message/832086#832086

--
thank for your answer. but actually, I want to know how I can get the 
relationship between the processes in running. for example, in one workerItem 
handler, I can get current processID. how can I get this process's father's 
processID, or his father's father process ID?
--

Reply to this message by going to Community
[https://community.jboss.org/message/832086#832086]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1containerType=14container=2034]

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

[jboss-user] [jBPM] - Re: can subprocess get its father process's parameter?

2013-08-09 Thread Demian Calcaprina
Demian Calcaprina [https://community.jboss.org/people/calca] created the 
discussion

Re: can subprocess get its father process's parameter?

To view the discussion, visit: https://community.jboss.org/message/832172#832172

--
You can also do it. 

Starting from jbpm 5.4, you have the parent process id in audit tables:

 
https://github.com/droolsjbpm/jbpm/blob/5.4.x/jbpm-bam/src/main/java/org/jbpm/process/audit/ProcessInstanceLog.java#L53
 
https://github.com/droolsjbpm/jbpm/blob/5.4.x/jbpm-bam/src/main/java/org/jbpm/process/audit/ProcessInstanceLog.java#L53

At runtime, the processInstanceImpl class has the parent it in the metadata 
too, which is put when starting the subprocess
 
https://github.com/droolsjbpm/jbpm/blob/5.4.x/jbpm-flow/src/main/java/org/jbpm/workflow/instance/node/SubProcessNodeInstance.java#L141
 
https://github.com/droolsjbpm/jbpm/blob/5.4.x/jbpm-flow/src/main/java/org/jbpm/workflow/instance/node/SubProcessNodeInstance.java#L141

I think you should use the first option, but it depends on what you are trying 
to achieve.
--

Reply to this message by going to Community
[https://community.jboss.org/message/832172#832172]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1containerType=14container=2034]

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

[jboss-user] [jBPM] - Re: can subprocess get its father process's parameter?

2013-08-07 Thread Demian Calcaprina
Demian Calcaprina [https://community.jboss.org/people/calca] created the 
discussion

Re: can subprocess get its father process's parameter?

To view the discussion, visit: https://community.jboss.org/message/831855#831855

--
You have to:
- Create the variables in the subprocess.
- Use the parameters mapping to pass copy variables/expressions from parent 
process to subprocess.

 http://docs.jboss.org/jbpm/v5.4/userguide/ch.core-basics.html#d0e1827 
http://docs.jboss.org/jbpm/v5.4/userguide/ch.core-basics.html#d0e1827
* +Parameter in/out mapping+: A sub-process node can also define in- and 
out-mappings for variables. The variables given in the in mapping will be 
used as parameters (with the associated parameter name) when starting the 
process. The variables of the child process that are defined for the out 
mappings will be copied to the variables of this process when the child process 
has been completed. Note that you can use out mappings only when Wait for 
completion is set to true.

Hope this helps,

Demian
--

Reply to this message by going to Community
[https://community.jboss.org/message/831855#831855]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1containerType=14container=2034]

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user