cancel
Showing results for 
Search instead for 
Did you mean: 

CallActivity with Related content

girijass
Champ in-the-making
Champ in-the-making
Hi,
We are evaluating the use of Activiti on our current project. I have created sub Activity which i am calling from my parent Activity as "called element". I have added  related contents on my sub Activity . once completed the sub Activity related contents are not showing up on my parent Activity.

Can someone please help me.

Regards,
Girija
6 REPLIES 6

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Girija.

Could you create jUnit test please?
http://forums.activiti.org/content/sticky-how-write-unit-test

Regards
Martin

girijass
Champ in-the-making
Champ in-the-making
<code>
public class ProcessTestOrderProcess {

private String filename = "C:\\Documents\\workspace-sts-3.5.1.RELEASE\\ActivityDemo\\src\\main\\resources\\diagrams\\orderProcess.bpmn";
private String filename1 = "C:\\Documents\\workspace-sts-3.5.1.RELEASE\\ActivityDemo\\src\\main\\resources\\diagrams\\checkCreditProcess.bpmn";
 
@Rule
public ActivitiRule activitiRule = new ActivitiRule();

@Test
public void startProcess() throws Exception {
  RepositoryService repositoryService = activitiRule.getRepositoryService();
  repositoryService.createDeployment().addInputStream("orderProcess.bpmn20.xml",
    new FileInputStream(filename)).deploy();
  repositoryService.createDeployment().addInputStream("checkCreditProcess.bpmn20.xml",
    new FileInputStream(filename1)).deploy();
  RuntimeService runtimeService = activitiRule.getRuntimeService();
  Map<String, Object> variableMap = new HashMap<String, Object>();
  variableMap.put("checkCreditProcess", true);
  ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("orderProcess", variableMap);
  assertNotNull(processInstance.getId());
  System.out.println("id " + processInstance.getId() + " "
    + processInstance.getProcessDefinitionId());
}
}
</code>

JUnit working fine but the related components i am uploading on checkCreditProcess are not showing up on the main order process. Please help me.

Regards,
Girija

girijass
Champ in-the-making
Champ in-the-making
I saw the table  ACT_HI_ATTACHMENT  the document linked with PROC_INST_ID and as calling element process instance Id is different from called Element Process Id. I am not sure how to display the related contents added in called Element into calling element.

Any help will be highly appreciated.

jbarrez
Star Contributor
Star Contributor
What is your unit test trying to do? I'm just seeing process instances being started, but nothing with attachments?

Given your last comment, it may very well be the logic in Explorer is implemented in such a way it only fetches the content using the process instance id.

girijass
Champ in-the-making
Champ in-the-making
Thank you very much for your response. My requirement is to fetches the content that associated with sub process level into the parent process which looks like not possible.

Please advice.

jbarrez
Star Contributor
Star Contributor
Yeah I got that. I'm just saying your unit test is not showing that at all.

Like I said: it more likely that it's simply not implemented that way in Explorer.