Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
4 replies
Subscribers
5 subscribers
Views
1474 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Plug-Ins
Hello All, Currently I am working on a plugin where i need to set valu
syedi
over 7 years ago
Hello All,
Currently I am working on a plugin where i need to set value for "ProcessVariable" object, to pass into "ProcessStartConfig" object. But ProcessVariable setValue() function is deprecated as it origins from the TypedVariable. Even though it's working fine , since it's deprecated is there any other way to set the value other than using setValue() for ProcessVariable. or is it fine to use this function ?
OriginalPostID-228642
OriginalPostID-228642
Discussion posts and replies are publicly visible
Parents
0
Eduardo Fuentes
Appian Employee
over 7 years ago
I am not creating new variables. They are variables that my process model already has. I am just creating the abstraction of those variables for my Java code to be able to identify them by Name.
Here's how I start a process that requires 3 pv's. I am populating those pv's
ProcessVariable[] processVariables = new ProcessVariable[3];
TypedValue typedValue = new TypedValue(Long.valueOf(AppianType.INTEGER), new Long(100));
NamedTypedValue namedTypeValue = new NamedTypedValue(typedValue,"anIntegerNumber");
ProcessVariable pvInstance = new ProcessVariable(namedTypeValue);
processVariables[0] = pvInstance;
typedValue = new TypedValue(Long.valueOf(AppianType.STRING), new String("fromAPI"));
namedTypeValue = new NamedTypedValue(typedValue,"wMyOtherText");
pvInstance = new ProcessVariableInstance(namedTypeValue);
processVariables[1] = pvInstance;
typedValue = new TypedValue(Long.valueOf(AppianType.STRING), new String("fromAPI2"));
namedTypeValue = new NamedTypedValue(typedValue,"zMyText");
pvInstance = new ProcessVariableInstance(namedTypeValue);
processVariables[2] = pvInstance;
ProcessStartConfig config = new ProcessStartConfig();
config.setProcessParameters(processVariables);
pds.initiateProcess(processModelId, config);
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Eduardo Fuentes
Appian Employee
over 7 years ago
I am not creating new variables. They are variables that my process model already has. I am just creating the abstraction of those variables for my Java code to be able to identify them by Name.
Here's how I start a process that requires 3 pv's. I am populating those pv's
ProcessVariable[] processVariables = new ProcessVariable[3];
TypedValue typedValue = new TypedValue(Long.valueOf(AppianType.INTEGER), new Long(100));
NamedTypedValue namedTypeValue = new NamedTypedValue(typedValue,"anIntegerNumber");
ProcessVariable pvInstance = new ProcessVariable(namedTypeValue);
processVariables[0] = pvInstance;
typedValue = new TypedValue(Long.valueOf(AppianType.STRING), new String("fromAPI"));
namedTypeValue = new NamedTypedValue(typedValue,"wMyOtherText");
pvInstance = new ProcessVariableInstance(namedTypeValue);
processVariables[1] = pvInstance;
typedValue = new TypedValue(Long.valueOf(AppianType.STRING), new String("fromAPI2"));
namedTypeValue = new NamedTypedValue(typedValue,"zMyText");
pvInstance = new ProcessVariableInstance(namedTypeValue);
processVariables[2] = pvInstance;
ProcessStartConfig config = new ProcessStartConfig();
config.setProcessParameters(processVariables);
pds.initiateProcess(processModelId, config);
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data