Expand my Community achievements bar.

Setting process variable via Java in a component

Avatar

Level 7

I am writing a custom component and I want to set a value on a process variable.  However, I do not want the variable to be an "input" or "output".

In the Execute Script, it uses patExec...

What's the equivalent from within a component?

Thanks.

4 Replies

Avatar

Level 10

patExecContext.setProcessDataValue( ) must also work within your custom component. Did you try that method?

Nith

Avatar

Level 10

Why wouldn't you want to set itas part of an input/output parameter?

This is really the right way ofdoing this. Otherwise you'll end up with hardcoded variable name in your customcomponent and that not ideal.


If you're trying to define a default value for it coming from a properties file, you can just make it a "Configuration" variable and set the value from adminui.


Jasmin

Avatar

Level 7

The configuration values get wiped out with each deploy.  It doesn't work for us.  Can we

enter a bug because I can't imagine this is "by design".