Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Process Instance : Update Process Variables with Java API


Level 1


I need to set a lot of process variables in a java service that is executed in a process but can't find the way to do that.

Is it possible to modify the value of a variable from a process instance with the JAVA API ?

I didn't find this type of function (for example with the ProcessManager API).



5 Replies




Can you be more specific? Do you mean that you want to manipulate process variable values while the LC process is running? So you could arbitrarily "poke" values into a running process?



Level 1

I need to create a specific service that will be connected to different systems to get some external informations.

Those informations must be put in my process variables.

This service will be executed in a Livecycle Process.

I need to set a lot of process variables (like 100 vars) and I didn't find any function in the Java API to set process instance variables.

The SetValue Service is not a good solution because there is to much variables to set and my specific service will not always set the same variables (it must set them dynamically. It's a too complex algorithm to set the values in the process modelling. I need to set them programaticly.



Level 5

Could you place your logic in an executeScript service?

You can use native Java there.

I have had good luck getting values in and out of process varaibles with the get... set...

this is a very simple example.

import com.adobe.workflow.pat.service.*;
String allowLogging = patExecContext.getProcessDataStringValue("/process_data/@allowLogging");

patExecContext.setProcessDataStringValue("/process_data/@errorActivity", "Save Doc XML");
patExecContext.setProcessDataStringValue("/process_data/@errorMessage", "SystemException");

if (allowLogging.equalsIgnoreCase("true")) {
System.out.println("@@@@ Save Doc XML @@@@");
System.out.println("@@@@ SystemException @@@@");

}; // END allowLogging


Level 1

Maybe that will be the solution....I will try.

But the problem is that all my logic is defined on a specific service wich use a lot a stuff (EJB3, Hibernate, ....) and I don't think that I could put all those things on an executeScript service....


Level 9

Hi Will

I'm pretty sure we could build a component to allow you to do this from your Java code.

If you're interested, please email