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
6 replies
Subscribers
8 subscribers
Views
1846 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
Probelm statement:: We have a webservice which uses the Appian API to make
senthilvg
over 12 years ago
Probelm statement::
We have a webservice which uses the Appian API to make a call to the process model using the Appian API like below:
NamedTypedValue namedTypeValue = new NamedTypedValue(JaxbConverter.toTypedValue(po, bulkAddParameterTypeId, ts),"BulkAddProcessObject");
ProcessVariableInstance myBulkUpload = new ProcessVariableInstance(namedTypeValue);
ProcessStartConfig con = new ProcessStartConfig();
con.setProcessParameters(new ProcessVariable[]{myBulkUpload});
processID = pds.initiateProcess(pmId, con);
Data is not gettig passed from webservice to the process model.
Findings:
------------
when the below code is invoked - Typed conversion takes place
JaxbConverter.toTypedValue(po, bulkAddParameterTypeId, ts)
po= process object with values
bulkAddParameterTypeId=processobjectid
ts = tyep service
Result of above execution:
NamedTypedValue[name=BulkAddProcessObject,it=980,v={<null>,<null>,,<null>}]
The data is...
OriginalPostID-35728
OriginalPostID-35728
Discussion posts and replies are publicly visible
0
senthilvg
over 12 years ago
... missing. Not sure where it breaks.
Any help? Thanks in advance!!!!!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 12 years ago
The problem is that your NamedTypedValue is receiving a name different from your process variable (parameter). Your process parameter (pv) is called "BulkaddProcessObject_PV", however you the object you are creating (NamedTypedValue) is has the name "BulkAddProcessObject"; this will result in the following error in the Appian logs:
WARN .a.p.PROCESS.i "Ignoring these unrecognized process parameters: ,`BulkAddProcessObject"
which makes sense because your process model DOES NOT have a process variable with this name; the right name is BulkaddProcessObject_PV
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 12 years ago
Here's a screenshot explaining what I just described
forum.appian.com/.../51579
Try adding this line right after you create the NamedTypedValue:
namedTypeValue.setName("BulkaddProcessObject_PV");
Which at the end will look like this:
NamedTypedValue namedTypeValue = new NamedTypedValue(JaxbConverter.toTypedValue(po, bulkAddParameterTypeId, ts),"BulkAddProcessObject");
namedTypeValue.setName("BulkaddProcessObject_PV");
ProcessVariableInstance myBulkUpload = new ProcessVariableInstance(namedTypeValue);
.....
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 12 years ago
Actually you just need to chane this line:
NamedTypedValue namedTypeValue = new NamedTypedValue(JaxbConverter.toTypedValue(po, bulkAddParameterTypeId, ts),"BulkaddProcessObject_PV");
to
NamedTypedValue namedTypeValue = new NamedTypedValue(JaxbConverter.toTypedValue(po, bulkAddParameterTypeId, ts),"BulkAddProcessObject");
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 12 years ago
I meant:
Change this line from:
NamedTypedValue namedTypeValue = new NamedTypedValue(JaxbConverter.toTypedValue(po, bulkAddParameterTypeId, ts),"BulkaddProcessObject");
to
NamedTypedValue namedTypeValue = new NamedTypedValue(JaxbConverter.toTypedValue(po, bulkAddParameterTypeId, ts),"BulkaddProcessObject_PV");
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 12 years ago
This is an example that I just created to test this; I hope this helps:
Student studentPOJO = new Student();
studentPOJO.setFirstName("Eduardo");
studentPOJO.setLastName("Fuentes");
String namespace = "
xxxxxxxxxx:8002/.../";
String typeName = "Student";
TypedValue typedValue = JaxbConverter.toTypedValue(studentPOJO, ts.getTypeByQualifiedName(new QName(namespace,typeName)).getId(), ts);
NamedTypedValue namedTypeValue = new NamedTypedValue(typedValue,"myStudent");
ProcessVariableInstance myStudent = new ProcessVariableInstance(namedTypeValue);
ProcessStartConfig config = new ProcessStartConfig();
config.setProcessParameters(new ProcessVariable[]{myStudent});
pds.initiateProcess(pmID, config);
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel