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
7 subscribers
Views
2139 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Integrations
I wrote a custom servlet plugin that calls the process model (Say A) with some p
senthilkumark
over 9 years ago
I wrote a custom servlet plugin that calls the process model (Say A) with some parameters. I have designed the pm in one of the node with the same pv names . When we invoke the servlet , the pm gets triggered but the pv values that I'm passing from servlet are not getting mapped in the pm instance that started. Please help me if I'm wrong in my understanding and code implementation.
My PM has Start Node, a Script Task and End Node . Script task I had configured the pv's as parameters.
TypedValue typedValue = new TypedValue(Long.valueOf(AppianType.INTEGER), new Long(100));
NamedTypedValue namedTypeValue = new NamedTypedValue(typedValue,"anIntegerNumber");
ProcessVariableInstance pvInstance = new ProcessVariableInstance(namedTypeValue);
ProcessVariable[] processVariables = new ProcessVariable[3];
processVariables[0] = pvInstance;
typedValue = new TypedValue(Long.valueOf(AppianType.STRING), new String("fromAPI"));
namedType...
OriginalPostID-183644
OriginalPostID-183644
Discussion posts and replies are publicly visible
0
senthilkumark
over 9 years ago
...Value = 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);
try {
pes.initiateProcess((long)1576, config);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Shyam Bommakanti
Certified Lead Developer
over 9 years ago
Take a look at the source for Start Process Writer in shared components for ideas and to debug.
(sorry I'm on mobile and couldn't review your code and couldn't copy paste the link to the start process writer record)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
senthilkumark
over 9 years ago
Hi ....I fixed this. Thank you
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
surendrab
over 8 years ago
Hi Senthilkumark, could you tell us what you did? I am also stuck on the same step as yours.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel