Skip to main content
Inspiring
Sep 30, 2021 10:06 PM UTC
Question

Start Process with synchronous sub process inside

1. I have a process model "Main_Process". It wants a pv!letter from the below process it runs

2. Inside I have a Start Process node that calls a process model "Apple". It wants a pv!letter from the below that it runs.

3. Inside "Apple" I have a synchronous sub process "Core" inside that outputs to its parent an important value we will call pv!numberOfSeeds

I can send data between 1 and 2 with activity chaining and outputting variables i want with AC!processinfo.pv

My issue is that when 3 "Core" is involved, I can get nothing out of it, and any variables changes done during or after it are no longer visible in "Main_Process"

Any ideas on how I can get values out of Core to my Main Process?

Main_Process_______________________________________

Apple________________________________________

Core_________________________________________

4 replies

Participating Frequently
Sep 30, 2021 11:30 PM UTC

You can pass by reference the process variable from Main process -> Apple -> Core. This way updates to that pv in core process will be reflected all the way in the main parent process. However I see you are using Start process smart service which does not support passing by reference so you will have to update this to a sub-process call. 

Having said that, passing by reference isn't a best practice if the process variable is a CDT. If you are dealing with CDT's or if you are looking for other alternatives, take a look at the plugin that allows to get and set PV's across processes.https://community.appian.com/b/appmarket/posts/get-and-set-external-process-variables

Inspiring
Oct 1, 2021 1:22 PM UTC

Passing by reference between apple and core has been attempted already.  It has no impact.

You can not pass by reference between a start process node and the process it calls.

Main thing i want addressed is subprocesses break activity chaining which would allow the variables to propagate from core to main.  Give it a try.  You will find it does not react how you think.

acaciob0002
Participating Frequently
Oct 1, 2021 12:00 AM UTC

Hi [mention:4fd8ca9456714575a0a8b21a436eb40f:e9ed411860ed4f2ba0265705b8793d05]

Have you checked if the output variables for the Core sub proc are mapped properly? 

Regards,

Acacio B.

Inspiring
Oct 1, 2021 1:27 PM UTC

output is configured properly.

Its changed are reflected in apple.  Just apple does not have the change reflected in its startprocess caller main.

Changed between apple and main are are only reflected via chaining.  Adding a subprocess(core) node breaks this chaining so  any changed before (core) or after it in apple done show up.