passing processis from one process to another process

Confluence User - 30 Jan, 2017

Hi Guys',

Hope you can help?

I have two separate processes, each with their own start and end. I need to pass the process instance id from the first process to the second process.

I am using a sub-flow task in the first process, in order to start the second process.

I can get the second process instance id, once the second process has been kicked off.

My problem is, retaining state between the two processes, to be able to link-up the 2 process instance id's that are related in the process thread.

Thanks for the help,

Cheers,

Ernest.

 

  

 

 

process

2


31 Jan, 2017
confluenceUser
confluenceUser

Hi there,

Anywhere in your second (subflow) process instance, run this code to get the first (parent) process id.

import org.joget.apps.app.service.AppUtil;
import org.joget.apps.app.service.AppService;
AppService appService = (AppService) AppUtil.getApplicationContext().getBean("appService");
String recordId = appService.getOriginProcessId("#assignment.processId#");
System.out.println(recordId);

Hope this helps.

Thanks.

Hugo

31 Jan, 2017
confluenceUser
1
confluenceUser

Great! ,thanks so much Hugo. this is exactly what I needed. Cheers, Ernest.

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print